decocms 4.316.7 → 4.317.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/client/assets/{AlertCircle-pzcnESJh.js → AlertCircle-CvNkLcsO.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BBl3HuXM.js → AreaChart-CSSrVbcX.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DXuRs3HX.js → ArrowLeft-Ln0LNrXp.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DMnh6s4b.js → ArrowUp-D629Mb3w.js} +1 -1
  5. package/dist/client/assets/{Check-BESi8Og0.js → Check-CKt7kGsd.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DWSrREW4.js → CheckCircle-mv7-ypug.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-D9SrOc49.js → ChevronDown-CnPHyH5A.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-PYqPsqmX.js → ChevronRight-DdS63gkb.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-DtCb6SRW.js → ChevronSelectorVertical-D8umbTYG.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DInto1b8.js → ChevronUp-ylRdQRex.js} +1 -1
  11. package/dist/client/assets/{Copy01-l041cd35.js → Copy01-DDc5DYlU.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-p5hPt9es.js → CreditCard01-jp5QVACe.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-CH_GCWYz.js → DotsVertical-Bi8zkQ90.js} +1 -1
  14. package/dist/client/assets/{Download01-gw2mF-MC.js → Download01-CKf-gKDD.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-BFz7XpiN.js → ErrorBarContext-CwWhH_t4.js} +1 -1
  16. package/dist/client/assets/{Eye-Cm7KzDnH.js → Eye-DXxdN1gq.js} +1 -1
  17. package/dist/client/assets/{FilterLines-CafyJI14.js → FilterLines-dSEFajEE.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-Bxb2j_fZ.js → GitBranch01-C1Lu83ty.js} +1 -1
  19. package/dist/client/assets/{Globe01-DLNdolGS.js → Globe01-Dha0bbDh.js} +1 -1
  20. package/dist/client/assets/{Globe04-CViLCpme.js → Globe04-CFA4wFJC.js} +1 -1
  21. package/dist/client/assets/{HardDrive-QJn1w8tw.js → HardDrive-D0FT4JHF.js} +1 -1
  22. package/dist/client/assets/{Image01-B_oUPQXv.js → Image01-slXRU7Zv.js} +1 -1
  23. package/dist/client/assets/{Key01-BnQHMp8V.js → Key01-BaUPD50J.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-B8eerp5u.js → LinkExternal01-Cu8q8TyX.js} +1 -1
  25. package/dist/client/assets/{LockUnlocked01-B-LL1VJN.js → LockUnlocked01-R9XHKzKD.js} +1 -1
  26. package/dist/client/assets/{LogOut01-39Jb5GrZ.js → LogOut01-G5_xLIhM.js} +1 -1
  27. package/dist/client/assets/{Monitor01-CQB2vCrj.js → Monitor01-L0tZYSKQ.js} +1 -1
  28. package/dist/client/assets/{Package-5u5XI3F0.js → Package-DviXgiuM.js} +1 -1
  29. package/dist/client/assets/{Palette-CXA1gi33.js → Palette-DY0XYqhu.js} +1 -1
  30. package/dist/client/assets/{Play-B-a-uZIp.js → Play-BjOu0Brf.js} +1 -1
  31. package/dist/client/assets/{Plus-DuBsnz4i.js → Plus-CChyZYWb.js} +1 -1
  32. package/dist/client/assets/{SearchLg-B8cxnIXO.js → SearchLg-B7BqY8rM.js} +1 -1
  33. package/dist/client/assets/{SearchMd-TCWEaJg-.js → SearchMd-C15U6rGb.js} +1 -1
  34. package/dist/client/assets/{Sector-DBm4aDhi.js → Sector-BPSiaaeF.js} +1 -1
  35. package/dist/client/assets/{Settings02-Dy-2Qj4d.js → Settings02-BBs-XBr4.js} +1 -1
  36. package/dist/client/assets/{Share07-Rp0r2KZ9.js → Share07-C2wZgYsU.js} +1 -1
  37. package/dist/client/assets/{Shield01-DtK5gafE.js → Shield01-DB8jblJb.js} +1 -1
  38. package/dist/client/assets/{Stars01-BB8IcNTL.js → Stars01-BrYl4UPC.js} +1 -1
  39. package/dist/client/assets/{Stars02-Bbmo0zY3.js → Stars02-Bjd10p5h.js} +1 -1
  40. package/dist/client/assets/{Sun-CLDrV-25.js → Sun-DURbhC_d.js} +1 -1
  41. package/dist/client/assets/{SwitchHorizontal01-CMuMpxZg.js → SwitchHorizontal01-DKHrNHvQ.js} +1 -1
  42. package/dist/client/assets/{Tool01-Dkl-Om1v.js → Tool01-CWUzFy5X.js} +1 -1
  43. package/dist/client/assets/{Tool02-BMdZDsm0.js → Tool02-qjcc9miB.js} +1 -1
  44. package/dist/client/assets/{Trash01-l-_qVOL8.js → Trash01-CRm0bRR3.js} +1 -1
  45. package/dist/client/assets/{TrendUp01-D6VAnyKs.js → TrendUp01-gVityjDF.js} +1 -1
  46. package/dist/client/assets/{Upload01-BLnsIrPZ.js → Upload01-dRwHInn7.js} +1 -1
  47. package/dist/client/assets/{User01-Ck3_FIpD.js → User01-rxqPQIKe.js} +1 -1
  48. package/dist/client/assets/{UserSquare-CHnwGSuk.js → UserSquare-6jbHCY0r.js} +1 -1
  49. package/dist/client/assets/{Users01-CFzvYiuw.js → Users01-B8VhqH7r.js} +1 -1
  50. package/dist/client/assets/{Users03-Df29VRo0.js → Users03-Cg3iPl3n.js} +1 -1
  51. package/dist/client/assets/{XCircle-BlZmdI-G.js → XCircle-fgqsbzhf.js} +1 -1
  52. package/dist/client/assets/{XClose-CnMJB9wB.js → XClose-DE1anhKv.js} +1 -1
  53. package/dist/client/assets/{YAxis-B2Kiqu39.js → YAxis-DpXDQD8T.js} +1 -1
  54. package/dist/client/assets/{Zap-I-DMHk8W.js → Zap-Brll3GtA.js} +1 -1
  55. package/dist/client/assets/{ZapSquare-CKPKakyU.js → ZapSquare-DTXwxwOz.js} +1 -1
  56. package/dist/client/assets/{ZoomOut-Db6FAGuS.js → ZoomOut-Dez1Ra4B.js} +1 -1
  57. package/dist/client/assets/{access-gate-D0wuDw30.js → access-gate-BSQk1Rzv.js} +1 -1
  58. package/dist/client/assets/{agent-icon-D0VUz3F6.js → agent-icon-ChVISiUs.js} +1 -1
  59. package/dist/client/assets/agents-list-D551Og-t.js +1 -0
  60. package/dist/client/assets/ai-providers-CPn31knd.js +1 -0
  61. package/dist/client/assets/{alert-kBJMHqj0.js → alert-DPF6U2qY.js} +1 -1
  62. package/dist/client/assets/{alert-dialog-CADdLgiP.js → alert-dialog-DAcPFaME.js} +1 -1
  63. package/dist/client/assets/analytics-tab-spcdbaXx.js +2 -0
  64. package/dist/client/assets/{api-keys-CnVHWdU5.js → api-keys-BuQmhxuH.js} +1 -1
  65. package/dist/client/assets/app-editor-YQAKDcpK.js +1 -0
  66. package/dist/client/assets/{auth-ltjrHdFv.js → auth-BGkoJ1cG.js} +1 -1
  67. package/dist/client/assets/{auth-catchall-C1MGyFJv.js → auth-catchall-D_mNgihV.js} +1 -1
  68. package/dist/client/assets/{auth-entry-zNm52PxS.js → auth-entry-DfPzg9zj.js} +1 -1
  69. package/dist/client/assets/{auth-split-layout-YOL3Lk19.js → auth-split-layout-CYKtd5YH.js} +1 -1
  70. package/dist/client/assets/{authenticate-and-persist-oauth-C5WoxICz.js → authenticate-and-persist-oauth-BkZkHJZD.js} +1 -1
  71. package/dist/client/assets/{automation-list-row-S8Kym9UP.js → automation-list-row-B6fgeAly.js} +1 -1
  72. package/dist/client/assets/{automation-runs-DfK0VSMx.js → automation-runs-CCyhCizU.js} +1 -1
  73. package/dist/client/assets/automations-D0m_7RAE.js +1 -0
  74. package/dist/client/assets/{avatar-CAMx88Qh.js → avatar-Dz9Cdkfa.js} +1 -1
  75. package/dist/client/assets/{badge-BQ00ii0C.js → badge-CLPA3ucP.js} +1 -1
  76. package/dist/client/assets/{block-document-7UrdrreU.js → block-document-D-2XnruA.js} +1 -1
  77. package/dist/client/assets/{breadcrumb-Bbul4qd6.js → breadcrumb-2GV4TpKd.js} +1 -1
  78. package/dist/client/assets/{buckets-ComEGlo4.js → buckets-DNcQfcr8.js} +1 -1
  79. package/dist/client/assets/{bulk-category-panel-3U5YyUy0.js → bulk-category-panel-DmLfL9v8.js} +1 -1
  80. package/dist/client/assets/{capability-load-error-weIa1Afc.js → capability-load-error-DkvHos-W.js} +1 -1
  81. package/dist/client/assets/{cards-CBOWo6Jv.js → cards-CZP2Hek5.js} +1 -1
  82. package/dist/client/assets/category-editor-nA-BziD8.js +1 -0
  83. package/dist/client/assets/cdn-tab-B0g2tuRG.js +1 -0
  84. package/dist/client/assets/{chart-C5ZFqDIF.js → chart-DLwNihK6.js} +1 -1
  85. package/dist/client/assets/{chat-context-BNnytLLb.js → chat-context-CAsN7haM.js} +1 -1
  86. package/dist/client/assets/{checkbox-8NR47DPn.js → checkbox-U8zBPmpm.js} +1 -1
  87. package/dist/client/assets/{choose-editor-Eg8Voxgu.js → choose-editor-YaLHWgso.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-Dgv7x5WB.js → cli-auth-success-CUjuu8JM.js} +1 -1
  89. package/dist/client/assets/collection-detail-BQ-LYvRK.js +1 -0
  90. package/dist/client/assets/{collection-display-button-fdjUSWwM.js → collection-display-button-D26vPWk5.js} +1 -1
  91. package/dist/client/assets/{collection-search-CfmsG6EB.js → collection-search-BYssgoWM.js} +1 -1
  92. package/dist/client/assets/{collection-table-wrapper-ZF9BQojD.js → collection-table-wrapper-DVqPAlfp.js} +1 -1
  93. package/dist/client/assets/{collection-tabs-BMjNkk-e.js → collection-tabs-DE_Himgg.js} +1 -1
  94. package/dist/client/assets/{command-B4vg3kev.js → command-vRQZOs-8.js} +1 -1
  95. package/dist/client/assets/{commerce-onboarding-CfgHbPRo.js → commerce-onboarding-BBKhTt2f.js} +1 -1
  96. package/dist/client/assets/{config-F76h-4Nb.js → config-DzpAHZgc.js} +1 -1
  97. package/dist/client/assets/{connect-B9CVnB_d.js → connect-BTuE7fqF.js} +1 -1
  98. package/dist/client/assets/{connection-CTJSKgoV.js → connection-B69s8icJ.js} +1 -1
  99. package/dist/client/assets/{connection-card-CrXfxqk-.js → connection-card-DTi-12VQ.js} +1 -1
  100. package/dist/client/assets/connection-detail-DQoQ96OA.js +1 -0
  101. package/dist/client/assets/{connection-form-helpers-kZEDJqLp.js → connection-form-helpers-d8MRf_ol.js} +1 -1
  102. package/dist/client/assets/connections-BBt22oTv.js +1 -0
  103. package/dist/client/assets/{decopilot-sse-pool-C6zMztYI.js → decopilot-sse-pool-C93pdOD1.js} +1 -1
  104. package/dist/client/assets/{dialog-4i8tKyZs.js → dialog-BBUJZcpD.js} +1 -1
  105. package/dist/client/assets/{domain-settings-Dl1fMq9O.js → domain-settings-CCzeKQrl.js} +1 -1
  106. package/dist/client/assets/{drawer-BOqo92AD.js → drawer-ROsGZL8h.js} +1 -1
  107. package/dist/client/assets/{dropdown-menu-DHdxnqdQ.js → dropdown-menu-Fmf4NmkL.js} +1 -1
  108. package/dist/client/assets/e2e-tab-CWXL_Rel.js +1 -0
  109. package/dist/client/assets/{editor-B0xnuCCp.js → editor-BfKSMUcF.js} +1 -1
  110. package/dist/client/assets/{empty-state-TkGPHkkR.js → empty-state-CeJslyet.js} +1 -1
  111. package/dist/client/assets/{empty-state-CI1Sx67B.js → empty-state-DQWPOyXn.js} +1 -1
  112. package/dist/client/assets/{extract-connection-data-BAHgy3b5.js → extract-connection-data-BV9lY0YE.js} +1 -1
  113. package/dist/client/assets/file-explorer-DN4S-Gzu.js +2 -0
  114. package/dist/client/assets/{file-type-icon-6Mfusmw2.js → file-type-icon-gS1uLZ7y.js} +1 -1
  115. package/dist/client/assets/{folder-icon-Cb7l5H7F.js → folder-icon-CKBCnr8T.js} +1 -1
  116. package/dist/client/assets/{form-DqHZuRjN.js → form-Pq5VEUJX.js} +1 -1
  117. package/dist/client/assets/general-CG8aZZXM.js +1 -0
  118. package/dist/client/assets/{github-repo-picker-BT0gAgwT.js → github-repo-picker-BJ1F-akh.js} +1 -1
  119. package/dist/client/assets/{hooks-C0P3-Ouc.js → hooks-Do0onfCH.js} +1 -1
  120. package/dist/client/assets/hosting-tab-DRaG29sb.js +1 -0
  121. package/dist/client/assets/{index-C6HV7BvV.js → index-B4SwE6N4.js} +1 -1
  122. package/dist/client/assets/{index-ChRU4p6-.js → index-BC5LO8yG.js} +1 -1
  123. package/dist/client/assets/index-B_yD-LXQ.js +1 -0
  124. package/dist/client/assets/{index-C0FQdaYP.js → index-CRwNbXJ2.js} +2 -2
  125. package/dist/client/assets/{index-Shv9_4go.js → index-DQi5Cm5z.js} +6 -6
  126. package/dist/client/assets/{index-BfSwG7jI.js → index-Dg_D1q-d.js} +5 -5
  127. package/dist/client/assets/{index-BmAm7rGx.js → index-Diw377tl.js} +1 -1
  128. package/dist/client/assets/index-XAxRN-k7.js +1 -0
  129. package/dist/client/assets/{index-CTr9GRKD.js → index-cmQGzepO.js} +1 -1
  130. package/dist/client/assets/{index-redirect-DjMv0397.js → index-redirect-B0f0F0qe.js} +1 -1
  131. package/dist/client/assets/{infra-billing-DnPvMV-w.js → infra-billing-BFxO9knx.js} +1 -1
  132. package/dist/client/assets/{input-BTAsE3JA.js → input-DpPa_42i.js} +1 -1
  133. package/dist/client/assets/{integration-icon-RkVfBWiU.js → integration-icon-CWNKMETE.js} +1 -1
  134. package/dist/client/assets/{invite-member-dialog-DiGxeKHf.js → invite-member-dialog-remVNBKv.js} +1 -1
  135. package/dist/client/assets/{label-CvqDH6pp.js → label-BL_7ZfUT.js} +1 -1
  136. package/dist/client/assets/{layout-CXv8NOkC.js → layout-Czug-Tzw.js} +1 -1
  137. package/dist/client/assets/{login-DTCxt54t.js → login-B5LcYsVn.js} +1 -1
  138. package/dist/client/assets/{markdown-BIiViQno.js → markdown-DiIariuP.js} +1 -1
  139. package/dist/client/assets/{mcp-oauth-CpjxOVqq.js → mcp-oauth-ifEh5lsV.js} +1 -1
  140. package/dist/client/assets/{members-BxEREf0f.js → members-DhJdQ5V-.js} +1 -1
  141. package/dist/client/assets/{monaco-editor-BBOBGlaR.js → monaco-editor-71ToWHer.js} +1 -1
  142. package/dist/client/assets/{monitoring-stats-row-sNg9slOY.js → monitoring-stats-row-BKk7NuZS.js} +1 -1
  143. package/dist/client/assets/{multi-select-By4YQF2Y.js → multi-select-Dik65Adz.js} +1 -1
  144. package/dist/client/assets/{oauth-callback-CDudkkZz.js → oauth-callback-BBbWDmtj.js} +1 -1
  145. package/dist/client/assets/{oauth-callback-ai-provider-DjHV_BtN.js → oauth-callback-ai-provider-BvdmgcPR.js} +1 -1
  146. package/dist/client/assets/{onboarding-Co15NqH2.js → onboarding-C1FzaSSC.js} +1 -1
  147. package/dist/client/assets/{org-layout-DJ2bCa2R.js → org-layout-B-DeoBFn.js} +1 -1
  148. package/dist/client/assets/{organization-choice-Sb8qhqxT.js → organization-choice-CQ1g34ON.js} +1 -1
  149. package/dist/client/assets/orgs-BCaSf3_9.js +1 -0
  150. package/dist/client/assets/{page-seo-form-CHCXqtv3.js → page-seo-form-CBDVI6Sy.js} +1 -1
  151. package/dist/client/assets/{popover-Ds86LKX0.js → popover-CWhQzDoV.js} +1 -1
  152. package/dist/client/assets/post-calendar-DzXMpJiI.js +1 -0
  153. package/dist/client/assets/post-editor-cJ-g33aP.js +1 -0
  154. package/dist/client/assets/{primitives-PNdNgUxv.js → primitives-CcjAy_Wl.js} +1 -1
  155. package/dist/client/assets/{profile-CoILZvtm.js → profile-BkGYLaF7.js} +1 -1
  156. package/dist/client/assets/project-app-view-Dsj22h-4.js +1 -0
  157. package/dist/client/assets/{prompts-BSI9TwkU.js → prompts-IUQTjTeW.js} +1 -1
  158. package/dist/client/assets/record-editor-CJv_62ZD.js +1 -0
  159. package/dist/client/assets/redirect-editor-DTdkzPCL.js +1 -0
  160. package/dist/client/assets/registry-D1hrikAH.js +2 -0
  161. package/dist/client/assets/{registry-layout-BdbPNxAs.js → registry-layout-Dq5O3dna.js} +1 -1
  162. package/dist/client/assets/{reports-CpsHu5F_.js → reports-DddsMmcD.js} +1 -1
  163. package/dist/client/assets/{require-capability-BVA_PM9d.js → require-capability-D8zMRnaB.js} +1 -1
  164. package/dist/client/assets/{required-auth-layout-CT5fghv3.js → required-auth-layout-DXyOZrhi.js} +1 -1
  165. package/dist/client/assets/{reset-password-cXFKRfj0.js → reset-password-DxpMImOc.js} +1 -1
  166. package/dist/client/assets/{review-settings-Dul3FnUR.js → review-settings-iIiY3_wn.js} +1 -1
  167. package/dist/client/assets/{roles-wKcS0rHZ.js → roles-0Svq_q5F.js} +1 -1
  168. package/dist/client/assets/schema-yAsjbXXp.js +1 -0
  169. package/dist/client/assets/{scroll-area-DOLH1hgj.js → scroll-area-BvnHZd_6.js} +1 -1
  170. package/dist/client/assets/{search-input-CeEId8JN.js → search-input-bYvwKxnA.js} +1 -1
  171. package/dist/client/assets/{secrets-BBYUOuHb.js → secrets-BRhLfU_S.js} +1 -1
  172. package/dist/client/assets/{sections-editor-BEKYvzfb.js → sections-editor-C2iz5o9t.js} +2 -2
  173. package/dist/client/assets/{select-B96sC0jU.js → select-DNzQTE9-.js} +1 -1
  174. package/dist/client/assets/{select-model-DKInz36h.js → select-model-uxVcrYeA.js} +1 -1
  175. package/dist/client/assets/{self-tool-result-4Q8hQ6Im.js → self-tool-result-Biy61Uc5.js} +1 -1
  176. package/dist/client/assets/seo-editor-CKv8V286.js +1 -0
  177. package/dist/client/assets/settings-layout-C6DMTBGx.js +1 -0
  178. package/dist/client/assets/{shell-controls-j00j0s1I.js → shell-controls-3vrU3MB9.js} +1 -1
  179. package/dist/client/assets/{shell-layout-Bpk7ohiD.js → shell-layout-ChmjyFL-.js} +1 -1
  180. package/dist/client/assets/{skill-preview-B1BayRfx.js → skill-preview-COx4IWY-.js} +1 -1
  181. package/dist/client/assets/{skills-BFOpcwAW.js → skills-BRQGFpXX.js} +1 -1
  182. package/dist/client/assets/{spinner-CBT7H6Nj.js → spinner-D9tRFss2.js} +1 -1
  183. package/dist/client/assets/{sso-gXKByJzv.js → sso-BHUSAeIS.js} +1 -1
  184. package/dist/client/assets/store-B-uB1JKj.js +1 -0
  185. package/dist/client/assets/store-registry-PTGLl7mv.js +2 -0
  186. package/dist/client/assets/{super-agent-icon-CcEEod1i.js → super-agent-icon-VLWg2gcg.js} +1 -1
  187. package/dist/client/assets/{switch-DhvugTsO.js → switch-Vpgt8Dtr.js} +1 -1
  188. package/dist/client/assets/synced-repos-b9Znddsv.js +1 -0
  189. package/dist/client/assets/{table-CBDqSL5J.js → table-BNqY6P4c.js} +1 -1
  190. package/dist/client/assets/{tabs-BHzFvM3d.js → tabs-DPRnGGBh.js} +1 -1
  191. package/dist/client/assets/task-board-wCy7jspP.js +1 -0
  192. package/dist/client/assets/tasks-DBtLSGKB.js +1 -0
  193. package/dist/client/assets/{textarea-W0cHs7kb.js → textarea-R3gwzWuz.js} +1 -1
  194. package/dist/client/assets/{thread-route-X2aYk-A-.js → thread-route-B4oWVYoI.js} +1 -1
  195. package/dist/client/assets/{toggle-group-DPowLvjC.js → toggle-group-BNyMaUAI.js} +1 -1
  196. package/dist/client/assets/{toolbar-C_LYTIqP.js → toolbar-DDVFxk0t.js} +1 -1
  197. package/dist/client/assets/{track-C6ehW_55.js → track-lHZWKOcc.js} +1 -1
  198. package/dist/client/assets/{types-M5Xw3OeR.js → types-M9rjJ4so.js} +1 -1
  199. package/dist/client/assets/{use-ai-providers-DS9TpJ7R.js → use-ai-providers-CM54Q0OX.js} +1 -1
  200. package/dist/client/assets/{use-api-keys-JA-drWGf.js → use-api-keys-UQKmlrqG.js} +1 -1
  201. package/dist/client/assets/{use-automations-fmUj9duL.js → use-automations-CPxuY6-O.js} +1 -1
  202. package/dist/client/assets/{use-autosave-BU_QPyqZ.js → use-autosave-yRmtJAFw.js} +1 -1
  203. package/dist/client/assets/{use-connection-BudxFSJ1.js → use-connection-G7c7s6Q6.js} +1 -1
  204. package/dist/client/assets/{use-copy-BLd03kFT.js → use-copy-DB-byMLt.js} +1 -1
  205. package/dist/client/assets/{use-create-virtual-mcp-CTGh03SX.js → use-create-virtual-mcp-BW2-Udqu.js} +1 -1
  206. package/dist/client/assets/{use-debounced-autosave-ypk7z-ra.js → use-debounced-autosave-DvymupLc.js} +1 -1
  207. package/dist/client/assets/{use-debounced-value-C5uG6eOe.js → use-debounced-value-DopC2TwH.js} +1 -1
  208. package/dist/client/assets/{use-decopilot-events-5HPG38qC.js → use-decopilot-events-DF_rDZmO.js} +1 -1
  209. package/dist/client/assets/{use-delete-connection-CnzXCJH0.js → use-delete-connection-CR3a3pq_.js} +1 -1
  210. package/dist/client/assets/{use-deployment-admin-B0bHz9Kb.js → use-deployment-admin-710BKY0Z.js} +1 -1
  211. package/dist/client/assets/{use-destination-route-ChWdmqCT.js → use-destination-route-TwScqij0.js} +1 -1
  212. package/dist/client/assets/{use-file-configs-C9ZZlKNd.js → use-file-configs-BZkqroRL.js} +1 -1
  213. package/dist/client/assets/{use-infinite-scroll-Dd5C23ac.js → use-infinite-scroll-C3BgauEG.js} +1 -1
  214. package/dist/client/assets/{use-join-requests-C6Jv955V.js → use-join-requests-B0FizwZw.js} +1 -1
  215. package/dist/client/assets/{use-mcp-auth-status-Cptezoi_.js → use-mcp-auth-status-hGYxLW55.js} +1 -1
  216. package/dist/client/assets/{use-mcp-client-B4byQ1wO.js → use-mcp-client-EO5iWiVs.js} +1 -1
  217. package/dist/client/assets/{use-mcp-tools-Bb7R3ndw.js → use-mcp-tools-K3GZYNAp.js} +1 -1
  218. package/dist/client/assets/{use-members-pG405IAQ.js → use-members-BYGwa9Z7.js} +1 -1
  219. package/dist/client/assets/{use-navigate-to-agent-BhD-C3eq.js → use-navigate-to-agent-UrsMPHtA.js} +1 -1
  220. package/dist/client/assets/{use-org-auth-client-Br2IIgta.js → use-org-auth-client-ZxQTDAGn.js} +1 -1
  221. package/dist/client/assets/{use-org-repo-syncs-vOy2V2LC.js → use-org-repo-syncs-C3wPoLn0.js} +1 -1
  222. package/dist/client/assets/{use-org-sso-B4Tot0-C.js → use-org-sso-EQbKGGm_.js} +1 -1
  223. package/dist/client/assets/{use-organization-roles-qSoCa9ga.js → use-organization-roles-Cgk3qsYL.js} +1 -1
  224. package/dist/client/assets/use-organization-settings-DRNltYjf.js +1 -0
  225. package/dist/client/assets/{use-panel-navigate-BxQr2f1i.js → use-panel-navigate-CeNfN5zO.js} +1 -1
  226. package/dist/client/assets/{use-registry-connections-m9TXCiaY.js → use-registry-connections-h293jGTM.js} +1 -1
  227. package/dist/client/assets/{use-secrets-CANXygBX.js → use-secrets-DLBve_-_.js} +1 -1
  228. package/dist/client/assets/{use-section-preview-base-CFJlEZeQ.js → use-section-preview-base-DhS-dmV_.js} +1 -1
  229. package/dist/client/assets/{use-status-sounds-B8QrmHEw.js → use-status-sounds-DRtkfkey.js} +1 -1
  230. package/dist/client/assets/{use-tags-BokBbgMx.js → use-tags-D04LvBWo.js} +1 -1
  231. package/dist/client/assets/{use-view-mode-DSpZVPxq.js → use-view-mode-CkYnF9E6.js} +1 -1
  232. package/dist/client/assets/{use-virtual-mcp-BKGaR5Vw.js → use-virtual-mcp-CxvwShU4.js} +1 -1
  233. package/dist/client/assets/useInfiniteQuery-DFMRU76h.js +1 -0
  234. package/dist/client/assets/useSuspenseInfiniteQuery-DcraGyx6.js +1 -0
  235. package/dist/client/assets/{users-DVKkHzQu.js → users-Dt0Je5TG.js} +1 -1
  236. package/dist/client/assets/variant-calendar-BlvMqXMa.js +1 -0
  237. package/dist/client/assets/{view-mode-toggle-TgslKinU.js → view-mode-toggle-BH1dvVv_.js} +1 -1
  238. package/dist/client/index.html +1 -1
  239. package/dist/server/cli.js +560 -560
  240. package/dist/server/server.js +386 -386
  241. package/package.json +1 -1
  242. package/dist/client/assets/agents-list-BYjyrbW6.js +0 -1
  243. package/dist/client/assets/ai-providers-D8X6OwxC.js +0 -1
  244. package/dist/client/assets/analytics-tab-BM221syJ.js +0 -2
  245. package/dist/client/assets/app-editor-C8ciFeVU.js +0 -1
  246. package/dist/client/assets/automations-ybxFpAZq.js +0 -1
  247. package/dist/client/assets/category-editor-Bvc2adb5.js +0 -1
  248. package/dist/client/assets/cdn-tab-BUQMxVBn.js +0 -1
  249. package/dist/client/assets/collection-detail-CthozOZl.js +0 -1
  250. package/dist/client/assets/connection-detail-GNtdKuvP.js +0 -1
  251. package/dist/client/assets/connections-BZc41jEB.js +0 -1
  252. package/dist/client/assets/e2e-tab-DnD_6pcK.js +0 -1
  253. package/dist/client/assets/file-explorer-LChlqKma.js +0 -2
  254. package/dist/client/assets/general-XZ1dA7r5.js +0 -1
  255. package/dist/client/assets/hosting-tab-PF205pJH.js +0 -1
  256. package/dist/client/assets/index-DicOUXXF.js +0 -1
  257. package/dist/client/assets/index-sCVfOAw1.js +0 -1
  258. package/dist/client/assets/orgs-GPs3AEGn.js +0 -1
  259. package/dist/client/assets/post-calendar-aQhAaMIr.js +0 -1
  260. package/dist/client/assets/post-editor-CIlDh-Vc.js +0 -1
  261. package/dist/client/assets/project-app-view-Bn7vL1yx.js +0 -1
  262. package/dist/client/assets/record-editor-CCTZlM8B.js +0 -1
  263. package/dist/client/assets/redirect-editor-CziL7gC6.js +0 -1
  264. package/dist/client/assets/registry-DY3NnGfO.js +0 -2
  265. package/dist/client/assets/seo-editor-CimcXOM1.js +0 -1
  266. package/dist/client/assets/settings-layout-Bg9SMgxG.js +0 -1
  267. package/dist/client/assets/store-DcrcC4yE.js +0 -1
  268. package/dist/client/assets/store-registry-B5IW1osW.js +0 -2
  269. package/dist/client/assets/synced-repos-49m5ry0r.js +0 -1
  270. package/dist/client/assets/task-board-BsniqWRK.js +0 -1
  271. package/dist/client/assets/tasks-kdlDgySk.js +0 -1
  272. package/dist/client/assets/use-organization-settings-CxDKMH66.js +0 -1
  273. package/dist/client/assets/useInfiniteQuery-BXzx91qu.js +0 -1
  274. package/dist/client/assets/useSuspenseInfiniteQuery-ByKcG5VI.js +0 -1
  275. package/dist/client/assets/variant-calendar-CEQj7rFz.js +0 -1
@@ -1 +0,0 @@
1
- import{c as P,H as Z,r as Y,j as i,B as ee,L as ge,ak as ue,an as ne,b as G,p as fe,aw as pe,ax as xe,e as re,q as te,t as F,K as oe,du as ie,dv as se,dw as Q,ay as he,Y as je,ac as Se,I as ae,cU as ze,cV as Ae,y as ve,P as W,dx as be}from"./index-BfSwG7jI.js";import{A as ye,b as _e}from"./alert-kBJMHqj0.js";import{i as Ce}from"./XCircle-BlZmdI-G.js";import{n as Oe}from"./LinkExternal01-B8eerp5u.js";import{s as De}from"./XClose-CnMJB9wB.js";import{u as Ne}from"./use-org-auth-client-Br2IIgta.js";import{u as we}from"./use-debounced-autosave-ypk7z-ra.js";import{A as Te}from"./avatar-CAMx88Qh.js";import{I as le}from"./input-BTAsE3JA.js";import{d as ce,S as Fe,a as ke,b as Pe,c as Ee}from"./select-B96sC0jU.js";import{A as me}from"./agent-icon-D0VUz3F6.js";import{a as Ie,i as Le,d as Me}from"./constants-dLUUoWH7.js";import{u as Re}from"./use-virtual-mcp-BKGaR5Vw.js";import{g as Ve}from"./agent-capabilities-B52k7xCe.js";import{g as $e,j as Ue}from"./use-organization-settings-CxDKMH66.js";import{C as qe}from"./review-settings-Dul3FnUR.js";import{D as Be}from"./domain-settings-Dl1fMq9O.js";import{c as Ke,d as Ge,b as Qe,f as Ye,g as He,e as We,a as Ze,A as Je}from"./alert-dialog-CADdLgiP.js";import{R as Xe}from"./require-capability-BVA_PM9d.js";import"./User01-Ck3_FIpD.js";import"./Check-BESi8Og0.js";import"./ChevronDown-D9SrOc49.js";import"./ChevronUp-DInto1b8.js";import"./AlertCircle-pzcnESJh.js";import"./UserSquare-CHnwGSuk.js";import"./Tool01-Dkl-Om1v.js";import"./ArrowUp-DMnh6s4b.js";import"./ArrowLeft-DXuRs3HX.js";import"./Tool02-BMdZDsm0.js";import"./TrendUp01-D6VAnyKs.js";import"./ZapSquare-CKPKakyU.js";import"./ZoomOut-Db6FAGuS.js";import"./Users03-Df29VRo0.js";import"./CheckCircle-DWSrREW4.js";import"./ChevronRight-PYqPsqmX.js";import"./ChevronSelectorVertical-DtCb6SRW.js";import"./DotsVertical-CH_GCWYz.js";import"./Stars02-Bbmo0zY3.js";import"./Copy01-l041cd35.js";import"./CreditCard01-p5hPt9es.js";import"./Download01-gw2mF-MC.js";import"./Settings02-Dy-2Qj4d.js";import"./Eye-Cm7KzDnH.js";import"./FilterLines-CafyJI14.js";import"./Share07-Rp0r2KZ9.js";import"./GitBranch01-Bxb2j_fZ.js";import"./Globe01-DLNdolGS.js";import"./Globe04-CViLCpme.js";import"./SwitchHorizontal01-CMuMpxZg.js";import"./HardDrive-QJn1w8tw.js";import"./Image01-B_oUPQXv.js";import"./Key01-BnQHMp8V.js";import"./LockUnlocked01-B-LL1VJN.js";import"./LogOut01-39Jb5GrZ.js";import"./Monitor01-CQB2vCrj.js";import"./Sun-CLDrV-25.js";import"./Package-5u5XI3F0.js";import"./Palette-CXA1gi33.js";import"./Play-B-a-uZIp.js";import"./Plus-DuBsnz4i.js";import"./SearchLg-B8cxnIXO.js";import"./SearchMd-TCWEaJg-.js";import"./Shield01-DtK5gafE.js";import"./Stars01-BB8IcNTL.js";import"./Trash01-l-_qVOL8.js";import"./Upload01-BLnsIrPZ.js";import"./Users01-CFzvYiuw.js";import"./Zap-I-DMHk8W.js";import"./use-mcp-client-B4byQ1wO.js";import"./auth-ltjrHdFv.js";import"./task-board-BsniqWRK.js";import"./switch-DhvugTsO.js";import"./badge-BQ00ii0C.js";import"./access-gate-D0wuDw30.js";import"./capability-load-error-weIa1Afc.js";function de(e){return`connect-banner-dismissed:${e}`}function et(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function tt(){const e=P.c(17),{org:t}=Z();let s;e[0]!==t.id?(s=()=>et(t.id),e[0]=t.id,e[1]=s):s=e[1];const[l,c]=Y.useState(s);if(l)return null;let a;e[2]!==t.id?(a=()=>{c(!0);try{localStorage.setItem(de(t.id),"1")}catch{}},e[2]=t.id,e[3]=a):a=e[3];const d=a;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Oe,{}),e[4]=m):m=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=o):o=e[5];let f;e[6]!==t.slug?(f={org:t.slug},e[6]=t.slug,e[7]=f):f=e[7];let n;e[8]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Ce,{size:12}),e[8]=n):n=e[8];let g;e[9]!==f?(g=i.jsx(ee,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:f,children:["Connect to clients ",n]})}),e[9]=f,e[10]=g):g=e[10];let r;e[11]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{size:14}),e[11]=r):r=e[11];let u;e[12]!==d?(u=i.jsx(ee,{variant:"ghost",size:"icon",className:"size-7",onClick:d,"aria-label":"Dismiss",children:r}),e[12]=d,e[13]=u):u=e[13];let p;return e[14]!==g||e[15]!==u?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(_e,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[o,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[g,u]})]})]}),e[14]=g,e[15]=u,e[16]=p):p=e[16],p}const it=ue({name:ne().min(1,"Name is required").max(255,"Name is too long"),logo:ne().optional()});function st(e){const t=P.c(17),{value:s,onChange:l,name:c,disabled:a}=e,d=G(),m=Y.useRef(null);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>m.current?.click(),t[0]=o):o=t[0];const f=o;let n;t[1]!==l||t[2]!==d?(n=O=>{const x=O.target.files?.[0];if(!x)return;if(x.size>2097152){F.error(d("settings.organizationForm.imageTooLarge"));return}const h=new FileReader;h.onerror=()=>F.error(d("settings.organizationForm.failedToReadImage")),h.onloadend=()=>{h.result&&l(h.result),m.current&&(m.current.value="")},h.readAsDataURL(x)},t[1]=l,t[2]=d,t[3]=n):n=t[3];const g=n;let r;t[4]!==d?(r=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=r):r=t[5];let u;t[6]!==a||t[7]!==g?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:g,className:"hidden",disabled:a}),t[6]=a,t[7]=g,t[8]=u):u=t[8];const p=s||void 0,j=c??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Te,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let A;return t[12]!==a||t[13]!==r||t[14]!==u||t[15]!==S?(A=i.jsxs("button",{type:"button",onClick:f,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":r,children:[u,S]}),t[12]=a,t[13]=r,t[14]=u,t[15]=S,t[16]=A):A=t[16],A}function nt(){const e=G(),{org:t}=Z(),s=Ne(),l=fe(),c=pe({resolver:xe(it),values:{name:t.name??"",logo:t.logo??""}}),a=re({mutationFn:async n=>{const g={name:n.name};n.logo&&(g.logo=n.logo);const r=await s.organization.update({data:g});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(n,g)=>{te("organization_settings_updated",{organization_id:t.id,fields:Object.keys(g)}),l.invalidateQueries({queryKey:oe.organizations()}),l.invalidateQueries({queryKey:oe.activeOrganization(t.slug)}),F.success(e("settings.organizationForm.updateSuccess"))},onError:(n,g)=>{te("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(g),error:n instanceof Error?n.message:String(n)}),F.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=we({save:async()=>{const n=c.control._formState.dirtyFields;if(Object.keys(n).length===0||!await c.trigger())return;const r=c.getValues(),u=c.control._defaultValues;c.reset(r,{keepValues:!0});try{await a.mutateAsync(r)}catch{c.reset(u,{keepValues:!0})}}}),o=c.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(ie,{children:i.jsxs(se,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(st,{value:c.watch("logo"),onChange:n=>{c.setValue("logo",n??"",{shouldDirty:!0}),m()},name:c.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(he,{control:c.control,name:"name",render:({field:n})=>i.jsx(le,{id:"org-name",...n,onChange:g=>{n.onChange(g),d()},onBlur:()=>{n.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(o.name||o.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[o.name&&i.jsx("p",{className:"text-xs text-destructive",children:o.name.message}),o.logo&&i.jsx("p",{className:"text-xs text-destructive",children:o.logo.message})]})]})})}const X="__super_agent__";function ot(){const e=P.c(42),t=G(),{org:s}=Z(),l=Re(),{mainAgentId:c}=$e(),a=Ue();let d,m,o,f,n,g,r,u;if(e[0]!==l||e[1]!==c||e[2]!==s.id||e[3]!==a||e[4]!==t){const S=Ve(l),A=(l??[]).filter(lt).filter(z=>!S.has(z.id)).filter(rt);let O;e[13]!==s.id?(O=Ie(s.id),e[13]=s.id,e[14]=O):O=e[14];const x=O,h=c!=null?(l??[]).find(z=>z.id===c):void 0,D=h?h.id:X,N=h&&!A.some(z=>z.id===h.id)?[h,...A]:A;let C;e[15]!==l||e[16]!==a||e[17]!==x.title||e[18]!==t?(C=z=>{const _=z===X?null:z,E=_===null?x.title:(l??[]).find(T=>T.id===_)?.title??"";a.mutate(_,{onSuccess:()=>F.success(_===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:E})),onError:()=>F.error(t("settings.mainAgent.errorToast"))})},e[15]=l,e[16]=a,e[17]=x.title,e[18]=t,e[19]=C):C=e[19];const w=C;m=Fe,n=D,g=w,r=a.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ke,{className:"w-full sm:w-[280px]",children:i.jsx(Pe,{})}),e[20]=u):u=e[20],d=Ee;let v;e[21]!==x.icon||e[22]!==x.title?(v=i.jsx(me,{icon:x.icon,name:x.title,size:"xs",className:"shrink-0"}),e[21]=x.icon,e[22]=x.title,e[23]=v):v=e[23];let b;e[24]!==t?(b=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=b):b=e[25];let y;e[26]!==b?(y=i.jsx("span",{className:"truncate",children:b}),e[26]=b,e[27]=y):y=e[27],e[28]!==y||e[29]!==v?(o=i.jsx(ce,{value:X,children:i.jsxs("span",{className:"flex items-center gap-2",children:[v,y]})}),e[28]=y,e[29]=v,e[30]=o):o=e[30],f=N.map(at),e[0]=l,e[1]=c,e[2]=s.id,e[3]=a,e[4]=t,e[5]=d,e[6]=m,e[7]=o,e[8]=f,e[9]=n,e[10]=g,e[11]=r,e[12]=u}else d=e[5],m=e[6],o=e[7],f=e[8],n=e[9],g=e[10],r=e[11],u=e[12];let p;e[31]!==d||e[32]!==o||e[33]!==f?(p=i.jsxs(d,{children:[o,f]}),e[31]=d,e[32]=o,e[33]=f,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==n||e[37]!==g||e[38]!==r||e[39]!==u||e[40]!==p?(j=i.jsxs(m,{value:n,onValueChange:g,disabled:r,children:[u,p]}),e[35]=m,e[36]=n,e[37]=g,e[38]=r,e[39]=u,e[40]=p,e[41]=j):j=e[41],j}function at(e){return i.jsx(ce,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(me,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function rt(e){return!Me(e.id)}function lt(e){return!Le(e.id)}function ct(){const e=P.c(16),t=G();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.mainAgent.description"),e[2]=t,e[3]=l):l=e[3];let c;e[4]!==t?(c=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=c):c=e[5];let a;e[6]!==t?(a=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=a):a=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Y.Suspense,{fallback:i.jsx(je,{className:"h-9 w-[280px]"}),children:i.jsx(ot,{})}),e[8]=d):d=e[8];let m;e[9]!==c||e[10]!==a?(m=i.jsx(se,{children:i.jsx(Q,{title:c,description:a,action:d})}),e[9]=c,e[10]=a,e[11]=m):m=e[11];let o;return e[12]!==s||e[13]!==l||e[14]!==m?(o=i.jsx(ie,{title:s,description:l,children:m}),e[12]=s,e[13]=l,e[14]=m,e[15]=o):o=e[15],o}function mt(){const e=P.c(86),t=G(),{org:s}=Z(),[l,c]=Y.useState(!1),[a,d]=Y.useState(""),m=Se();let o;e[0]!==s.id||e[1]!==m?(o=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=o):o=e[2];let f;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(f=()=>{te("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),ze()?.org===s.slug&&Ae(),ve(),F.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=f):f=e[6];let n;e[7]!==t?(n=k=>{F.error(k instanceof Error?k.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=n):n=e[8];let g;e[9]!==o||e[10]!==f||e[11]!==n?(g={mutationFn:o,onSuccess:f,onError:n},e[9]=o,e[10]=f,e[11]=n,e[12]=g):g=e[12];const r=re(g);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let A;e[21]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),e[21]=A):A=e[21];const O=r.isPending;let x;e[22]!==t?(x=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=x):x=e[23];let h;e[24]!==r.isPending||e[25]!==x?(h=i.jsx(ee,{variant:"destructive",size:"sm",onClick:A,disabled:O,children:x}),e[24]=r.isPending,e[25]=x,e[26]=h):h=e[26];let D;e[27]!==h||e[28]!==j||e[29]!==S?(D=i.jsx(se,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:S,action:h})}),e[27]=h,e[28]=j,e[29]=S,e[30]=D):D=e[30];let N;e[31]!==D||e[32]!==u||e[33]!==p?(N=i.jsx(ie,{title:u,description:p,children:D}),e[31]=D,e[32]=u,e[33]=p,e[34]=N):N=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=k=>{c(k),k||d("")},e[35]=C):C=e[35];let w;e[36]!==t?(w=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=w):w=e[37];let v;e[38]!==w?(v=i.jsx(Ke,{children:w}),e[38]=w,e[39]=v):v=e[39];let b;e[40]!==s.name||e[41]!==t?(b=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=b):b=e[42];let y;e[43]!==b?(y=i.jsx("p",{children:b}),e[43]=b,e[44]=y):y=e[44];let z;e[45]!==s.name||e[46]!==t?(z=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=z):z=e[47];let _;e[48]!==z?(_=i.jsx("p",{className:"mt-3 mb-1.5",children:z}),e[48]=z,e[49]=_):_=e[49];let E;e[50]===Symbol.for("react.memo_cache_sentinel")?(E=k=>d(k.target.value),e[50]=E):E=e[50];let T;e[51]!==a||e[52]!==s.name?(T=i.jsx(le,{value:a,onChange:E,placeholder:s.name,autoFocus:!0}),e[51]=a,e[52]=s.name,e[53]=T):T=e[53];let I;e[54]!==y||e[55]!==_||e[56]!==T?(I=i.jsx(Ge,{asChild:!0,children:i.jsxs("div",{children:[y,_,T]})}),e[54]=y,e[55]=_,e[56]=T,e[57]=I):I=e[57];let L;e[58]!==v||e[59]!==I?(L=i.jsxs(Qe,{children:[v,I]}),e[58]=v,e[59]=I,e[60]=L):L=e[60];let M;e[61]!==t?(M=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=M):M=e[62];let R;e[63]!==M?(R=i.jsx(Ye,{children:M}),e[63]=M,e[64]=R):R=e[64];let V;e[65]!==r?(V=()=>r.mutate(),e[65]=r,e[66]=V):V=e[66];const J=a!==s.name||r.isPending;let $;e[67]!==r.isPending||e[68]!==t?($=r.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=r.isPending,e[68]=t,e[69]=$):$=e[69];let U;e[70]!==V||e[71]!==J||e[72]!==$?(U=i.jsx(He,{onClick:V,disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:$}),e[70]=V,e[71]=J,e[72]=$,e[73]=U):U=e[73];let q;e[74]!==R||e[75]!==U?(q=i.jsxs(We,{children:[R,U]}),e[74]=R,e[75]=U,e[76]=q):q=e[76];let B;e[77]!==L||e[78]!==q?(B=i.jsxs(Ze,{children:[L,q]}),e[77]=L,e[78]=q,e[79]=B):B=e[79];let K;e[80]!==l||e[81]!==B?(K=i.jsx(Je,{open:l,onOpenChange:C,children:B}),e[80]=l,e[81]=B,e[82]=K):K=e[82];let H;return e[83]!==N||e[84]!==K?(H=i.jsxs(i.Fragment,{children:[N,K]}),e[83]=N,e[84]=K,e[85]=H):H=e[85],H}function dt(){const e=P.c(12),t=G();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==s?(l=i.jsx(W.Title,{children:s}),e[2]=s,e[3]=l):l=e[3];let c,a,d,m,o,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(tt,{}),a=i.jsx(nt,{}),d=i.jsx(ct,{}),m=i.jsx(qe,{}),o=i.jsx(Be,{}),f=i.jsx(mt,{}),e[4]=c,e[5]=a,e[6]=d,e[7]=m,e[8]=o,e[9]=f):(c=e[4],a=e[5],d=e[6],m=e[7],o=e[8],f=e[9]);let n;return e[10]!==l?(n=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(be,{children:[l,c,a,d,m,o,f]})})})}),e[10]=l,e[11]=n):n=e[11],n}function ki(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Xe,{capability:"org:manage",area:"general settings",children:i.jsx(dt,{})}),e[0]=t):t=e[0],t}export{ki as default};
@@ -1 +0,0 @@
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-BfSwG7jI.js";import{i as os}from"./AlertCircle-pzcnESJh.js";import{t as rs}from"./ChevronDown-D9SrOc49.js";import{i as cs}from"./ChevronRight-PYqPsqmX.js";import{s as is}from"./Stars02-Bbmo0zY3.js";import{a as ms}from"./Copy01-l041cd35.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-D0VUz3F6.js";import{i as Nt}from"./Globe01-DLNdolGS.js";import{n as es}from"./LinkExternal01-B8eerp5u.js";import{s as Vt}from"./Plus-DuBsnz4i.js";import{l as Bt}from"./UserSquare-CHnwGSuk.js";import{s as Ot}from"./Trash01-l-_qVOL8.js";import{i as xs}from"./Zap-I-DMHk8W.js";import{B as de}from"./badge-BQ00ii0C.js";import{I as lt}from"./input-BTAsE3JA.js";import{L as ht}from"./label-CvqDH6pp.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-CADdLgiP.js";import{a as Ht,b as Mt,c as Wt,d as Kt,e as Qt}from"./dialog-4i8tKyZs.js";import{S as Yt,a as Xt,b as Zt,c as Gt,d as jt}from"./select-B96sC0jU.js";import{c as tt,e as ot,a as ye,d as I,b as st,T as V}from"./table-CBDqSL5J.js";import{E as Pt}from"./empty-state-CI1Sx67B.js";import{a as bs}from"./use-virtual-mcp-BKGaR5Vw.js";import{r as ps}from"./index-Shv9_4go.js";import"./Tool01-Dkl-Om1v.js";import"./ArrowUp-DMnh6s4b.js";import"./ArrowLeft-DXuRs3HX.js";import"./Tool02-BMdZDsm0.js";import"./XCircle-BlZmdI-G.js";import"./TrendUp01-D6VAnyKs.js";import"./ZapSquare-CKPKakyU.js";import"./ZoomOut-Db6FAGuS.js";import"./Users03-Df29VRo0.js";import"./CheckCircle-DWSrREW4.js";import"./Check-BESi8Og0.js";import"./ChevronSelectorVertical-DtCb6SRW.js";import"./ChevronUp-DInto1b8.js";import"./DotsVertical-CH_GCWYz.js";import"./CreditCard01-p5hPt9es.js";import"./Download01-gw2mF-MC.js";import"./Settings02-Dy-2Qj4d.js";import"./Eye-Cm7KzDnH.js";import"./FilterLines-CafyJI14.js";import"./Share07-Rp0r2KZ9.js";import"./GitBranch01-Bxb2j_fZ.js";import"./Globe04-CViLCpme.js";import"./SwitchHorizontal01-CMuMpxZg.js";import"./HardDrive-QJn1w8tw.js";import"./Image01-B_oUPQXv.js";import"./Key01-BnQHMp8V.js";import"./LockUnlocked01-B-LL1VJN.js";import"./LogOut01-39Jb5GrZ.js";import"./Monitor01-CQB2vCrj.js";import"./Sun-CLDrV-25.js";import"./Package-5u5XI3F0.js";import"./Palette-CXA1gi33.js";import"./Play-B-a-uZIp.js";import"./SearchLg-B8cxnIXO.js";import"./SearchMd-TCWEaJg-.js";import"./Shield01-DtK5gafE.js";import"./Stars01-BB8IcNTL.js";import"./Upload01-BLnsIrPZ.js";import"./User01-Ck3_FIpD.js";import"./Users01-CFzvYiuw.js";import"./XClose-CnMJB9wB.js";import"./use-mcp-client-B4byQ1wO.js";import"./constants-dLUUoWH7.js";import"./auth-ltjrHdFv.js";import"./chat-context-BNnytLLb.js";import"./use-panel-navigate-BxQr2f1i.js";import"./use-destination-route-ChWdmqCT.js";import"./thread-route-X2aYk-A-.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-C0P3-Ouc.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C6zMztYI.js";import"./task-board-BsniqWRK.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DS9TpJ7R.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-5HPG38qC.js";import"./use-organization-settings-CxDKMH66.js";import"./automation-runs-DfK0VSMx.js";import"./useInfiniteQuery-BXzx91qu.js";import"./use-infinite-scroll-Dd5C23ac.js";import"./use-connection-BudxFSJ1.js";import"./empty-state-TkGPHkkR.js";import"./use-members-pG405IAQ.js";import"./use-org-auth-client-Br2IIgta.js";import"./use-automations-fmUj9duL.js";import"./useSuspenseInfiniteQuery-ByKcG5VI.js";import"./avatar-CAMx88Qh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BLd03kFT.js";import"./markdown-BIiViQno.js";import"./monaco-editor-BBOBGlaR.js";import"./spinner-CBT7H6Nj.js";import"./editor-B0xnuCCp.js";import"./types-M5Xw3OeR.js";import"./shell-layout-Bpk7ohiD.js";import"./required-auth-layout-CT5fghv3.js";import"./use-org-sso-B4Tot0-C.js";import"./integration-icon-RkVfBWiU.js";import"./use-navigate-to-agent-BhD-C3eq.js";import"./chart-C5ZFqDIF.js";import"./index-BmAm7rGx.js";import"./AreaChart-BBl3HuXM.js";import"./form-DqHZuRjN.js";import"./file-type-icon-6Mfusmw2.js";import"./drawer-BOqo92AD.js";import"./collection-search-CfmsG6EB.js";import"./tabs-BHzFvM3d.js";import"./toggle-group-DPowLvjC.js";import"./super-agent-icon-CcEEod1i.js";import"./self-tool-result-4Q8hQ6Im.js";import"./extract-connection-data-BAHgy3b5.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-C5uG6eOe.js";import"./authenticate-and-persist-oauth-C5WoxICz.js";import"./mcp-oauth-CpjxOVqq.js";import"./track-C6ehW_55.js";import"./popover-Ds86LKX0.js";import"./toolbar-C_LYTIqP.js";import"./github-repo-picker-BT0gAgwT.js";import"./use-mcp-tools-Bb7R3ndw.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-CrXfxqk-.js";import"./use-registry-connections-m9TXCiaY.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-W0cHs7kb.js";import"./connection-form-helpers-kZEDJqLp.js";import"./collection-tabs-BMjNkk-e.js";import"./select-model-DKInz36h.js";import"./checkbox-8NR47DPn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Cb7l5H7F.js";import"./dropdown-menu-DHdxnqdQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8QrmHEw.js";import"./skill-preview-B1BayRfx.js";import"./use-file-configs-C9ZZlKNd.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-ypk7z-ra.js";import"./scroll-area-DOLH1hgj.js";import"./search-input-CeEId8JN.js";import"./use-mcp-auth-status-Cptezoi_.js";import"./switch-DhvugTsO.js";import"./use-secrets-CANXygBX.js";import"./config-F76h-4Nb.js";import"./command-B4vg3kev.js";import"./index-ChRU4p6-.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-Bbul4qd6.js";import"./use-tags-BokBbgMx.js";import"./automation-list-row-S8Kym9UP.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-vOy2V2LC.js";import"./cards-CBOWo6Jv.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 +0,0 @@
1
- import{c as T,H as S,u as b,j as h,ah as E,N as A}from"./index-BfSwG7jI.js";import{u as P}from"./use-virtual-mcp-BKGaR5Vw.js";import{D as u}from"./use-destination-route-ChWdmqCT.js";import{g as v}from"./use-organization-settings-CxDKMH66.js";import"./use-mcp-client-B4byQ1wO.js";import"./constants-dLUUoWH7.js";import"./auth-ltjrHdFv.js";import"./task-board-BsniqWRK.js";const _={board:u.tasks,files:u.library,reports:u.reports,overview:u.home};function M(e){return!!e&&e in _}function U(){const e=T.c(34),{org:o}=S(),{mainAgentId:x,isPending:I}=v(),N=P();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={strict:!1},e[0]=g):g=e[0];const{connect:l,siteUrl:i,main:n,task:j,sidepanel:a}=b(g);if(I){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=h.jsx(E,{}),e[1]=t):t=e[1],t}if(M(n)){const t=_[n];let s;e[2]!==o.slug?(s={org:o.slug},e[2]=o.slug,e[3]=s):s=e[3];let r;e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==j?(r={connect:l,siteUrl:i,task:j,sidepanel:a},e[4]=l,e[5]=a,e[6]=i,e[7]=j,e[8]=r):r=e[8];let d;return e[9]!==t||e[10]!==s||e[11]!==r?(d=h.jsx(A,{to:t,params:s,search:r,replace:!0}),e[9]=t,e[10]=s,e[11]=r,e[12]=d):d=e[12],d}const f=x!=null&&(N??[]).some(t=>t.id===x)?x:null;if(f){let t;e[13]!==o.slug||e[14]!==f?(t={org:o.slug,project:f,panel:void 0},e[13]=o.slug,e[14]=f,e[15]=t):t=e[15];let s;e[16]!==l||e[17]!==n||e[18]!==a||e[19]!==i?(s={connect:l,siteUrl:i,sidepanel:a,main:n},e[16]=l,e[17]=n,e[18]=a,e[19]=i,e[20]=s):s=e[20];let r;return e[21]!==t||e[22]!==s?(r=h.jsx(A,{to:u.agents,params:t,search:s,replace:!0}),e[21]=t,e[22]=s,e[23]=r):r=e[23],r}let c;e[24]!==o.slug?(c={org:o.slug},e[24]=o.slug,e[25]=c):c=e[25];let m;e[26]!==l||e[27]!==n||e[28]!==a||e[29]!==i?(m={connect:l,siteUrl:i,sidepanel:a,main:n},e[26]=l,e[27]=n,e[28]=a,e[29]=i,e[30]=m):m=e[30];let p;return e[31]!==c||e[32]!==m?(p=h.jsx(A,{to:u.home,params:c,search:m,replace:!0}),e[31]=c,e[32]=m,e[33]=p):p=e[33],p}export{U as default};
@@ -1 +0,0 @@
1
- import{c as _,d as B,H as E,b as $,I as Pt,j as s,B as Ae,r as O,E as nt,J as Rt,z as zt,K as ot,e as Ee,q as L,M as U,R as it,U as Le,W as Ue,X as T,Y as F,n as M,Z as z,_ as P,$ as lt,a0 as Et,a1 as rt,a2 as Tt,a3 as at,a as de,a4 as Dt,x as ct,a5 as mt,t as dt,a6 as Ft,a7 as Lt,a8 as Ut,a9 as Bt,aa as Kt,ab as qt,ac as Wt,p as Ht,ad as Te,L as He,u as Gt,ae as Yt,O as Qt,af as Vt,ag as Xt,ah as Jt}from"./index-BfSwG7jI.js";import{a as Zt,p as ze,s as es,b as ts,n as ss}from"./self-tool-result-4Q8hQ6Im.js";import{f as ns,b as os,e as is,g as ls}from"./dialog-4i8tKyZs.js";import{c as rs,C as as,a as cs,O as ft,A as ms,u as ds,t as ut,S as fs,b as us,d as ps,e as xs}from"./super-agent-icon-CcEEod1i.js";import{u as hs}from"./use-mcp-client-B4byQ1wO.js";import{C as bs,W as De,S as gs}from"./constants-dLUUoWH7.js";import{i as pt}from"./XCircle-BlZmdI-G.js";import{u as js,a as vs}from"./use-organization-settings-CxDKMH66.js";import{T as xt,a as ae}from"./toolbar-C_LYTIqP.js";import{P as ht,a as Be,b as bt}from"./popover-Ds86LKX0.js";import{D as ys,a as Ss,b as _s}from"./drawer-BOqo92AD.js";import{A as $e}from"./avatar-CAMx88Qh.js";import{a as Ns}from"./Copy01-l041cd35.js";import{n as Cs}from"./Download01-gw2mF-MC.js";import{i as ks,a as ws,b as Is,c as $s,t as gt,d as As,e as Ms,A as Os}from"./agent-icon-D0VUz3F6.js";import{i as Ps}from"./Globe01-DLNdolGS.js";import{n as Rs}from"./LinkExternal01-B8eerp5u.js";import{i as Ge}from"./LogOut01-39Jb5GrZ.js";import{i as zs}from"./Monitor01-CQB2vCrj.js";import{n as Es,a as Ts}from"./Sun-CLDrV-25.js";import{a as fe}from"./Settings02-Dy-2Qj4d.js";import{i as Ds}from"./Shield01-DtK5gafE.js";import{t as Fs}from"./UserSquare-CHnwGSuk.js";import{a as Ls}from"./Users03-Df29VRo0.js";import{u as Us}from"./use-deployment-admin-B0bHz9Kb.js";import{u as Bs}from"./use-is-desktop-app-BNujXJc_.js";import{i as Ks,a as Ye,D as qs,u as Ws,b as Hs}from"./thread-route-X2aYk-A-.js";import{a as Gs,n as Ys}from"./ZapSquare-CKPKakyU.js";import{I as jt}from"./invite-member-dialog-DiGxeKHf.js";import{n as Ke}from"./Stars02-Bbmo0zY3.js";import{S as Qs}from"./scroll-area-DOLH1hgj.js";import{u as Vs}from"./useInfiniteQuery-BXzx91qu.js";import{n as Xs}from"./decopilot-sse-pool-C6zMztYI.js";import{i as Js}from"./ChevronRight-PYqPsqmX.js";import{g as Zs}from"./get-initials-D-f_fDFw.js";import{a as en}from"./format-time-BnbuEtat.js";import{i as tn}from"./Share07-Rp0r2KZ9.js";import{u as sn}from"./use-virtual-mcp-BKGaR5Vw.js";import{u as nn,T as on}from"./hooks-C0P3-Ouc.js";import{g as ln,a as rn,b as an,c as cn}from"./agent-capabilities-B52k7xCe.js";import{u as vt,D as R}from"./use-destination-route-ChWdmqCT.js";import{S as yt}from"./use-navigate-to-agent-BhD-C3eq.js";import{S as St,M as mn}from"./shell-controls-j00j0s1I.js";import{C as dn}from"./chat-context-BNnytLLb.js";import"./alert-dialog-CADdLgiP.js";import"./form-DqHZuRjN.js";import"./label-CvqDH6pp.js";import"./input-BTAsE3JA.js";import"./spinner-CBT7H6Nj.js";import"./integration-icon-RkVfBWiU.js";import"./Tool02-BMdZDsm0.js";import"./extract-connection-data-BAHgy3b5.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./CheckCircle-DWSrREW4.js";import"./Check-BESi8Og0.js";import"./Eye-Cm7KzDnH.js";import"./use-debounced-value-C5uG6eOe.js";import"./authenticate-and-persist-oauth-C5WoxICz.js";import"./mcp-oauth-CpjxOVqq.js";import"./auth-ltjrHdFv.js";import"./track-C6ehW_55.js";import"./ChevronDown-D9SrOc49.js";import"./Plus-DuBsnz4i.js";import"./SearchMd-TCWEaJg-.js";import"./XClose-CnMJB9wB.js";import"./github-repo-picker-BT0gAgwT.js";import"./collection-search-CfmsG6EB.js";import"./use-connection-BudxFSJ1.js";import"./ArrowLeft-DXuRs3HX.js";import"./LockUnlocked01-B-LL1VJN.js";import"./use-mcp-tools-Bb7R3ndw.js";import"./shell-layout-Bpk7ohiD.js";import"./SearchLg-B8cxnIXO.js";import"./FilterLines-CafyJI14.js";import"./Zap-I-DMHk8W.js";import"./required-auth-layout-CT5fghv3.js";import"./use-panel-navigate-BxQr2f1i.js";import"./use-org-sso-B4Tot0-C.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./connection-card-CrXfxqk-.js";import"./use-registry-connections-m9TXCiaY.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./select-B96sC0jU.js";import"./ChevronUp-DInto1b8.js";import"./textarea-W0cHs7kb.js";import"./connection-form-helpers-kZEDJqLp.js";import"./Trash01-l-_qVOL8.js";import"./collection-tabs-BMjNkk-e.js";import"./badge-BQ00ii0C.js";import"./use-infinite-scroll-Dd5C23ac.js";import"./useSuspenseInfiniteQuery-ByKcG5VI.js";import"./use-ai-providers-DS9TpJ7R.js";import"./task-board-BsniqWRK.js";import"./User01-Ck3_FIpD.js";import"./AlertCircle-pzcnESJh.js";import"./Tool01-Dkl-Om1v.js";import"./ArrowUp-DMnh6s4b.js";import"./TrendUp01-D6VAnyKs.js";import"./ZoomOut-Db6FAGuS.js";import"./ChevronSelectorVertical-DtCb6SRW.js";import"./DotsVertical-CH_GCWYz.js";import"./CreditCard01-p5hPt9es.js";import"./GitBranch01-Bxb2j_fZ.js";import"./Globe04-CViLCpme.js";import"./SwitchHorizontal01-CMuMpxZg.js";import"./HardDrive-QJn1w8tw.js";import"./Image01-B_oUPQXv.js";import"./Key01-BnQHMp8V.js";import"./Package-5u5XI3F0.js";import"./Palette-CXA1gi33.js";import"./Play-B-a-uZIp.js";import"./Stars01-BB8IcNTL.js";import"./Upload01-BLnsIrPZ.js";import"./Users01-CFzvYiuw.js";import"./use-org-auth-client-Br2IIgta.js";import"./use-organization-roles-qSoCa9ga.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-5HPG38qC.js";function fn(t){const e=_.c(21),{siteUrl:n}=t,i=B(),{org:o}=E(),l=$();let r;e[0]!==i||e[1]!==o?(r=()=>{localStorage.setItem(Pt.sidebarOpen(),JSON.stringify(!1)),i({...rs(o,De.COMMERCE_DISCOVERY(o.id)),search:{connection:De.COMMERCE_DISCOVERY(o.id),tool:bs,sidepanel:!1}})},e[0]=i,e[1]=o,e[2]=r):r=e[2];const a=r;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ns,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=m):m=e[3];let c;e[4]!==l?(c=l("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=l,e[5]=c):c=e[5];let f;e[6]!==c?(f=s.jsx(os,{className:"sr-only",children:c}),e[6]=c,e[7]=f):f=e[7];let d;e[8]!==a||e[9]!==l?(d=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:l("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Ae,{type:"button",size:"xl",className:"w-full",onClick:a,children:[l("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(pt,{size:18})]})]}),e[8]=a,e[9]=l,e[10]=d):d=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Zt,{}),e[11]=p):p=e[11];let u;e[12]!==a||e[13]!==n?(u=s.jsx(O.Suspense,{fallback:p,children:s.jsx(hn,{siteUrlFromUrl:n,onComplete:a})}),e[12]=a,e[13]=n,e[14]=u):u=e[14];let x;e[15]!==d||e[16]!==u?(x=s.jsx(nt,{fallback:d,children:u}),e[15]=d,e[16]=u,e[17]=x):x=e[17];let h;return e[18]!==f||e[19]!==x?(h=s.jsx(is,{open:!0,children:s.jsxs(ls,{children:[m,s.jsxs(Rt,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:xn,onPointerDownOutside:pn,onInteractOutside:un,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[f,x]})]})}),e[18]=f,e[19]=x,e[20]=h):h=e[20],h}function un(t){return t.preventDefault()}function pn(t){return t.preventDefault()}function xn(t){return t.preventDefault()}function hn({siteUrlFromUrl:t,onComplete:e}){const n=$(),{org:i}=E(),o=De.COMMERCE_DISCOVERY(i.id),l=hs({connectionId:gs,orgId:i.id,orgSlug:i.slug}),a=zt({queryKey:ot.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const v=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(v)},retry:!1}).data.item,m=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||m,f=es(c),[d,p]=O.useState(!0),[u,x]=O.useState(null),h=Ee({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=Ee({mutationFn:async v=>ze(await l.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),b=async()=>{x(null),L("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:i.id});const v=c?ss(c):null;if(v?.ok)try{let y=await g.mutateAsync(v.value);if(y.triggered||(L("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:i.id,reason:y.reason??"not_upgraded"}),await h.mutateAsync(v.value),y=await g.mutateAsync(v.value)),!y.triggered){L("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:i.id,error:y.reason??"not_triggered"}),x(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(y){L("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),x(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=js("demo_mode"),S=d||j;return s.jsx(as,{siteHost:f,footer:s.jsxs(s.Fragment,{children:[u?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(cs,{ready:S,pending:g.isPending,label:g.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{b()},children:s.jsx(pt,{size:18})})}),S?null:s.jsx(Ae,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:g.isPending,onClick:()=>{b()},children:n("routes.commerceOnboarding.connectModal.skip")})]})]}),children:s.jsx(ts,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function bn(t){const e=_.c(11),{onPointerDown:n,onDoubleClick:i}=t,o=$(),{state:l,isMobile:r}=U();if(r||l==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let c,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=f):(c=e[4],f=e[5]);let d;return e[6]!==i||e[7]!==n||e[8]!==a||e[9]!==m?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:m,onPointerDown:n,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:f}),e[6]=i,e[7]=n,e[8]=a,e[9]=m,e[10]=d):d=e[10],d}const qe=240,gn=400,jn="sidebar.width";function me(t){return Math.max(qe,Math.min(gn,t))}function vn(){const t=_.c(11),[e,n]=it(jn,yn),i=O.useRef(null);let o;t[0]!==n||t[1]!==e?(o=f=>{f.preventDefault();const d=f.clientX,p=me(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of x)b.style.transition="none";const h=b=>{const j=me(p+(b.clientX-d));u?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=me(p+(b.clientX-d));n(j);for(const S of x)S.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const l=o;let r;t[3]!==n?(r=()=>{n(qe)},t[3]=n,t[4]=r):r=t[4];const a=r;let m;t[5]!==e?(m=me(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==l||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:i,onStartResize:l,resetWidth:a},t[7]=l,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function yn(t){return typeof t=="number"?me(t):qe}function _t(){return[]}function Nt(t){const e=_.c(3),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=s.jsxs(Le,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(Ue,{children:s.jsx(T,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function Ct(t){const e=_.c(18),{item:n}=t,{isMobile:i,setOpenMobile:o}=U();let l;e[0]!==i||e[1]!==n||e[2]!==o?(l=()=>{L("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:i}),n.onClick?.(),i&&o(!1)},e[0]=i,e[1]=n,e[2]=o,e[3]=l):l=e[3];const r=l,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=M(m),e[4]=m,e[5]=c):c=e[5];let f;e[6]!==n.label?(f=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=f):f=e[7];let d;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==f?(d=s.jsxs(z,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,f]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=f,e[13]=d):d=e[13];let p;return e[14]!==n.key||e[15]!==c||e[16]!==d?(p=s.jsx(P,{className:c,children:d},a),e[14]=n.key,e[15]=c,e[16]=d,e[17]=p):p=e[17],p}function Sn(t){const e=_.c(12),{section:n}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(lt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,o=n.group.defaultExpanded;let l;e[2]!==n.group.items?(l=n.group.items.map(Nn),e[2]=n.group.items,e[3]=l):l=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==l?(r=s.jsx(Nt,{label:i,defaultExpanded:o,children:l}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=l,e[7]=r):r=e[7],r}case"items":{let i;e[8]!==n.items?(i=n.items.map(_n),e[8]=n.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=s.jsx(Le,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ue,{children:s.jsx(T,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return n.content}}function _n(t){return s.jsx(Ct,{item:t},t.key)}function Nn(t){return s.jsx(Ct,{item:t},t.key)}function Cn(t){const e=_.c(17),{sections:n,footer:i,additionalContent:o,header:l,variant:r,contentClassName:a}=t,m=r===void 0?"sidebar":r;let c;e[0]!==l?(c=l&&s.jsx(Et,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:l}),e[0]=l,e[1]=c):c=e[1];let f;e[2]!==a?(f=M("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=f):f=e[3];let d;e[4]!==n?(d=n.map(kn),e[4]=n,e[5]=d):d=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==f||e[9]!==d||e[10]!==p?(u=s.jsxs(rt,{className:f,children:[d,p]}),e[8]=f,e[9]=d,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==m?(x=s.jsxs(Tt,{variant:m,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=m,e[16]=x):x=e[16],x}function kn(t,e){return s.jsx(Sn,{section:t},e)}function kt(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Cn,{...t}),e[0]=t,e[1]=n):n=e[1],n}kt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(F,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Qe(t){const e=_.c(18),{item:n,onClose:i}=t,o=n.isActive&&"z-10";let l;e[0]!==o?(l=M(o),e[0]=o,e[1]=l):l=e[1];let r;e[2]!==n||e[3]!==i?(r=()=>{n.onClick?.(),i()},e[2]=n,e[3]=i,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==m?(c=s.jsxs(z,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=m,e[14]=c):c=e[14];let f;return e[15]!==l||e[16]!==c?(f=s.jsx(P,{className:l,children:c}),e[15]=l,e[16]=c,e[17]=f):f=e[17],f}function wn(t){const e=_.c(18),{section:n,onClose:i}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,l=n.group.defaultExpanded;let r;if(e[2]!==i||e[3]!==n.group.items){let m;e[5]!==i?(m=c=>s.jsx(Qe,{item:c,onClose:i},c.key),e[5]=i,e[6]=m):m=e[6],r=n.group.items.map(m),e[2]=i,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(Nt,{label:o,defaultExpanded:l,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==i||e[12]!==n.items){let r;e[14]!==i?(r=a=>s.jsx(Qe,{item:a,onClose:i},a.key),e[14]=i,e[15]=r):r=e[15],o=n.items.map(r),e[11]=i,e[12]=n.items,e[13]=o}else o=e[13];let l;return e[16]!==o?(l=s.jsx(Le,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ue,{children:s.jsx(T,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=l):l=e[17],l}case"custom":return n.content}}function In(t){const e=_.c(27),{sections:n,onClose:i,footer:o,additionalContent:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ft,{}),e[0]=r):r=e[0];let a;e[1]!==i?(a=s.jsx(ms,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex-1"}),e[3]=m):m=e[3];const c=$();let f;e[4]!==c?(f=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=f):f=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(at,{size:16}),e[6]=d):d=e[6];let p;e[7]!==i||e[8]!==f?(p=s.jsx(xt,{onClick:i,"aria-label":f,children:d}),e[7]=i,e[8]=f,e[9]=p):p=e[9];let u;e[10]!==a||e[11]!==p?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,m,p]}),e[10]=a,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==n){let j;e[16]!==i?(j=(S,v)=>s.jsx(wn,{section:S,onClose:i},v),e[16]=i,e[17]=j):j=e[17],x=n.map(j),e[13]=i,e[14]=n,e[15]=x}else x=e[15];let h;e[18]!==l?(h=l&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:l}),e[18]=l,e[19]=h):h=e[19];let g;e[20]!==h||e[21]!==x?(g=s.jsxs(rt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,h]}),e[20]=h,e[21]=x,e[22]=g):g=e[22];let b;return e[23]!==o||e[24]!==g||e[25]!==u?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,g,o]}),e[23]=o,e[24]=g,e[25]=u,e[26]=b):b=e[26],b}function ce(t){const e=_.c(26),{item:n,onClose:i}=t;let o;e[0]!==n.className?(o=M("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=o):o=e[1];const l=o;if(n.href){const f=n.external?"_blank":void 0,d=n.external?"noopener noreferrer":void 0;let p;e[2]!==n.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=p):p=e[3];let u;e[4]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==n.href||e[8]!==i||e[9]!==f||e[10]!==d||e[11]!==p||e[12]!==u?(x=s.jsxs("a",{href:n.href,target:f,rel:d,className:l,onClick:i,children:[p,u]}),e[6]=l,e[7]=n.href,e[8]=i,e[9]=f,e[10]=d,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==n||e[15]!==i?(r=()=>{n.onClick?.(),i()},e[14]=n,e[15]=i,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:r,className:l,children:[a,m]}),e[21]=l,e[22]=r,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function $n(){const t=_.c(4),e=$();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let i;return t[2]!==n?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:n}),t[2]=n,t[3]=i):i=t[3],i}function Ve(t){const e=_.c(38),{user:n,userImage:i,isImpersonating:o,isMobile:l}=t,r=$(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let m;e[0]!==a?(m=M("flex items-center gap-3 px-4",a),e[0]=a,e[1]=m):m=e[1];const c=n?.name??"U";let f;e[2]!==c||e[3]!==i?(f=s.jsx($e,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=f):f=e[4];let d;e[5]!==r||e[6]!==n?.name?(d=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=d):d=e[7];let p;e[8]!==d?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:d}),e[8]=d,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&s.jsx($n,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const h=n?.email;let g;e[15]!==h?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=g):g=e[16];let b;e[17]!==g||e[18]!==x?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,g]}),e[17]=g,e[18]=x,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{dt.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ns,{size:14}),e[23]=S):S=e[23];let v;e[24]!==j?(v=s.jsx(Ut,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:S})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let N;e[28]!==y?(N=s.jsx(Bt,{side:"right",children:s.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=N):N=e[29];let k;e[30]!==v||e[31]!==N?(k=s.jsx(Kt,{delayDuration:300,children:s.jsxs(qt,{children:[v,N]})}),e[30]=v,e[31]=N,e[32]=k):k=e[32];let C;return e[33]!==b||e[34]!==k||e[35]!==m||e[36]!==f?(C=s.jsxs("div",{className:m,children:[f,b,k]}),e[33]=b,e[34]=k,e[35]=m,e[36]=f,e[37]=C):C=e[37],C}function Xe(t){const e=_.c(35),{themeOptions:n,preferences:i,setPreferences:o,isMobile:l}=t,r=$(),a=l?"size-8":"size-7",m=l?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==m?(c=M("flex items-center justify-between border-t border-border/50",m),e[0]=m,e[1]=c):c=e[1];let f;if(e[2]!==a||e[3]!==i.theme||e[4]!==o||e[5]!==n){let y;e[7]!==a||e[8]!==i.theme||e[9]!==o?(y=N=>{const{value:k,icon:C,label:w}=N;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(I=>({...I,theme:k})),className:M(a,"rounded-md flex items-center justify-center transition-colors",i.theme===k?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:C},k)},e[7]=a,e[8]=i.theme,e[9]=o,e[10]=y):y=e[10],f=n.map(y),e[2]=a,e[3]=i.theme,e[4]=o,e[5]=n,e[6]=f}else f=e[6];let d;e[11]!==f?(d=s.jsx("div",{className:"flex items-center gap-0.5",children:f}),e[11]=f,e[12]=d):d=e[12];let p;e[13]!==i.enableSounds||e[14]!==r?(p=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(An),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==a||e[19]!==x?(h=M(a,"rounded-md flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=h):h=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?s.jsx(ws,{size:14}):s.jsx(Is,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let b;e[23]!==p||e[24]!==u||e[25]!==h||e[26]!==g?(b=s.jsx("button",{type:"button","aria-label":p,onClick:u,className:h,children:g}),e[23]=p,e[24]=u,e[25]=h,e[26]=g,e[27]=b):b=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.316.7"]}),e[28]=j):j=e[28];let S;e[29]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=S):S=e[30];let v;return e[31]!==S||e[32]!==c||e[33]!==d?(v=s.jsxs("div",{className:c,children:[d,S]}),e[31]=S,e[32]=c,e[33]=d,e[34]=v):v=e[34],v}function An(t){return{...t,enableSounds:!t.enableSounds}}function Je(t){const e=_.c(54),{user:n,userImage:i,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:f,close:d,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==n||e[2]!==i?(v=s.jsx(Ve,{user:n,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=i,e[3]=v):v=e[3];let y;if(e[4]!==d||e[5]!==o){let A;e[7]!==d?(A=D=>s.jsx(ce,{item:D,onClose:d},D.key),e[7]=d,e[8]=A):A=e[8],y=o.map(A),e[4]=d,e[5]=o,e[6]=y}else y=e[6];let N;e[9]!==d||e[10]!==r?(N=r&&s.jsx(ce,{item:r,onClose:d}),e[9]=d,e[10]=r,e[11]=N):N=e[11];let k;e[12]!==d||e[13]!==l?(k=s.jsx(ce,{item:l,onClose:d}),e[12]=d,e[13]=l,e[14]=k):k=e[14];let C;e[15]!==y||e[16]!==N||e[17]!==k?(C=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[y,N,k]})}),e[15]=y,e[16]=N,e[17]=k,e[18]=C):C=e[18];let w;e[19]!==c||e[20]!==f||e[21]!==m?(w=s.jsx(Xe,{themeOptions:m,preferences:c,setPreferences:f,isMobile:!0}),e[19]=c,e[20]=f,e[21]=m,e[22]=w):w=e[22];let I;return e[23]!==v||e[24]!==C||e[25]!==w?(I=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,C,w]}),e[23]=v,e[24]=C,e[25]=w,e[26]=I):I=e[26],I}let u;e[27]!==a||e[28]!==n||e[29]!==i?(u=s.jsx(Ve,{user:n,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==d||e[32]!==o){let v;e[34]!==d?(v=y=>s.jsx(ce,{item:y,onClose:d},y.key),e[34]=d,e[35]=v):v=e[35],x=o.map(v),e[31]=d,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==d||e[37]!==r?(h=r&&s.jsx(ce,{item:r,onClose:d}),e[36]=d,e[37]=r,e[38]=h):h=e[38];let g;e[39]!==d||e[40]!==l?(g=s.jsx(ce,{item:l,onClose:d}),e[39]=d,e[40]=l,e[41]=g):g=e[41];let b;e[42]!==x||e[43]!==h||e[44]!==g?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,g]}),e[42]=x,e[43]=h,e[44]=g,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==f||e[48]!==m?(j=s.jsx(Xe,{themeOptions:m,preferences:c,setPreferences:f,isMobile:!1}),e[46]=c,e[47]=f,e[48]=m,e[49]=j):j=e[49];let S;return e[50]!==u||e[51]!==b||e[52]!==j?(S=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[u,b,j]})}),e[50]=u,e[51]=b,e[52]=j,e[53]=S):S=e[53],S}function Fe(){const t=_.c(107),e=$(),{data:n}=de.useSession(),{org:i}=E(),o=B();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=Dt(l)?.params.org,[m,c]=ct(),f=mt(),{isAdmin:d}=Us(),p=Bs(),[u,x]=O.useState(!1),[h,g]=O.useState(!1),b=n?.user,j=b?.image,S=!!n?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>x(!1),t[1]=v):v=t[1];const y=v;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let k;t[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(fe,{size:16}),t[4]=k):k=t[4];let C;t[5]!==o||t[6]!==a?(C=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=C):C=t[7];let w;t[8]!==N||t[9]!==C?(w={key:"preferences",label:N,icon:k,onClick:C},t[8]=N,t[9]=C,t[10]=w):w=t[10];let I;t[11]!==i||t[12]!==o?(I=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Rs,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=I):I=t[13];let A;t[14]!==p||t[15]!==e?(A=(Ks()||Ye())&&!p?[{key:"install-desktop-app",label:Ye()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:s.jsx(Cs,{size:16}),onClick:()=>g(!0)}]:[],t[14]=p,t[15]=e,t[16]=A):A=t[16];let D;t[17]!==e?(D=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=D):D=t[18];let ue;t[19]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(ks,{size:16}),t[19]=ue):ue=t[19];let K;t[20]!==D?(K={key:"terms",label:D,icon:ue,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=D,t[21]=K):K=t[21];let q;t[22]!==e?(q=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=q):q=t[23];let pe;t[24]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Ds,{size:16}),t[24]=pe):pe=t[24];let W;t[25]!==q?(W={key:"privacy",label:q,icon:pe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=q,t[26]=W):W=t[26];let H;t[27]!==e?(H=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=H):H=t[28];let xe;t[29]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(Ft,{className:"w-4 h-4"}),t[29]=xe):xe=t[29];let G;t[30]!==H?(G={key:"github",label:H,icon:xe,href:"https://github.com/decocms/studio",external:!0},t[30]=H,t[31]=G):G=t[31];let Y;t[32]!==e?(Y=e("common.accountPopover.community"),t[32]=e,t[33]=Y):Y=t[33];let he;t[34]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(Ls,{size:16}),t[34]=he):he=t[34];let Q;t[35]!==Y?(Q={key:"community",label:Y,icon:he,href:"https://decocms.com/discord",external:!0},t[35]=Y,t[36]=Q):Q=t[36];let V;t[37]!==e?(V=e("common.accountPopover.homepage"),t[37]=e,t[38]=V):V=t[38];let be;t[39]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ps,{size:16}),t[39]=be):be=t[39];let X;t[40]!==V?(X={key:"homepage",label:V,icon:be,href:"https://decocms.com",external:!0},t[40]=V,t[41]=X):X=t[41];let J;t[42]!==d||t[43]!==o||t[44]!==e?(J=d?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Fs,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=d,t[43]=o,t[44]=e,t[45]=J):J=t[45];let ge;t[46]!==K||t[47]!==W||t[48]!==G||t[49]!==Q||t[50]!==X||t[51]!==J||t[52]!==w||t[53]!==I||t[54]!==A?(ge=[w,...I,...A,K,W,G,Q,X,...J],t[46]=K,t[47]=W,t[48]=G,t[49]=Q,t[50]=X,t[51]=J,t[52]=w,t[53]=I,t[54]=A,t[55]=ge):ge=t[55];const Me=ge;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let je;t[58]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(Ge,{size:16}),t[58]=je):je=t[58];let ve;t[59]!==Z?(ve={key:"logout",label:Z,icon:je,onClick:On},t[59]=Z,t[60]=ve):ve=t[60];const Oe=ve;let ye;t[61]!==S||t[62]!==e?(ye=S?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(Ge,{size:16}),onClick:async()=>{const{error:We}=await de.admin.stopImpersonating();if(We){dt.error(We.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=S,t[62]=e,t[63]=ye):ye=t[63];const Pe=ye;let Se;t[64]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Es,{size:14}),t[64]=Se):Se=t[64];let ee;t[65]!==e?(ee=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=ee):ee=t[66];let te;t[67]!==ee?(te={value:"light",icon:Se,label:ee},t[67]=ee,t[68]=te):te=t[68];let _e;t[69]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(Ts,{size:14}),t[69]=_e):_e=t[69];let se;t[70]!==e?(se=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=se):se=t[71];let ne;t[72]!==se?(ne={value:"dark",icon:_e,label:se},t[72]=se,t[73]=ne):ne=t[73];let Ne;t[74]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(zs,{size:14}),t[74]=Ne):Ne=t[74];let oe;t[75]!==e?(oe=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=oe):oe=t[76];let ie;t[77]!==oe?(ie={value:"system",icon:Ne,label:oe},t[77]=oe,t[78]=ie):ie=t[78];let Ce;t[79]!==te||t[80]!==ne||t[81]!==ie?(Ce=[te,ne,ie],t[79]=te,t[80]=ne,t[81]=ie,t[82]=Ce):Ce=t[82];const Re=Ce;let ke;t[83]!==S||t[84]!==f||t[85]!==Me||t[86]!==m||t[87]!==c||t[88]!==Oe||t[89]!==Pe||t[90]!==Re||t[91]!==b||t[92]!==j?(ke={user:b,userImage:j,menuItems:Me,signOutItem:Oe,stopImpersonatingItem:Pe,isImpersonating:S,themeOptions:Re,preferences:m,setPreferences:c,close:y,isMobile:f},t[83]=S,t[84]=f,t[85]=Me,t[86]=m,t[87]=c,t[88]=Oe,t[89]=Pe,t[90]=Re,t[91]=b,t[92]=j,t[93]=ke):ke=t[93];const we=ke;let le;t[94]!==S||t[95]!==f||t[96]!==u||t[97]!==we||t[98]!==e||t[99]!==b?.name||t[100]!==j?(le=f?s.jsxs(ys,{open:u,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:M("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",S&&"border-2 border-dashed border-warning"),children:[s.jsx($e,{url:j,fallback:b?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:b?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Ss,{className:"h-[80dvh] p-0",children:[s.jsx(_s,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(Je,{...we})]})]}):s.jsxs(ht,{open:u,onOpenChange:x,children:[s.jsx(Be,{asChild:!0,children:s.jsxs(z,{tooltip:b?.name??e("common.accountPopover.defaultAccountLabel"),className:M("rounded-md",S&&"border-2 border-dashed border-warning"),children:[s.jsx($e,{url:j,fallback:b?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:b?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Mn,children:s.jsx(Je,{...we})})]}),t[94]=S,t[95]=f,t[96]=u,t[97]=we,t[98]=e,t[99]=b?.name,t[100]=j,t[101]=le):le=t[101];let re;t[102]!==h?(re=s.jsx(qs,{open:h,onOpenChange:g}),t[102]=h,t[103]=re):re=t[103];let Ie;return t[104]!==le||t[105]!==re?(Ie=s.jsxs(s.Fragment,{children:[le,re]}),t[104]=le,t[105]=re,t[106]=Ie):Ie=t[106],Ie}function Mn(t){return t.preventDefault()}function On(){L("signed_out",{source:"account_popover"}),Lt(),de.signOut()}class Pn extends O.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Rn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function zn(){const t=_.c(17),e=B(),{org:n}=E(),{hasDecoKey:i,balanceDollars:o}=ds();if(!i)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=M(o!=null&&Rn(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx($s,{}),t[7]=m):m=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let f;t[10]!==c?(f=s.jsx("span",{children:c}),t[10]=c,t[11]=f):f=t[11];let d;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==f?(d=s.jsx(T,{children:s.jsx(P,{children:s.jsxs(z,{tooltip:l,className:r,onClick:a,children:[m,f]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=f,t[16]=d):d=t[16],d}function Ze(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Pn,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(zn,{})})}),t[0]=e):e=t[0],e}const En=6e4;function Tn(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Dn(t,e){if(!t)return t;const n=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const a=r.notifications.filter(m=>n&&!n.has(m.id)?!0:(i++,!1));return{...r,notifications:a}}),l=n?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:l}))}}function Fn(t,e){const n=_.c(4),{data:i}=de.useSession(),o=i?.user?.id;let l;n[0]!==e||n[1]!==t||n[2]!==o?(l=r=>!t||!o?Bn:Xs.subscribe(t,m=>{try{if(JSON.parse(m.data).subject!==o)return}catch{return}e(),r()},e),n[0]=e,n[1]=t,n[2]=o,n[3]=l):l=n[3],O.useSyncExternalStore(l,Un,Ln)}function Ln(){return 0}function Un(){return 0}function Bn(){}function wt(){const t=_.c(37),{locator:e,org:n}=E(),i=Wt(),o=Ht();let l;t[0]!==e?(l=ot.notifications(e),t[0]=e,t[1]=l):l=t[1];const r=l;let a;t[2]!==i?(a=C=>{const{pageParam:w}=C;return Tn(i,w)},t[2]=i,t[3]=a):a=t[3];let m;t[4]!==r||t[5]!==a?(m={queryKey:r,queryFn:a,initialPageParam:void 0,getNextPageParam:Wn,refetchInterval:En},t[4]=r,t[5]=a,t[6]=m):m=t[6];const c=Vs(m);let f;t[7]!==o||t[8]!==r?(f=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=f):f=t[9],Fn(n.slug,f);let d;t[10]!==i?(d=C=>i.call("NOTIFICATION_MARK_READ",C?{ids:C}:{}),t[10]=i,t[11]=d):d=t[11];let p,u;t[12]!==o||t[13]!==r?(p=async C=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,w=>Dn(w,C))},u=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=p,t[15]=u):(p=t[14],u=t[15]);let x;t[16]!==d||t[17]!==p||t[18]!==u?(x={mutationFn:d,onMutate:p,onSettled:u},t[16]=d,t[17]=p,t[18]=u,t[19]=x):x=t[19];const h=Ee(x);let g;t[20]!==c.data?.pages?(g=c.data?.pages??[],t[20]=c.data?.pages,t[21]=g):g=t[21];const b=g;let j;t[22]!==b?(j=b.flatMap(Kn),t[22]=b,t[23]=j):j=t[23];const S=b[0]?.unreadCount??0;let v;t[24]!==c?(v=()=>{c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},t[24]=c,t[25]=v):v=t[25];let y,N;t[26]!==h?(y=()=>h.mutate(null),N=C=>h.mutate([C]),t[26]=h,t[27]=y,t[28]=N):(y=t[27],N=t[28]);let k;return t[29]!==c.hasNextPage||t[30]!==c.isFetchingNextPage||t[31]!==S||t[32]!==v||t[33]!==y||t[34]!==N||t[35]!==j?(k={updates:j,redDotCount:S,hasMore:c.hasNextPage,isFetchingMore:c.isFetchingNextPage,fetchMore:v,markAllRead:y,markRead:N},t[29]=c.hasNextPage,t[30]=c.isFetchingNextPage,t[31]=S,t[32]=v,t[33]=y,t[34]=N,t[35]=j,t[36]=k):k=t[36],k}function Kn(t){return t.notifications.map(qn)}function qn(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Wn(t){return t.nextCursor??void 0}function Hn(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const n=t.action;return String(n)}}}function Gn(t){const e=_.c(28),{update:n,orgSlug:i,onSelect:o}=t,l=$();let r;e[0]!==i||e[1]!==n.taskKeySeq?(r=ut(i,n.taskKeySeq),e[0]=i,e[1]=n.taskKeySeq,e[2]=r):r=e[2];const a=r,m=!n.actorName;let c;e[3]!==m||e[4]!==n.actorImage||e[5]!==n.actorName?(c=m?s.jsx(fs,{size:24,className:"shrink-0"}):s.jsx($e,{url:n.actorImage??void 0,fallback:Zs(n.actorName??void 0),shape:"circle",size:"xs",className:"shrink-0"}),e[3]=m,e[4]=n.actorImage,e[5]=n.actorName,e[6]=c):c=e[6];const f=a?`${a} · `:"";let d;e[7]!==f||e[8]!==n.taskTitle?(d=s.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[f,n.taskTitle]}),e[7]=f,e[8]=n.taskTitle,e[9]=d):d=e[9];let p;e[10]!==l||e[11]!==n?(p=Hn(n,l),e[10]=l,e[11]=n,e[12]=p):p=e[12];let u;e[13]!==p?(u=s.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:p}),e[13]=p,e[14]=u):u=e[14];let x;e[15]!==d||e[16]!==u?(x=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,u]}),e[15]=d,e[16]=u,e[17]=x):x=e[17];let h;e[18]!==n.occurredAt?(h=en(new Date(n.occurredAt)),e[18]=n.occurredAt,e[19]=h):h=e[19];let g;e[20]!==h?(g=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:h}),e[20]=h,e[21]=g):g=e[21];let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Js,{size:16,className:"shrink-0 text-muted-foreground"}),e[22]=b):b=e[22];let j;return e[23]!==o||e[24]!==c||e[25]!==x||e[26]!==g?(j=s.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-center gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[c,x,g,b]}),e[23]=o,e[24]=c,e[25]=x,e[26]=g,e[27]=j):j=e[27],j}function Yn(t){const e=_.c(2),{onReach:n}=t;let i;return e[0]!==n?(i=s.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Qn)&&n()});return l.observe(o),()=>l.disconnect()}}),e[0]=n,e[1]=i):i=e[1],i}function Qn(t){return t.isIntersecting}function Vn(t){const e=_.c(23),{onClose:n}=t,i=$(),o=B(),{org:l}=E(),{updates:r,markAllRead:a,markRead:m,hasMore:c,fetchMore:f}=wt();let d;e[0]!==i?(d=i("sidebar.inbox.title"),e[0]=i,e[1]=d):d=e[1];let p;e[2]!==d?(p=s.jsx("h3",{className:"text-sm font-medium",children:d}),e[2]=d,e[3]=p):p=e[3];let u;e[4]!==a||e[5]!==i||e[6]!==r.length?(u=r.length>0&&s.jsx(Ae,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:a,children:i("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=i,e[6]=r.length,e[7]=u):u=e[7];let x;e[8]!==p||e[9]!==u?(x=s.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[p,u]}),e[8]=p,e[9]=u,e[10]=x):x=e[10];let h;e[11]!==f||e[12]!==c||e[13]!==m||e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==i||e[18]!==r?(h=r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[s.jsx(Ke,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):s.jsxs(Qs,{className:"min-h-0 flex-1",children:[r.map(b=>{const j=ut(l.slug,b.taskKeySeq);return s.jsx(Gn,{update:b,orgSlug:l.slug,onSelect:()=>{m(b.id),n(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:l.slug,taskKey:j}})}},b.id)}),c&&s.jsx(Yn,{onReach:f})]}),e[11]=f,e[12]=c,e[13]=m,e[14]=o,e[15]=n,e[16]=l,e[17]=i,e[18]=r,e[19]=h):h=e[19];let g;return e[20]!==x||e[21]!==h?(g=s.jsxs(s.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=g):g=e[22],g}function It(){const t=_.c(1),{redDotCount:e}=wt();if(e===0)return null;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=n):n=t[0],n}function $t(t){const e=_.c(11),{open:n,onOpenChange:i,side:o,children:l}=t;let r;e[0]!==i||e[1]!==n?(r=n&&s.jsx(Vn,{onClose:()=>i(!1)}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let a;e[3]!==o||e[4]!==r?(a=s.jsx(bt,{side:o,align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:r}),e[3]=o,e[4]=r,e[5]=a):a=e[5];let m;return e[6]!==l||e[7]!==i||e[8]!==n||e[9]!==a?(m=s.jsxs(ht,{open:n,onOpenChange:i,children:[l,a]}),e[6]=l,e[7]=i,e[8]=n,e[9]=a,e[10]=m):m=e[10],m}function At(){const t=_.c(9),e=$(),[n,i]=O.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ke,{size:15}),r=s.jsx(It,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=s.jsx(Be,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let m;return t[6]!==n||t[7]!==a?(m=s.jsx($t,{open:n,onOpenChange:i,side:"top",children:a}),t[6]=n,t[7]=a,t[8]=m):m=t[8],m}function Xn(){const t=_.c(15),e=$(),[n,i]=O.useState(!1),{state:o}=U();let l;t[0]!==o||t[1]!==e?(l=o==="collapsed"?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=l):l=t[2];let r,a;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{}),a=s.jsx(It,{}),t[3]=r,t[4]=a):(r=t[3],a=t[4]);let m;t[5]!==e?(m=e("sidebar.inbox.title"),t[5]=e,t[6]=m):m=t[6];let c;t[7]!==m?(c=s.jsx("span",{className:"truncate",children:m}),t[7]=m,t[8]=c):c=t[8];let f;t[9]!==l||t[10]!==c?(f=s.jsx(Be,{asChild:!0,children:s.jsxs(z,{tooltip:l,className:"relative",children:[r,a,c]})}),t[9]=l,t[10]=c,t[11]=f):f=t[11];let d;return t[12]!==n||t[13]!==f?(d=s.jsx($t,{open:n,onOpenChange:i,side:"right",children:f}),t[12]=n,t[13]=f,t[14]=d):d=t[14],d}function Jn(){const t=_.c(14),e=$(),n=B(),{org:i}=E();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==n||t[3]!==i.slug?(l=()=>n({to:"/$org/settings",params:{org:i.slug}}),t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let m;t[8]!==a?(m=s.jsx("span",{children:a}),t[8]=a,t[9]=m):m=t[9];let c;return t[10]!==o||t[11]!==l||t[12]!==m?(c=s.jsxs(z,{tooltip:o,onClick:l,children:[r,m]}),t[10]=o,t[11]=l,t[12]=m,t[13]=c):c=t[13],c}function Zn(){const t=_.c(9),e=$(),n=B(),{org:i}=E();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let l;t[2]!==n||t[3]!==i.slug?(l=()=>n({to:"/$org/settings",params:{org:i.slug}}),t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(fe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==l?(a=s.jsx("button",{type:"button","aria-label":o,onClick:l,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=l,t[8]=a):a=t[8],a}function et(){const t=_.c(29),e=$(),[n,i]=O.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(gt,{}),t[2]=l):l=t[2];let r;t[3]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=r):r=t[4];let a;t[5]!==r?(a=s.jsx("span",{children:r}),t[5]=r,t[6]=a):a=t[6];let m;t[7]!==o||t[8]!==a?(m=s.jsx(P,{children:s.jsx(jt,{trigger:s.jsxs(z,{tooltip:o,children:[l,a]})})}),t[7]=o,t[8]=a,t[9]=m):m=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let f,d;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>i(!0),d=s.jsx(Gs,{}),t[12]=f,t[13]=d):(f=t[12],d=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=s.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=s.jsx(P,{children:s.jsxs(z,{tooltip:c,onClick:f,children:[d,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let h;t[21]!==x||t[22]!==m?(h=s.jsxs(T,{className:"gap-0.5",children:[m,x]}),t[21]=x,t[22]=m,t[23]=h):h=t[23];let g;t[24]!==n?(g=s.jsx(us,{open:n,onOpenChange:i,mode:"browse"}),t[24]=n,t[25]=g):g=t[25];let b;return t[26]!==h||t[27]!==g?(b=s.jsxs(s.Fragment,{children:[h,g]}),t[26]=h,t[27]=g,t[28]=b):b=t[28],b}function tt(){const t=_.c(10),e=$();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(gt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let l;t[5]!==o?(l=s.jsx("span",{children:o}),t[5]=o,t[6]=l):l=t[6];let r;return t[7]!==n||t[8]!==l?(r=s.jsx(T,{className:"gap-0.5",children:s.jsx(P,{children:s.jsx(jt,{trigger:s.jsxs(z,{tooltip:n,children:[i,l]})})})}),t[7]=n,t[8]=l,t[9]=r):r=t[9],r}function eo(){const t=_.c(18),{state:e}=U(),n=e==="collapsed",i=vs(),o=!i;if(n){let c;t[0]!==o?(c=o&&s.jsx(Ze,{}),t[0]=o,t[1]=c):c=t[1];let f;t[2]!==i?(f=i?s.jsx(tt,{}):s.jsx(et,{}),t[2]=i,t[3]=f):f=t[3];let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(P,{children:s.jsx(Xn,{})}),t[4]=d):d=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(P,{children:s.jsx(Jn,{})}),t[5]=p):p=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(T,{children:[d,p,s.jsx(P,{children:s.jsx(Fe,{})})]}),t[6]=u):u=t[6];let x;return t[7]!==c||t[8]!==f?(x=s.jsxs(Te,{className:"px-2 pb-3 gap-1",children:[c,f,u]}),t[7]=c,t[8]=f,t[9]=x):x=t[9],x}let l;t[10]!==o?(l=o&&s.jsx(Ze,{}),t[10]=o,t[11]=l):l=t[11];let r;t[12]!==i?(r=i?s.jsx(tt,{}):s.jsx(et,{}),t[12]=i,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(T,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Fe,{})}),s.jsx(At,{}),s.jsx(Zn,{})]})})}),t[14]=a):a=t[14];let m;return t[15]!==l||t[16]!==r?(m=s.jsxs(Te,{className:"px-2 pb-3 gap-0.5",children:[l,r,a]}),t[15]=l,t[16]=r,t[17]=m):m=t[17],m}function to(){const t=_.c(12),e=$(),n=B(),{org:i}=E(),{setOpenMobile:o}=U();let l,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(T,{children:s.jsx(P,{children:s.jsx(Fe,{})})})}),r=s.jsx(At,{}),t[0]=l,t[1]=r):(l=t[0],r=t[1]);let a;t[2]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==n||t[5]!==i.slug||t[6]!==o?(m=()=>{n({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[4]=n,t[5]=i.slug,t[6]=o,t[7]=m):m=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(fe,{className:"size-4"}),t[8]=c):c=t[8];let f;return t[9]!==a||t[10]!==m?(f=s.jsx(Te,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[l,r,s.jsx(xt,{"aria-label":a,onClick:m,children:c})]})}),t[9]=a,t[10]=m,t[11]=f):f=t[11],f}const so=5,no=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function oo(){const t=_.c(3),{state:e}=U();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:so}).map(ro)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(F,{className:"size-6 rounded-md"}),s.jsx(F,{className:"size-6 rounded-md"}),s.jsx(F,{className:"size-6 rounded-md"})]}),s.jsx(F,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:no.map(io)})]}),t[2]=i):i=t[2],i}function io(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(F,{className:"size-5 rounded-full shrink-0"}),s.jsx(F,{className:M("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(lo)})]},e)}function lo(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(F,{className:"h-3 flex-1 rounded-sm"})},e)}function ro(t,e){return s.jsx(F,{className:"size-10 rounded-lg mx-auto"},e)}function ao(t,e,n){let i=null;for(const o of t)o.virtual_mcp_id===e&&o.created_by===n&&(o.hidden||(!i||o.updated_at>i.updated_at)&&(i=o));return i}const Mt=[],co=()=>()=>{};function mo(){const t=_.c(8),e=$(),{org:n}=E(),i=vt(),o=fo;let l;if(t[0]!==i||t[1]!==n.slug||t[2]!==e){let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(As,{size:16}),t[4]=r):r=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ms,{size:16}),t[5]=a):a=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ys,{size:16}),t[6]=m):m=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(tn,{size:16}),t[7]=c):c=t[7],l=[o("overview",e("sidebar.navDestinations.home"),r,i===R.home||i===R.orgIndex,{to:R.home,params:{org:n.slug}}),o("reports",e("sidebar.navDestinations.reports"),a,i===R.reports,{to:R.reports,params:{org:n.slug}}),o("board",e("sidebar.navDestinations.tasks"),m,i===R.tasks,{to:R.tasks,params:{org:n.slug,taskKey:void 0}}),o("files",e("sidebar.navDestinations.library"),c,i===R.library,{to:R.library,params:{org:n.slug}})],t[0]=i,t[1]=n.slug,t[2]=e,t[3]=l}else l=t[3];return l}function fo(t,e,n,i,o){return{key:t,label:e,icon:n,isActive:i,trackAs:t,link:o}}function st(t){const e=_.c(11),{org:n}=E(),i=sn()??[],o=ln(i),l=vt(),r=Ws(),a=Hs(),{data:m}=de.useSession(),c=m?.user?.id,f=nn();let d;e[0]!==f?.threads.get?(d=f?.threads.get??po,e[0]=f?.threads.get,e[1]=d):d=e[1];let p;e[2]!==f?.threads.get?(p=f?.threads.get??uo,e[2]=f?.threads.get,e[3]=p):p=e[3];const u=O.useSyncExternalStore(f?.threads.subscribe??co,d,p);let x;return e[4]!==r||e[5]!==l||e[6]!==n||e[7]!==a||e[8]!==u||e[9]!==c?(x=h=>{const g=cn(h),b=l===R.agents&&r===h.id,j=b?a??void 0:ao(u,h.id,c)?.id??void 0,S={org:n.slug,project:h.id,panel:void 0};return{key:h.id,label:h.title||g?.name||"",icon:s.jsx(Os,{icon:h.icon,name:h.title,size:"2xs",className:"shrink-0"}),isActive:b,trackAs:"coding_agent",link:{to:R.agents,params:S,search:j?{thread:j}:{}},settingsLink:{to:R.agents,params:{...S,panel:"settings"},search:j?{thread:j}:{}}}},e[4]=r,e[5]=l,e[6]=n,e[7]=a,e[8]=u,e[9]=c,e[10]=x):x=e[10],i.filter(h=>t(h,o)).map(x)}function uo(){return Mt}function po(){return Mt}function xo(t){const e=_.c(14),{onNavigate:n}=t,i=$(),o=mo(),l=st(bo),r=st(ho),a=[...l,...r],[m]=ct(),{showProjectSettingsGear:c}=m,{state:f,isMobile:d}=U(),p=f==="collapsed"&&!d;let u;e[0]!==p||e[1]!==d||e[2]!==n||e[3]!==c||e[4]!==i?(u=y=>{const N=y.settingsLink&&c&&!p;return s.jsxs(P,{children:[s.jsx(z,{asChild:!0,isActive:y.isActive,tooltip:p?y.label:void 0,className:M(N&&"group-hover/menu-item:bg-sidebar-accent group-hover/menu-item:text-sidebar-accent-foreground"),children:s.jsxs(He,{...y.link,"aria-current":y.isActive?"page":void 0,onClick:()=>{L("nav_destination_clicked",{destination:y.trackAs}),n?.()},children:[y.icon,s.jsx("span",{className:M("truncate",N&&"pr-7"),children:y.label})]})}),N&&y.settingsLink&&s.jsx(Ae,{asChild:!0,variant:"ghost",size:"icon-sm",className:M("absolute right-1 top-1/2 -translate-y-1/2 text-sidebar-foreground/60 hover:text-sidebar-foreground/60",d?"opacity-100":"opacity-0 group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100"),children:s.jsx(He,{...y.settingsLink,"aria-label":i("sidebar.navDestinations.projectSettings",{name:y.label}),onClick:()=>{L("nav_destination_clicked",{destination:"coding_agent_settings"}),n?.()},children:s.jsx(fe,{})})})]},y.key)},e[0]=p,e[1]=d,e[2]=n,e[3]=c,e[4]=i,e[5]=u):u=e[5];const x=u,h=T,g="gap-1";let b;e[6]!==o||e[7]!==x?(b=o.map(x),e[6]=o,e[7]=x,e[8]=b):b=e[8];const j=a.length>0&&s.jsx("li",{"aria-hidden":!0,className:"h-2"}),S=a.map(x);let v;return e[9]!==h||e[10]!==b||e[11]!==j||e[12]!==S?(v=s.jsxs(h,{className:g,children:[b,j,S]}),e[9]=h,e[10]=b,e[11]=j,e[12]=S,e[13]=v):v=e[13],v}function ho(t,e){return an(t)&&!e.has(t.id)}function bo(t){return rn(t.metadata)}function go(t){const e=_.c(29);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:i}=n,o=$(),{org:l}=E(),{state:r,isMobile:a,toggleSidebar:m}=U(),c=r==="collapsed"&&!a;let f;e[2]!==i?(f=s.jsx(xo,{onNavigate:i}),e[2]=i,e[3]=f):f=e[3];const d=f;if(c){let u;e[4]!==l?(u=s.jsx(xs,{org:l,size:"sm"}),e[4]=l,e[5]=u):u=e[5];let x;e[6]!==l.name||e[7]!==u?(x=s.jsx(z,{tooltip:l.name,children:u}),e[6]=l.name,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l.slug||e[10]!==x?(h=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(ps,{orgParam:l.slug,side:"right",align:"start",trigger:x})}),e[9]=l.slug,e[10]=x,e[11]=h):h=e[11];let g;e[12]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=g):g=e[13];let b;e[14]!==o?(b=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=b):b=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(at,{size:16}),e[16]=j):j=e[16];let S;e[17]!==g||e[18]!==b||e[19]!==m?(S=s.jsx(T,{className:"mt-2 gap-1.5",children:s.jsx(P,{children:s.jsx(z,{"aria-label":g,tooltip:b,onClick:m,children:j})})}),e[17]=g,e[18]=b,e[19]=m,e[20]=S):S=e[20];let v;e[21]!==d?(v=s.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:d}),e[21]=d,e[22]=v):v=e[22];let y;return e[23]!==v||e[24]!==h||e[25]!==S?(y=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[h,S,v]}),e[23]=v,e[24]=h,e[25]=S,e[26]=y):y=e[26],y}let p;return e[27]!==d?(p=s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:d})}),e[27]=d,e[28]=p):p=e[28],p}function jo(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(s.Fragment,{children:[s.jsx(ft,{showName:!0}),s.jsx(St,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=e):e=t[0],e}function Ot(t){const e=_.c(3),{onNavigate:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(oo,{}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=s.jsx(nt,{children:s.jsx(O.Suspense,{fallback:i,children:s.jsx(go,{onNavigate:n})})}),e[1]=n,e[2]=o):o=e[2],o}function vo(){const t=_.c(5),e=_t();let n,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(eo,{}),i=s.jsx(jo,{}),o=s.jsx(Ot,{}),t[0]=n,t[1]=i,t[2]=o):(n=t[0],i=t[1],o=t[2]);let l;return t[3]!==e?(l=s.jsx(yt,{children:s.jsx(kt,{sections:e,footer:n,header:i,additionalContent:o})}),t[3]=e,t[4]=l):l=t[4],l}function yo(t){const e=_.c(7),{onClose:n}=t,i=_t();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(to,{}),e[0]=o):o=e[0];let l;e[1]!==n?(l=s.jsx(Ot,{onNavigate:n}),e[1]=n,e[2]=l):l=e[2];let r;return e[3]!==n||e[4]!==i||e[5]!==l?(r=s.jsx(yt,{children:s.jsx(In,{sections:i,onClose:n,footer:o,additionalContent:l})}),e[3]=n,e[4]=i,e[5]=l,e[6]=r):r=e[6],r}const So="sidebar.open";function _o(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jt,{}),t[0]=e):e=t[0],e}function Ul(){const t=_.c(28),e=mt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{connect:i,siteUrl:o}=Gt(n),l=i==="1",[r,a]=it(So,!1),{width:m,wrapperRef:c,onStartResize:f,resetWidth:d}=vn(),p=e;let u;t[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ae.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[s.jsx(St,{}),s.jsx(ae.TogglesSlot,{}),s.jsx(ae.TabsSlot,{className:"shrink-0"}),s.jsx(ae.CenterSlot,{}),s.jsx(ae.RightSlot,{})]})}),t[1]=u):u=t[1];const x=u;let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h={background:"transparent",containerType:"inline-size"},t[2]=h):h=t[2];let g;t[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Yt,{className:"flex flex-col min-h-0",style:h,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(O.Suspense,{fallback:s.jsx(_o,{}),children:s.jsx(Qt,{})})})})}),t[3]=g):g=t[3];const b=g,j=p&&x,S=`${m}px`;let v;t[4]!==S?(v={"--sidebar-width":S,"--sidebar-width-icon":"3.125rem"},t[4]=S,t[5]=v):v=t[5];const y=v;let N;t[6]!==e||t[7]!==f||t[8]!==d?(N=!e&&s.jsxs(s.Fragment,{children:[s.jsx(vo,{}),s.jsx(bn,{onPointerDown:f,onDoubleClick:d})]}),t[6]=e,t[7]=f,t[8]=d,t[9]=N):N=t[9];let k;t[10]!==y||t[11]!==N||t[12]!==c?(k=s.jsxs(Vt,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:y,children:[N,b]}),t[10]=y,t[11]=N,t[12]=c,t[13]=k):k=t[13];let C;t[14]!==e?(C=e&&s.jsx(mn,{renderSidebar:No}),t[14]=e,t[15]=C):C=t[15];let w;t[16]!==o||t[17]!==l?(w=l&&s.jsx(fn,{siteUrl:o}),t[16]=o,t[17]=l,t[18]=w):w=t[18];let I;t[19]!==C||t[20]!==w||t[21]!==j||t[22]!==k?(I=s.jsx(dn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[j,k,C,w]})}),t[19]=C,t[20]=w,t[21]=j,t[22]=k,t[23]=I):I=t[23];let A;return t[24]!==a||t[25]!==r||t[26]!==I?(A=s.jsx(on,{children:s.jsx(ae.Provider,{children:s.jsx(Xt,{open:r,onOpenChange:a,children:I})})}),t[24]=a,t[25]=r,t[26]=I,t[27]=A):A=t[27],A}function No(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(yo,{onClose:e})})})}export{Ul as default};
@@ -1 +0,0 @@
1
- import{c as Y,b as H,r as K,o as X,j as t,P as $,K as J,p as Z,e as ee,t as V,B as Q}from"./index-BfSwG7jI.js";import{C as se}from"./collection-table-wrapper-ZF9BQojD.js";import{E as U}from"./empty-state-TkGPHkkR.js";import{S as te}from"./search-input-CeEId8JN.js";import{I as ie}from"./input-BTAsE3JA.js";import{L as ae}from"./label-CvqDH6pp.js";import{u as le}from"./use-debounced-value-C5uG6eOe.js";import{D as ne,a as re,b as oe,c as me,d as de,e as ce}from"./dialog-4i8tKyZs.js";import{S as fe,a as ge,b as ue,c as he,d as pe}from"./select-B96sC0jU.js";import{a as W}from"./admin-fetch-CCSvjTk1.js";import{f as xe}from"./format-time-BnbuEtat.js";import"./table-CBDqSL5J.js";import"./ArrowUp-DMnh6s4b.js";import"./SearchMd-TCWEaJg-.js";import"./Check-BESi8Og0.js";import"./ChevronDown-D9SrOc49.js";import"./ChevronUp-DInto1b8.js";import"./differenceInSeconds-NQ4PDo0z.js";const je=["owner","admin","user"];function be(s){const e=Y.c(75),{org:n}=s,i=H(),[v,r]=K.useState(!1),[l,C]=K.useState(""),[h,D]=K.useState("user"),w=Z();let y;e[0]!==l||e[1]!==n.id||e[2]!==h?(y=()=>W(`/api/_admin/orgs/${n.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l.trim(),role:h})}),e[0]=l,e[1]=n.id,e[2]=h,e[3]=y):y=e[3];let p;e[4]!==l||e[5]!==n.name||e[6]!==w||e[7]!==i?(p=()=>{V.success(i("admin.orgs.memberAdded",{email:l.trim(),org:n.name})),w.invalidateQueries({queryKey:J.deploymentAdminOrgsList()}),r(!1),C(""),D("user")},e[4]=l,e[5]=n.name,e[6]=w,e[7]=i,e[8]=p):p=e[8];let P;e[9]!==i?(P=B=>{V.error(B instanceof Error?B.message:i("admin.orgs.failedAddMember"))},e[9]=i,e[10]=P):P=e[10];let x;e[11]!==y||e[12]!==p||e[13]!==P?(x={mutationFn:y,onSuccess:p,onError:P},e[11]=y,e[12]=p,e[13]=P,e[14]=x):x=e[14];const a=ee(x);let o;e[15]!==i?(o=i("admin.orgs.addMember"),e[15]=i,e[16]=o):o=e[16];let m;e[17]!==o?(m=t.jsx(ne,{asChild:!0,children:t.jsx(Q,{variant:"outline",size:"sm",children:o})}),e[17]=o,e[18]=m):m=e[18];let d;e[19]!==n.name||e[20]!==i?(d=i("admin.orgs.addMemberTo",{org:n.name}),e[19]=n.name,e[20]=i,e[21]=d):d=e[21];let c;e[22]!==d?(c=t.jsx(re,{children:t.jsx(oe,{children:d})}),e[22]=d,e[23]=c):c=e[23];let j;e[24]!==i?(j=i("admin.orgs.email"),e[24]=i,e[25]=j):j=e[25];let b;e[26]!==j?(b=t.jsx(ae,{htmlFor:"admin-add-member-email",children:j}),e[26]=j,e[27]=b):b=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=B=>C(B.target.value),e[28]=O):O=e[28];let f;e[29]!==i?(f=i("admin.orgs.emailPlaceholder"),e[29]=i,e[30]=f):f=e[30];let g;e[31]!==l||e[32]!==a.isPending||e[33]!==f?(g=t.jsx(ie,{id:"admin-add-member-email",type:"email",value:l,onChange:O,placeholder:f,disabled:a.isPending}),e[31]=l,e[32]=a.isPending,e[33]=f,e[34]=g):g=e[34];let u;e[35]!==b||e[36]!==g?(u=t.jsxs("div",{className:"space-y-2",children:[b,g]}),e[35]=b,e[36]=g,e[37]=u):u=e[37];let S;e[38]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(ge,{className:"w-full",children:t.jsx(ue,{})}),e[38]=S):S=e[38];let N;e[39]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(he,{children:je.map(Se)}),e[39]=N):N=e[39];let _;e[40]!==a.isPending||e[41]!==h?(_=t.jsxs(fe,{value:h,onValueChange:D,disabled:a.isPending,children:[S,N]}),e[40]=a.isPending,e[41]=h,e[42]=_):_=e[42];let E;e[43]!==u||e[44]!==_?(E=t.jsxs("div",{className:"space-y-4",children:[u,_]}),e[43]=u,e[44]=_,e[45]=E):E=e[45];let R;e[46]===Symbol.for("react.memo_cache_sentinel")?(R=()=>r(!1),e[46]=R):R=e[46];const G=a.isPending;let L;e[47]!==i?(L=i("admin.orgs.cancel"),e[47]=i,e[48]=L):L=e[48];let T;e[49]!==a.isPending||e[50]!==L?(T=t.jsx(Q,{variant:"outline",onClick:R,disabled:G,children:L}),e[49]=a.isPending,e[50]=L,e[51]=T):T=e[51];let A;e[52]!==a?(A=()=>a.mutate(),e[52]=a,e[53]=A):A=e[53];let M;e[54]!==l||e[55]!==a.isPending?(M=!l.trim()||a.isPending,e[54]=l,e[55]=a.isPending,e[56]=M):M=e[56];let z;e[57]!==a.isPending||e[58]!==i?(z=a.isPending?i("admin.orgs.adding"):i("admin.orgs.addMember"),e[57]=a.isPending,e[58]=i,e[59]=z):z=e[59];let F;e[60]!==A||e[61]!==M||e[62]!==z?(F=t.jsx(Q,{onClick:A,disabled:M,children:z}),e[60]=A,e[61]=M,e[62]=z,e[63]=F):F=e[63];let I;e[64]!==T||e[65]!==F?(I=t.jsxs(me,{children:[T,F]}),e[64]=T,e[65]=F,e[66]=I):I=e[66];let k;e[67]!==E||e[68]!==I||e[69]!==c?(k=t.jsxs(de,{className:"sm:max-w-md",children:[c,E,I]}),e[67]=E,e[68]=I,e[69]=c,e[70]=k):k=e[70];let q;return e[71]!==v||e[72]!==k||e[73]!==m?(q=t.jsxs(ce,{open:v,onOpenChange:r,children:[m,k]}),e[71]=v,e[72]=k,e[73]=m,e[74]=q):q=e[74],q}function Se(s){return t.jsx(pe,{value:s,children:t.jsx("span",{className:"capitalize",children:s})},s)}function $e(){const s=Y.c(45),e=H(),[n,i]=K.useState("");let v;s[0]!==n?(v=n.trim(),s[0]=n,s[1]=v):v=s[1];const r=le(v,300);let l;s[2]!==r?(l=J.deploymentAdminOrgs(r),s[2]=r,s[3]=l):l=s[3];let C;s[4]!==r?(C=()=>{const _=new URLSearchParams({limit:"100"});return r&&_.set("search",r),W(`/api/_admin/orgs?${_}`)},s[4]=r,s[5]=C):C=s[5];let h;s[6]!==l||s[7]!==C?(h={queryKey:l,queryFn:C},s[6]=l,s[7]=C,s[8]=h):h=s[8];const{data:D,isLoading:w,isError:y}=X(h);let p;s[9]!==D?.organizations?(p=D?.organizations??[],s[9]=D?.organizations,s[10]=p):p=s[10];const P=p;let x;s[11]!==e?(x=e("admin.orgs.organization"),s[11]=e,s[12]=x):x=s[12];let a;s[13]!==x?(a={id:"name",header:x,render:Ne,cellClassName:"flex-1 min-w-0"},s[13]=x,s[14]=a):a=s[14];let o;s[15]!==e?(o=e("admin.orgs.members"),s[15]=e,s[16]=o):o=s[16];let m;s[17]!==o?(m={id:"members",header:o,render:Ce,cellClassName:"w-24 shrink-0"},s[17]=o,s[18]=m):m=s[18];let d;s[19]!==e?(d=e("admin.orgs.created"),s[19]=e,s[20]=d):d=s[20];let c;s[21]!==d?(c={id:"created",header:d,render:Pe,cellClassName:"w-48 shrink-0"},s[21]=d,s[22]=c):c=s[22];let j;s[23]===Symbol.for("react.memo_cache_sentinel")?(j={id:"actions",header:"",render:ye,cellClassName:"w-32 shrink-0"},s[23]=j):j=s[23];let b;s[24]!==c||s[25]!==a||s[26]!==m?(b=[a,m,c,j],s[24]=c,s[25]=a,s[26]=m,s[27]=b):b=s[27];const O=b;let f;s[28]!==e?(f=e("admin.orgs.searchPlaceholder"),s[28]=e,s[29]=f):f=s[29];let g;s[30]!==n||s[31]!==f?(g=t.jsx(te,{value:n,onChange:i,placeholder:f,className:"w-full md:w-[375px]"}),s[30]=n,s[31]=f,s[32]=g):g=s[32];let u;s[33]!==r||s[34]!==y||s[35]!==e?(u=y?t.jsx(U,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):t.jsx(U,{title:e("admin.orgs.noOrgsFound"),description:r?e("admin.orgs.noOrgsMatchSearch",{search:r}):e("admin.orgs.noOrgsYet")}),s[33]=r,s[34]=y,s[35]=e,s[36]=u):u=s[36];let S;s[37]!==O||s[38]!==w||s[39]!==P||s[40]!==u?(S=t.jsx(se,{columns:O,data:P,isLoading:w,emptyState:u}),s[37]=O,s[38]=w,s[39]=P,s[40]=u,s[41]=S):S=s[41];let N;return s[42]!==g||s[43]!==S?(N=t.jsx($,{children:t.jsx($.Content,{children:t.jsx($.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,S]})})})}),s[42]=g,s[43]=S,s[44]=N):N=s[44],N}function ye(s){return t.jsx(be,{org:s})}function Pe(s){return t.jsx("span",{className:"text-sm text-foreground",children:xe(s.createdAt)})}function Ce(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.memberCount})}function Ne(s){return t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:s.name}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:s.slug})]})}export{$e as default};
@@ -1 +0,0 @@
1
- import{c as nt,b as ct,r as ft,x as wt,n as Z,j as e,B as at}from"./index-BfSwG7jI.js";import{i as Tt}from"./AlertCircle-pzcnESJh.js";import{ar as zt,r as Et}from"./agent-icon-D0VUz3F6.js";import{i as Pt}from"./ChevronRight-PYqPsqmX.js";import{s as At}from"./Plus-DuBsnz4i.js";import{a as _t,b as Mt,A as It}from"./alert-kBJMHqj0.js";import{S as Lt}from"./scroll-area-DOLH1hgj.js";import{C as Ut,bB as Ot,a6 as $t,bw as Ht,bx as Rt,bC as Bt,bv as bt,bz as ht,bD as Ft,bE as Kt}from"./index-Shv9_4go.js";import"./UserSquare-CHnwGSuk.js";import"./Tool01-Dkl-Om1v.js";import"./ArrowUp-DMnh6s4b.js";import"./ArrowLeft-DXuRs3HX.js";import"./Tool02-BMdZDsm0.js";import"./XCircle-BlZmdI-G.js";import"./TrendUp01-D6VAnyKs.js";import"./ZapSquare-CKPKakyU.js";import"./ZoomOut-Db6FAGuS.js";import"./Users03-Df29VRo0.js";import"./CheckCircle-DWSrREW4.js";import"./Check-BESi8Og0.js";import"./ChevronDown-D9SrOc49.js";import"./ChevronSelectorVertical-DtCb6SRW.js";import"./ChevronUp-DInto1b8.js";import"./DotsVertical-CH_GCWYz.js";import"./Stars02-Bbmo0zY3.js";import"./Copy01-l041cd35.js";import"./CreditCard01-p5hPt9es.js";import"./Download01-gw2mF-MC.js";import"./Settings02-Dy-2Qj4d.js";import"./Eye-Cm7KzDnH.js";import"./FilterLines-CafyJI14.js";import"./Share07-Rp0r2KZ9.js";import"./GitBranch01-Bxb2j_fZ.js";import"./Globe01-DLNdolGS.js";import"./Globe04-CViLCpme.js";import"./SwitchHorizontal01-CMuMpxZg.js";import"./HardDrive-QJn1w8tw.js";import"./Image01-B_oUPQXv.js";import"./Key01-BnQHMp8V.js";import"./LinkExternal01-B8eerp5u.js";import"./LockUnlocked01-B-LL1VJN.js";import"./LogOut01-39Jb5GrZ.js";import"./Monitor01-CQB2vCrj.js";import"./Sun-CLDrV-25.js";import"./Package-5u5XI3F0.js";import"./Palette-CXA1gi33.js";import"./Play-B-a-uZIp.js";import"./SearchLg-B8cxnIXO.js";import"./SearchMd-TCWEaJg-.js";import"./Shield01-DtK5gafE.js";import"./Stars01-BB8IcNTL.js";import"./Trash01-l-_qVOL8.js";import"./Upload01-BLnsIrPZ.js";import"./User01-Ck3_FIpD.js";import"./Users01-CFzvYiuw.js";import"./XClose-CnMJB9wB.js";import"./Zap-I-DMHk8W.js";import"./select-B96sC0jU.js";import"./chat-context-BNnytLLb.js";import"./use-panel-navigate-BxQr2f1i.js";import"./use-destination-route-ChWdmqCT.js";import"./thread-route-X2aYk-A-.js";import"./dialog-4i8tKyZs.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-C0P3-Ouc.js";import"./use-mcp-client-B4byQ1wO.js";import"./auth-ltjrHdFv.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C6zMztYI.js";import"./task-board-BsniqWRK.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BKGaR5Vw.js";import"./use-ai-providers-DS9TpJ7R.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-5HPG38qC.js";import"./use-organization-settings-CxDKMH66.js";import"./automation-runs-DfK0VSMx.js";import"./useInfiniteQuery-BXzx91qu.js";import"./use-infinite-scroll-Dd5C23ac.js";import"./use-connection-BudxFSJ1.js";import"./table-CBDqSL5J.js";import"./empty-state-TkGPHkkR.js";import"./use-members-pG405IAQ.js";import"./use-org-auth-client-Br2IIgta.js";import"./use-automations-fmUj9duL.js";import"./useSuspenseInfiniteQuery-ByKcG5VI.js";import"./avatar-CAMx88Qh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BLd03kFT.js";import"./markdown-BIiViQno.js";import"./monaco-editor-BBOBGlaR.js";import"./spinner-CBT7H6Nj.js";import"./editor-B0xnuCCp.js";import"./types-M5Xw3OeR.js";import"./shell-layout-Bpk7ohiD.js";import"./required-auth-layout-CT5fghv3.js";import"./use-org-sso-B4Tot0-C.js";import"./integration-icon-RkVfBWiU.js";import"./use-navigate-to-agent-BhD-C3eq.js";import"./chart-C5ZFqDIF.js";import"./index-BmAm7rGx.js";import"./AreaChart-BBl3HuXM.js";import"./form-DqHZuRjN.js";import"./label-CvqDH6pp.js";import"./input-BTAsE3JA.js";import"./file-type-icon-6Mfusmw2.js";import"./drawer-BOqo92AD.js";import"./collection-search-CfmsG6EB.js";import"./tabs-BHzFvM3d.js";import"./toggle-group-DPowLvjC.js";import"./super-agent-icon-CcEEod1i.js";import"./self-tool-result-4Q8hQ6Im.js";import"./alert-dialog-CADdLgiP.js";import"./extract-connection-data-BAHgy3b5.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-C5uG6eOe.js";import"./authenticate-and-persist-oauth-C5WoxICz.js";import"./mcp-oauth-CpjxOVqq.js";import"./track-C6ehW_55.js";import"./popover-Ds86LKX0.js";import"./toolbar-C_LYTIqP.js";import"./github-repo-picker-BT0gAgwT.js";import"./use-mcp-tools-Bb7R3ndw.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-CrXfxqk-.js";import"./use-registry-connections-m9TXCiaY.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-W0cHs7kb.js";import"./connection-form-helpers-kZEDJqLp.js";import"./collection-tabs-BMjNkk-e.js";import"./badge-BQ00ii0C.js";import"./select-model-DKInz36h.js";import"./checkbox-8NR47DPn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Cb7l5H7F.js";import"./dropdown-menu-DHdxnqdQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8QrmHEw.js";import"./skill-preview-B1BayRfx.js";import"./use-file-configs-C9ZZlKNd.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-ypk7z-ra.js";import"./search-input-CeEId8JN.js";import"./use-mcp-auth-status-Cptezoi_.js";import"./switch-DhvugTsO.js";import"./use-secrets-CANXygBX.js";import"./config-F76h-4Nb.js";import"./command-B4vg3kev.js";import"./index-ChRU4p6-.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-Bbul4qd6.js";import"./use-tags-BokBbgMx.js";import"./automation-list-row-S8Kym9UP.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-vOy2V2LC.js";import"./cards-CBOWo6Jv.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",vt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Wt(f){const t=nt.c(17),{support:x}=f,s=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(Tt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==s||t[2]!==a?(c=s(a),t[1]=s,t[2]=a,t[3]=c):c=t[3];let i;t[4]!==c?(i=e.jsx(_t,{children:c}),t[4]=c,t[5]=i):i=t[5];let d;t[6]!==o||t[7]!==s?(d=o?s("sandbox.postCalendar.unsupportedRuntimeDescription"):s("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=s,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let n;t[11]!==o?(n=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:Kt}),t[11]=o,t[12]=n):n=t[12];let m;return t[13]!==i||t[14]!==r||t[15]!==n?(m=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[i,r,n]})]})}),t[13]=i,t[14]=r,t[15]=n,t[16]=m):m=t[16],m}function Qo(f){const t=nt.c(94),{decofile:x,support:s,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:i}=f,d=i===void 0?!1:i,r=ct();let n;t[0]!==s?(n=Ut(s),t[0]=s,t[1]=n):n=t[1];const m=n,[g,v]=ft.useState(null),[N]=wt(),[b,w]=ft.useState(Vt),h=N.language;let D;t[2]!==b||t[3]!==h?(D=new Intl.DateTimeFormat(h,{month:"long",year:"numeric"}).format(b),t[2]=b,t[3]=h,t[4]=D):D=t[4];const u=D;let j,C,T,z,k,E,P,A,_,M,S;if(t[5]!==m||t[6]!==b||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==h||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const yt=new Intl.DateTimeFormat(h,{weekday:"short"}),Ct=new Intl.DateTimeFormat(h,{dateStyle:"long"}),{byDay:Nt,undated:mt}=Ot($t(x)),dt=Ht(b),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(bt(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>w(qt),t[39]=it):it=t[39];let K;t[40]!==r?(K=r("sandbox.postCalendar.next"),t[40]=r,t[41]=K):K=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(Pt,{size:16}),t[42]=st):st=t[42];let W;t[43]!==K?(W=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":K,children:st}),t[43]=K,t[44]=W):W=t[44];let q;t[45]!==u?(q=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=q):q=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:vt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==W||t[61]!==q||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,W,q,X]}),t[58]=R,t[59]=F,t[60]=W,t[61]=q,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!m&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],C=!m,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:yt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===b.getMonth(),St=Nt.get(Bt(p))??[];return e.jsxs("div",{onDragOver:y=>{g&&(y.preventDefault(),y.dataTransfer.dropEffect="move")},onDrop:y=>{y.preventDefault();const ut=y.dataTransfer.getData("text/plain");v(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),m&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(p)}),children:e.jsx(At,{size:14})})]}),St.map(y=>e.jsx(gt,{entry:y,active:y.post.key===o,draggable:m&&y.scheduled,onSelect:l,onDragStateChange:v},y.post.key))]},p.getTime())})}),lt]}),E="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",P=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),A=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(zt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:v},p.post.key)),t[5]=m,t[6]=b,t[7]=x,t[8]=g,t[9]=d,t[10]=h,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=C,t[19]=T,t[20]=z,t[21]=k,t[22]=E,t[23]=P,t[24]=A,t[25]=_,t[26]=M,t[27]=S}else j=t[17],C=t[18],T=t[19],z=t[20],k=t[21],E=t[22],P=t[23],A=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==E||t[71]!==P||t[72]!==A?(I=e.jsxs("div",{className:E,children:[P,A]}),t[70]=E,t[71]=P,t[72]=A,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==C||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:C,children:L}),t[78]=j,t[79]=C,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==m||t[84]!==s?(O=!m&&e.jsx(Wt,{support:s}),t[83]=m,t[84]=s,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function qt(f){return ht(f,1)}function Gt(f){return ht(f,-1)}function Vt(){return bt(new Date)}function xt(f){const t=nt.c(7),{className:x,label:s}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==s||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,s]}),t[4]=s,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=nt.c(23),{entry:x,active:s,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:i,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let n;t[0]!==c||t[1]!==r?(n=c(r),t[0]=c,t[1]=r,t[2]=n):n=t[2];const m=n;let g;t[3]!==a||t[4]!==i.key?(g=C=>{C.dataTransfer.setData("text/plain",i.key),C.dataTransfer.effectAllowed="move",a(i.key)},t[3]=a,t[4]=i.key,t[5]=g):g=t[5];let v;t[6]!==a?(v=()=>a(null),t[6]=a,t[7]=v):v=t[7];let N;t[8]!==l||t[9]!==i.key?(N=()=>l(i.key),t[8]=l,t[9]=i.key,t[10]=N):N=t[10];const b=`${i.title} · ${m}`,w=d?jt:vt,h=o&&"cursor-grab active:cursor-grabbing",D=s&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==h||t[13]!==D?(u=Z("w-full truncate rounded-md border px-2 py-1 text-left text-xs font-medium transition-colors",w,h,D),t[11]=w,t[12]=h,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==i.title||t[17]!==u||t[18]!==g||t[19]!==v||t[20]!==N||t[21]!==b?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:v,onClick:N,title:b,className:u,children:i.title}),t[15]=o,t[16]=i.title,t[17]=u,t[18]=g,t[19]=v,t[20]=N,t[21]=b,t[22]=j):j=t[22],j}export{Qo as PostCalendar};
@@ -1 +0,0 @@
1
- import{c as he,b as be,j as t,ab as Pe,a8 as ke,a9 as Ne,B as Te}from"./index-BfSwG7jI.js";import{b as Be}from"./chat-context-BNnytLLb.js";import{i as Ie}from"./AlertCircle-pzcnESJh.js";import{n as Ae}from"./LinkExternal01-B8eerp5u.js";import{b5 as Re}from"./agent-icon-D0VUz3F6.js";import{a as De}from"./UserSquare-CHnwGSuk.js";import{I as ue}from"./input-BTAsE3JA.js";import{L as xe}from"./label-CvqDH6pp.js";import{M as $e}from"./multi-select-By4YQF2Y.js";import{b as je,c as _e,T as ve,a as Me}from"./tabs-BHzFvM3d.js";import{S as Se}from"./switch-DhvugTsO.js";import{T as Le}from"./textarea-W0cHs7kb.js";import{g as Ve,v as ze,w as Ue,x as Ye,y as we,k as He,z as Ke,A as qe,B as Je,C as Oe,D as Ge,E as Ee,F as ge,H as Qe,I as We,J as Xe,K as Fe}from"./index-Shv9_4go.js";import{b as Ze,a as et,B as tt}from"./block-document-7UrdrreU.js";import{u as st}from"./use-autosave-BU_QPyqZ.js";import{s as Q,E as lt,R as it,A as ot}from"./primitives-PNdNgUxv.js";import"./use-panel-navigate-BxQr2f1i.js";import"./use-destination-route-ChWdmqCT.js";import"./thread-route-X2aYk-A-.js";import"./dialog-4i8tKyZs.js";import"./Check-BESi8Og0.js";import"./Copy01-l041cd35.js";import"./Download01-gw2mF-MC.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-C0P3-Ouc.js";import"./use-mcp-client-B4byQ1wO.js";import"./auth-ltjrHdFv.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C6zMztYI.js";import"./task-board-BsniqWRK.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BKGaR5Vw.js";import"./use-ai-providers-DS9TpJ7R.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-5HPG38qC.js";import"./use-organization-settings-CxDKMH66.js";import"./Tool01-Dkl-Om1v.js";import"./ArrowUp-DMnh6s4b.js";import"./ArrowLeft-DXuRs3HX.js";import"./Tool02-BMdZDsm0.js";import"./XCircle-BlZmdI-G.js";import"./TrendUp01-D6VAnyKs.js";import"./ZapSquare-CKPKakyU.js";import"./ZoomOut-Db6FAGuS.js";import"./Users03-Df29VRo0.js";import"./CheckCircle-DWSrREW4.js";import"./ChevronDown-D9SrOc49.js";import"./ChevronRight-PYqPsqmX.js";import"./ChevronSelectorVertical-DtCb6SRW.js";import"./ChevronUp-DInto1b8.js";import"./DotsVertical-CH_GCWYz.js";import"./Stars02-Bbmo0zY3.js";import"./CreditCard01-p5hPt9es.js";import"./Settings02-Dy-2Qj4d.js";import"./Eye-Cm7KzDnH.js";import"./FilterLines-CafyJI14.js";import"./Share07-Rp0r2KZ9.js";import"./GitBranch01-Bxb2j_fZ.js";import"./Globe01-DLNdolGS.js";import"./Globe04-CViLCpme.js";import"./SwitchHorizontal01-CMuMpxZg.js";import"./HardDrive-QJn1w8tw.js";import"./Image01-B_oUPQXv.js";import"./Key01-BnQHMp8V.js";import"./LockUnlocked01-B-LL1VJN.js";import"./LogOut01-39Jb5GrZ.js";import"./Monitor01-CQB2vCrj.js";import"./Sun-CLDrV-25.js";import"./Package-5u5XI3F0.js";import"./Palette-CXA1gi33.js";import"./Play-B-a-uZIp.js";import"./Plus-DuBsnz4i.js";import"./SearchLg-B8cxnIXO.js";import"./SearchMd-TCWEaJg-.js";import"./Shield01-DtK5gafE.js";import"./Stars01-BB8IcNTL.js";import"./Trash01-l-_qVOL8.js";import"./Upload01-BLnsIrPZ.js";import"./User01-Ck3_FIpD.js";import"./Users01-CFzvYiuw.js";import"./XClose-CnMJB9wB.js";import"./Zap-I-DMHk8W.js";import"./badge-BQ00ii0C.js";import"./checkbox-8NR47DPn.js";import"./command-B4vg3kev.js";import"./index-ChRU4p6-.js";import"./popover-Ds86LKX0.js";import"./automation-runs-DfK0VSMx.js";import"./useInfiniteQuery-BXzx91qu.js";import"./use-infinite-scroll-Dd5C23ac.js";import"./use-connection-BudxFSJ1.js";import"./table-CBDqSL5J.js";import"./empty-state-TkGPHkkR.js";import"./use-members-pG405IAQ.js";import"./use-org-auth-client-Br2IIgta.js";import"./use-automations-fmUj9duL.js";import"./useSuspenseInfiniteQuery-ByKcG5VI.js";import"./avatar-CAMx88Qh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BLd03kFT.js";import"./markdown-BIiViQno.js";import"./monaco-editor-BBOBGlaR.js";import"./spinner-CBT7H6Nj.js";import"./editor-B0xnuCCp.js";import"./types-M5Xw3OeR.js";import"./shell-layout-Bpk7ohiD.js";import"./required-auth-layout-CT5fghv3.js";import"./use-org-sso-B4Tot0-C.js";import"./integration-icon-RkVfBWiU.js";import"./use-navigate-to-agent-BhD-C3eq.js";import"./chart-C5ZFqDIF.js";import"./index-BmAm7rGx.js";import"./AreaChart-BBl3HuXM.js";import"./form-DqHZuRjN.js";import"./file-type-icon-6Mfusmw2.js";import"./drawer-BOqo92AD.js";import"./collection-search-CfmsG6EB.js";import"./select-B96sC0jU.js";import"./toggle-group-DPowLvjC.js";import"./super-agent-icon-CcEEod1i.js";import"./self-tool-result-4Q8hQ6Im.js";import"./alert-dialog-CADdLgiP.js";import"./extract-connection-data-BAHgy3b5.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-C5uG6eOe.js";import"./authenticate-and-persist-oauth-C5WoxICz.js";import"./mcp-oauth-CpjxOVqq.js";import"./track-C6ehW_55.js";import"./toolbar-C_LYTIqP.js";import"./github-repo-picker-BT0gAgwT.js";import"./use-mcp-tools-Bb7R3ndw.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-CrXfxqk-.js";import"./use-registry-connections-m9TXCiaY.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-kZEDJqLp.js";import"./collection-tabs-BMjNkk-e.js";import"./select-model-DKInz36h.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Cb7l5H7F.js";import"./dropdown-menu-DHdxnqdQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8QrmHEw.js";import"./skill-preview-B1BayRfx.js";import"./use-file-configs-C9ZZlKNd.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-ypk7z-ra.js";import"./scroll-area-DOLH1hgj.js";import"./search-input-CeEId8JN.js";import"./use-mcp-auth-status-Cptezoi_.js";import"./use-secrets-CANXygBX.js";import"./config-F76h-4Nb.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-Bbul4qd6.js";import"./use-tags-BokBbgMx.js";import"./automation-list-row-S8Kym9UP.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-vOy2V2LC.js";import"./cards-CBOWo6Jv.js";function rt(V){return Array.isArray(V)?V.map(e=>({key:Q(e?.key),value:Q(e?.value)})):[]}function hi(V){const e=he.c(126),{orgSlug:s,virtualMcpId:p,branch:i,blockKey:o,block:d,decofile:l,meta:a,previewBaseUrl:c}=V,r=be(),m=Be()?.taskId??null;let x;e[0]!==i||e[1]!==s||e[2]!==p?(x={orgSlug:s,virtualMcpId:p,branch:i},e[0]=i,e[1]=s,e[2]=p,e[3]=x):x=e[3];const f=Ve(x);let u;e[4]!==i||e[5]!==a||e[6]!==s||e[7]!==p?(u={orgSlug:s,virtualMcpId:p,branch:i,meta:a},e[4]=i,e[5]=a,e[6]=s,e[7]=p,e[8]=u):u=e[8];const C=ze(u);let b;e[9]!==i||e[10]!==s||e[11]!==p?(b={orgSlug:s,virtualMcpId:p,branch:i},e[9]=i,e[10]=s,e[11]=p,e[12]=b):b=e[12];const g=Ue(b);let j;e[13]!==d?(j=Ye(d,"posts"),e[13]=d,e[14]=j):j=e[14];const k=j;let y;e[15]!==o||e[16]!==f?(y=G=>{f.mutate({blockKey:o,data:Ke(o,"posts",qe(G))})},e[15]=o,e[16]=f,e[17]=y):y=e[17];const[n,S]=st(k,y);let z;e[18]!==n||e[19]!==S?(z=(G,h)=>S({...n,[G]:h}),e[18]=n,e[19]=S,e[20]=z):z=e[20];const P=z;let U;e[21]!==l||e[22]!==g||e[23]!==n||e[24]!==c?(U=Ze({decofile:l,post:n,previewBaseUrl:c,draftPointer:g}),e[21]=l,e[22]=g,e[23]=n,e[24]=c,e[25]=U):U=e[25];const N=U;let v,L,Y;e[26]!==n||e[27]!==r?(L=we(n),v=L.length>0,Y=L.length===1?r("sandbox.postEditor.missingFieldSingular",{fields:L.join(", ")}):r("sandbox.postEditor.missingFieldPlural",{fields:L.join(", ")}),e[26]=n,e[27]=r,e[28]=v,e[29]=L,e[30]=Y):(v=e[28],L=e[29],Y=e[30]);const w=Y;let F;e[31]!==n.title||e[32]!==r?(F=Q(n.title)||r("sandbox.postEditor.untitledPost"),e[31]=n.title,e[32]=r,e[33]=F):F=e[33];let T;e[34]!==F?(T=t.jsx("span",{className:"truncate text-sm font-medium",children:F}),e[34]=F,e[35]=T):T=e[35];let B;e[36]!==v||e[37]!==L||e[38]!==w||e[39]!==r?(B=v&&t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Ie,{size:14}),L.length," ",L.length===1?r("sandbox.postEditor.issueSingular"):r("sandbox.postEditor.issuePlural")]})}),t.jsx(Ne,{side:"bottom",children:w})]}),e[36]=v,e[37]=L,e[38]=w,e[39]=r,e[40]=B):B=e[40];let I;e[41]!==f.isError||e[42]!==f.isPending?(I=t.jsx(He,{isPending:f.isPending,isError:f.isError}),e[41]=f.isError,e[42]=f.isPending,e[43]=I):I=e[43];const q=!N||v;let A;e[44]!==v||e[45]!==w||e[46]!==N||e[47]!==r?(A=v?w:r(N?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[44]=v,e[45]=w,e[46]=N,e[47]=r,e[48]=A):A=e[48];let R;e[49]!==v||e[50]!==N?(R=()=>{N&&!v&&window.open(N,"_blank","noopener,noreferrer")},e[49]=v,e[50]=N,e[51]=R):R=e[51];let H;e[52]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ae,{size:14}),e[52]=H):H=e[52];let D;e[53]!==r?(D=r("sandbox.postEditor.seePreview"),e[53]=r,e[54]=D):D=e[54];let $;e[55]!==q||e[56]!==A||e[57]!==R||e[58]!==D?($=t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:q,title:A,onClick:R,children:[H,D]}),e[55]=q,e[56]=A,e[57]=R,e[58]=D,e[59]=$):$=e[59];let J;e[60]!==B||e[61]!==I||e[62]!==$?(J=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[B,I,$]}),e[60]=B,e[61]=I,e[62]=$,e[63]=J):J=e[63];let O;e[64]!==T||e[65]!==J?(O=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[T,J]}),e[64]=T,e[65]=J,e[66]=O):O=e[66];let _;e[67]!==n.title?(_=Q(n.title),e[67]=n.title,e[68]=_):_=e[68];let M;e[69]!==P?(M=G=>P("title",G),e[69]=P,e[70]=M):M=e[70];let K;e[71]!==r?(K=r("sandbox.postEditor.postTitlePlaceholder"),e[71]=r,e[72]=K):K=e[72];let E;e[73]!==_||e[74]!==M||e[75]!==K?(E=t.jsx(lt,{value:_,onChange:M,placeholder:K,className:"py-1 text-4xl font-bold text-foreground"}),e[73]=_,e[74]=M,e[75]=K,e[76]=E):E=e[76];let W;e[77]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Re,{}),e[77]=W):W=e[77];let X;e[78]!==r?(X=r("sandbox.postEditor.contentTab"),e[78]=r,e[79]=X):X=e[79];let Z;e[80]!==X?(Z=t.jsxs(je,{value:"content",children:[W,X]}),e[80]=X,e[81]=Z):Z=e[81];let me;e[82]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(De,{}),e[82]=me):me=e[82];let ee;e[83]!==r?(ee=r("sandbox.postEditor.settingsTab"),e[83]=r,e[84]=ee):ee=e[84];let te;e[85]!==ee?(te=t.jsxs(je,{value:"settings",children:[me,ee]}),e[85]=ee,e[86]=te):te=e[86];let se;e[87]!==Z||e[88]!==te?(se=t.jsxs(_e,{children:[Z,te]}),e[87]=Z,e[88]=te,e[89]=se):se=e[89];let le;e[90]!==n.sections?(le=et(n.sections),e[90]=n.sections,e[91]=le):le=e[91];let ie;e[92]!==P?(ie=G=>P("sections",G),e[92]=P,e[93]=ie):ie=e[93];let oe;e[94]!==i||e[95]!==s||e[96]!==m||e[97]!==p?(oe={orgSlug:s,virtualMcpId:p,branch:i,threadId:m},e[94]=i,e[95]=s,e[96]=m,e[97]=p,e[98]=oe):oe=e[98];let re;e[99]!==r?(re=r("sandbox.postEditor.noContentYet"),e[99]=r,e[100]=re):re=e[100];let ae;e[101]!==a||e[102]!==le||e[103]!==ie||e[104]!==oe||e[105]!==re?(ae=t.jsx(ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(tt,{value:le,onChange:ie,meta:a,sandboxRef:oe,emptyMessage:re})})}),e[101]=a,e[102]=le,e[103]=ie,e[104]=oe,e[105]=re,e[106]=ae):ae=e[106];let ne;e[107]!==n||e[108]!==S?(ne=G=>S({...n,...G}),e[107]=n,e[108]=S,e[109]=ne):ne=e[109];let pe;e[110]!==l||e[111]!==n||e[112]!==P||e[113]!==C||e[114]!==ne?(pe=t.jsx(ve,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(at,{post:n,decofile:l,support:C,onChange:P,onPatch:ne})})}),e[110]=l,e[111]=n,e[112]=P,e[113]=C,e[114]=ne,e[115]=pe):pe=e[115];let de;e[116]!==se||e[117]!==ae||e[118]!==pe?(de=t.jsxs(Me,{defaultValue:"content",className:"mt-6 gap-4",children:[se,ae,pe]}),e[116]=se,e[117]=ae,e[118]=pe,e[119]=de):de=e[119];let ce;e[120]!==E||e[121]!==de?(ce=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[E,de]})}),e[120]=E,e[121]=de,e[122]=ce):ce=e[122];let fe;return e[123]!==O||e[124]!==ce?(fe=t.jsxs("div",{className:"flex h-full flex-col",children:[O,ce]}),e[123]=O,e[124]=ce,e[125]=fe):fe=e[125],fe}function Ce(V){const e=he.c(18),{id:s,label:p,checked:i,blocked:o,blockedReason:d,className:l,onCheckedChange:a}=V;let c;e[0]!==s||e[1]!==p?(c=t.jsx(xe,{htmlFor:s,children:p}),e[0]=s,e[1]=p,e[2]=c):c=e[2];let r;e[3]!==o||e[4]!==i||e[5]!==l||e[6]!==s||e[7]!==a?(r=t.jsx(ke,{asChild:!0,children:t.jsx("span",{children:t.jsx(Se,{id:s,className:l,checked:i,disabled:o,onCheckedChange:a})})}),e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=a,e[8]=r):r=e[8];let m;e[9]!==o||e[10]!==d?(m=o&&t.jsx(Ne,{side:"bottom",children:d}),e[9]=o,e[10]=d,e[11]=m):m=e[11];let x;e[12]!==r||e[13]!==m?(x=t.jsxs(Pe,{children:[r,m]}),e[12]=r,e[13]=m,e[14]=x):x=e[14];let f;return e[15]!==c||e[16]!==x?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c,x]}),e[15]=c,e[16]=x,e[17]=f):f=e[17],f}function at(V){const e=he.c(142),{post:s,decofile:p,support:i,onChange:o,onPatch:d}=V,l=be();let a;e[0]!==i?(a=Je(i),e[0]=i,e[1]=a):a=e[1];const c=a;let r;e[2]!==i?(r=Oe(i),e[2]=i,e[3]=r):r=e[3];const m=r;let x;e[4]!==s?(x=Ge(s),e[4]=s,e[5]=x):x=e[5];const f=x,u=m&&f==="scheduled";let C;if(e[6]!==s||e[7]!==l){const h=we(s);C=h.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:h.join(", ")}):l("sandbox.postEditor.missingFieldPlural",{fields:h.join(", ")}),e[6]=s,e[7]=l,e[8]=C}else C=e[8];const b=C;let g;e[9]!==d||e[10]!==s?(g=h=>d(Xe(s,h,new Date)),e[9]=d,e[10]=s,e[11]=g):g=e[11];const j=g;let k;e[12]!==c||e[13]!==m||e[14]!==u||e[15]!==b||e[16]!==o||e[17]!==s||e[18]!==j||e[19]!==f||e[20]!==l?(k=c&&t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[m&&t.jsx(Ce,{id:"post-scheduled",label:l("sandbox.postEditor.schedulingLabel"),checked:u,blocked:Ee(s,"scheduled"),blockedReason:b,onCheckedChange:h=>j(h?"scheduled":"draft")}),u?t.jsx(ge,{schema:{type:"string",format:"date-time",title:l("sandbox.postEditor.scheduledDatetimeLabel"),description:l("sandbox.postEditor.scheduledDatetimeDescription")},value:Q(s.scheduledDatetime),onChange:h=>o("scheduledDatetime",h),path:"post-scheduled-datetime",label:l("sandbox.postEditor.scheduledDatetimeLabel")}):t.jsx(Ce,{id:"post-published",label:l("sandbox.postEditor.publishedLabel"),className:"data-[state=checked]:bg-success",checked:f==="published",blocked:Ee(s,"published"),blockedReason:b,onCheckedChange:h=>j(h?"published":"draft")})]}),e[12]=c,e[13]=m,e[14]=u,e[15]=b,e[16]=o,e[17]=s,e[18]=j,e[19]=f,e[20]=l,e[21]=k):k=e[21];let y;e[22]!==l?(y=l("sandbox.postEditor.excerptLabel"),e[22]=l,e[23]=y):y=e[23];let n;e[24]!==y?(n=t.jsx(xe,{htmlFor:"post-excerpt",children:y}),e[24]=y,e[25]=n):n=e[25];let S;e[26]!==s.excerpt?(S=Q(s.excerpt),e[26]=s.excerpt,e[27]=S):S=e[27];let z;e[28]!==o?(z=h=>o("excerpt",h.target.value),e[28]=o,e[29]=z):z=e[29];let P;e[30]!==z||e[31]!==S?(P=t.jsx(Le,{id:"post-excerpt",value:S,onChange:z,rows:2}),e[30]=z,e[31]=S,e[32]=P):P=e[32];let U;e[33]!==P||e[34]!==n?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[33]=P,e[34]=n,e[35]=U):U=e[35];let N;e[36]!==l?(N=l("sandbox.postEditor.slugLabel"),e[36]=l,e[37]=N):N=e[37];let v;e[38]!==N?(v=t.jsx(xe,{htmlFor:"post-slug",children:N}),e[38]=N,e[39]=v):v=e[39];let L;e[40]!==s.slug?(L=Q(s.slug),e[40]=s.slug,e[41]=L):L=e[41];let Y;e[42]!==o?(Y=h=>o("slug",h.target.value),e[42]=o,e[43]=Y):Y=e[43];let w;e[44]!==l?(w=l("sandbox.postEditor.slugPlaceholder"),e[44]=l,e[45]=w):w=e[45];let F;e[46]!==L||e[47]!==Y||e[48]!==w?(F=t.jsx(ue,{id:"post-slug",value:L,onChange:Y,placeholder:w,className:"h-10"}),e[46]=L,e[47]=Y,e[48]=w,e[49]=F):F=e[49];let T;e[50]!==v||e[51]!==F?(T=t.jsxs("div",{className:"space-y-2",children:[v,F]}),e[50]=v,e[51]=F,e[52]=T):T=e[52];let B;e[53]!==l?(B=l("sandbox.postEditor.dateLabel"),e[53]=l,e[54]=B):B=e[54];let I;e[55]!==B?(I={type:"string",format:"date",title:B},e[55]=B,e[56]=I):I=e[56];let q;e[57]!==s.date?(q=Q(s.date),e[57]=s.date,e[58]=q):q=e[58];let A;e[59]!==o?(A=h=>o("date",h),e[59]=o,e[60]=A):A=e[60];let R;e[61]!==l?(R=l("sandbox.postEditor.dateLabel"),e[61]=l,e[62]=R):R=e[62];let H;e[63]!==I||e[64]!==q||e[65]!==A||e[66]!==R?(H=t.jsx(ge,{schema:I,value:q,onChange:A,path:"post-date",label:R}),e[63]=I,e[64]=q,e[65]=A,e[66]=R,e[67]=H):H=e[67];let D;e[68]!==T||e[69]!==H?(D=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T,H]}),e[68]=T,e[69]=H,e[70]=D):D=e[70];let $;e[71]!==l?($=l("sandbox.postEditor.coverImageLabel"),e[71]=l,e[72]=$):$=e[72];let J;e[73]!==$?(J={type:"string",format:"image-uri",title:$},e[73]=$,e[74]=J):J=e[74];const O=s.image;let _;e[75]!==o?(_=h=>o("image",h),e[75]=o,e[76]=_):_=e[76];let M;e[77]!==l?(M=l("sandbox.postEditor.coverImageLabel"),e[77]=l,e[78]=M):M=e[78];let K;e[79]!==s.image||e[80]!==J||e[81]!==_||e[82]!==M?(K=t.jsx(Fe,{schema:J,value:O,onChange:_,path:"post-image",label:M}),e[79]=s.image,e[80]=J,e[81]=_,e[82]=M,e[83]=K):K=e[83];let E;e[84]!==l?(E=l("sandbox.postEditor.coverAltLabel"),e[84]=l,e[85]=E):E=e[85];let W;e[86]!==l?(W=l("sandbox.postEditor.coverAltDescription"),e[86]=l,e[87]=W):W=e[87];let X;e[88]!==E||e[89]!==W?(X={type:"string",title:E,description:W},e[88]=E,e[89]=W,e[90]=X):X=e[90];let Z;e[91]!==s.alt?(Z=Q(s.alt),e[91]=s.alt,e[92]=Z):Z=e[92];let me;e[93]!==o?(me=h=>o("alt",h),e[93]=o,e[94]=me):me=e[94];let ee;e[95]!==l?(ee=l("sandbox.postEditor.coverAltLabel"),e[95]=l,e[96]=ee):ee=e[96];let te;e[97]!==X||e[98]!==Z||e[99]!==me||e[100]!==ee?(te=t.jsx(ge,{schema:X,value:Z,onChange:me,path:"post-alt",label:ee}),e[97]=X,e[98]=Z,e[99]=me,e[100]=ee,e[101]=te):te=e[101];let se;e[102]!==K||e[103]!==te?(se=t.jsxs("div",{className:"space-y-2",children:[K,te]}),e[102]=K,e[103]=te,e[104]=se):se=e[104];let le;e[105]!==l?(le=l("sandbox.postEditor.authorsLabel"),e[105]=l,e[106]=le):le=e[106];let ie;e[107]!==o?(ie=h=>o("authors",h),e[107]=o,e[108]=ie):ie=e[108];let oe;e[109]!==p||e[110]!==s.authors||e[111]!==le||e[112]!==ie?(oe=t.jsx(ye,{label:le,decofile:p,kind:"authors",valueField:"email",toRef:pt,selected:s.authors,onChange:ie}),e[109]=p,e[110]=s.authors,e[111]=le,e[112]=ie,e[113]=oe):oe=e[113];let re;e[114]!==l?(re=l("sandbox.postEditor.categoriesLabel"),e[114]=l,e[115]=re):re=e[115];let ae;e[116]!==o?(ae=h=>o("categories",h),e[116]=o,e[117]=ae):ae=e[117];let ne;e[118]!==p||e[119]!==s.categories||e[120]!==re||e[121]!==ae?(ne=t.jsx(ye,{label:re,decofile:p,kind:"categories",valueField:"slug",toRef:nt,selected:s.categories,onChange:ae}),e[118]=p,e[119]=s.categories,e[120]=re,e[121]=ae,e[122]=ne):ne=e[122];let pe;e[123]!==o?(pe=h=>o("extraProps",h),e[123]=o,e[124]=pe):pe=e[124];let de;e[125]!==s.extraProps||e[126]!==pe?(de=t.jsx(ct,{value:s.extraProps,onChange:pe}),e[125]=s.extraProps,e[126]=pe,e[127]=de):de=e[127];let ce;e[128]!==o?(ce=h=>o("seo",h),e[128]=o,e[129]=ce):ce=e[129];let fe;e[130]!==s.seo||e[131]!==ce?(fe=t.jsx(dt,{value:s.seo,onChange:ce}),e[130]=s.seo,e[131]=ce,e[132]=fe):fe=e[132];let G;return e[133]!==U||e[134]!==D||e[135]!==se||e[136]!==oe||e[137]!==ne||e[138]!==de||e[139]!==fe||e[140]!==k?(G=t.jsxs("div",{className:"space-y-5",children:[k,U,D,se,oe,ne,de,fe]}),e[133]=U,e[134]=D,e[135]=se,e[136]=oe,e[137]=ne,e[138]=de,e[139]=fe,e[140]=k,e[141]=G):G=e[141],G}function nt(V){return{name:Q(V.name),slug:Q(V.slug)}}function pt(V){return{...V}}function dt(V){const e=he.c(93),{value:s,onChange:p}=V,i=be();let o;e[0]!==s?(o=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=o):o=e[1];const d=o;let l;e[2]!==p||e[3]!==d?(l=(E,W)=>p({...d,[E]:W}),e[2]=p,e[3]=d,e[4]=l):l=e[4];const a=l;let c;e[5]!==i?(c=i("sandbox.postEditor.seoSectionLabel"),e[5]=i,e[6]=c):c=e[6];let r;e[7]!==c?(r=t.jsx("p",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=r):r=e[8];let m;e[9]!==i?(m=i("sandbox.postEditor.seoSectionHint"),e[9]=i,e[10]=m):m=e[10];let x;e[11]!==m?(x=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[11]=m,e[12]=x):x=e[12];let f;e[13]!==r||e[14]!==x?(f=t.jsxs("div",{className:"space-y-1",children:[r,x]}),e[13]=r,e[14]=x,e[15]=f):f=e[15];let u;e[16]!==i?(u=i("sandbox.postEditor.seoTitleLabel"),e[16]=i,e[17]=u):u=e[17];let C;e[18]!==u?(C=t.jsx(xe,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=C):C=e[19];let b;e[20]!==d.title?(b=Q(d.title),e[20]=d.title,e[21]=b):b=e[21];let g;e[22]!==a?(g=E=>a("title",E.target.value),e[22]=a,e[23]=g):g=e[23];let j;e[24]!==b||e[25]!==g?(j=t.jsx(ue,{id:"post-seo-title",value:b,onChange:g,className:"h-10"}),e[24]=b,e[25]=g,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==C?(k=t.jsxs("div",{className:"space-y-2",children:[C,j]}),e[27]=j,e[28]=C,e[29]=k):k=e[29];let y;e[30]!==i?(y=i("sandbox.postEditor.seoDescriptionLabel"),e[30]=i,e[31]=y):y=e[31];let n;e[32]!==y?(n=t.jsx(xe,{htmlFor:"post-seo-description",children:y}),e[32]=y,e[33]=n):n=e[33];let S;e[34]!==d.description?(S=Q(d.description),e[34]=d.description,e[35]=S):S=e[35];let z;e[36]!==a?(z=E=>a("description",E.target.value),e[36]=a,e[37]=z):z=e[37];let P;e[38]!==S||e[39]!==z?(P=t.jsx(Le,{id:"post-seo-description",value:S,onChange:z,rows:2}),e[38]=S,e[39]=z,e[40]=P):P=e[40];let U;e[41]!==n||e[42]!==P?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[41]=n,e[42]=P,e[43]=U):U=e[43];let N;e[44]!==i?(N=i("sandbox.postEditor.seoImageLabel"),e[44]=i,e[45]=N):N=e[45];let v;e[46]!==N?(v={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=v):v=e[47];const L=d.image;let Y;e[48]!==a?(Y=E=>a("image",E),e[48]=a,e[49]=Y):Y=e[49];let w;e[50]!==i?(w=i("sandbox.postEditor.seoImageLabel"),e[50]=i,e[51]=w):w=e[51];let F;e[52]!==d.image||e[53]!==v||e[54]!==Y||e[55]!==w?(F=t.jsx(Fe,{schema:v,value:L,onChange:Y,path:"post-seo-image",label:w}),e[52]=d.image,e[53]=v,e[54]=Y,e[55]=w,e[56]=F):F=e[56];let T;e[57]!==i?(T=i("sandbox.postEditor.seoCanonicalLabel"),e[57]=i,e[58]=T):T=e[58];let B;e[59]!==T?(B=t.jsx(xe,{htmlFor:"post-seo-canonical",children:T}),e[59]=T,e[60]=B):B=e[60];let I;e[61]!==d.canonical?(I=Q(d.canonical),e[61]=d.canonical,e[62]=I):I=e[62];let q;e[63]!==a?(q=E=>a("canonical",E.target.value),e[63]=a,e[64]=q):q=e[64];let A;e[65]!==i?(A=i("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=i,e[66]=A):A=e[66];let R;e[67]!==I||e[68]!==q||e[69]!==A?(R=t.jsx(ue,{id:"post-seo-canonical",value:I,onChange:q,placeholder:A,className:"h-10"}),e[67]=I,e[68]=q,e[69]=A,e[70]=R):R=e[70];let H;e[71]!==B||e[72]!==R?(H=t.jsxs("div",{className:"space-y-2",children:[B,R]}),e[71]=B,e[72]=R,e[73]=H):H=e[73];let D;e[74]!==i?(D=i("sandbox.postEditor.seoNoIndexingLabel"),e[74]=i,e[75]=D):D=e[75];let $;e[76]!==D?($=t.jsx(xe,{htmlFor:"post-seo-no-indexing",children:D}),e[76]=D,e[77]=$):$=e[77];const J=d.noIndexing===!0;let O;e[78]!==a?(O=E=>a("noIndexing",E),e[78]=a,e[79]=O):O=e[79];let _;e[80]!==J||e[81]!==O?(_=t.jsx(Se,{id:"post-seo-no-indexing",checked:J,onCheckedChange:O}),e[80]=J,e[81]=O,e[82]=_):_=e[82];let M;e[83]!==$||e[84]!==_?(M=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,_]}),e[83]=$,e[84]=_,e[85]=M):M=e[85];let K;return e[86]!==k||e[87]!==U||e[88]!==F||e[89]!==H||e[90]!==M||e[91]!==f?(K=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[f,k,U,F,H,M]}),e[86]=k,e[87]=U,e[88]=F,e[89]=H,e[90]=M,e[91]=f,e[92]=K):K=e[92],K}function ct(V){const e=he.c(24),{value:s,onChange:p}=V,i=be();let o,d,l,a;if(e[0]!==p||e[1]!==i||e[2]!==s){o=rt(s);const f=(C,b)=>p(o.map((g,j)=>j===C?{...g,...b}:g));d="space-y-2";let u;e[7]!==i?(u=i("sandbox.postEditor.extraPropsLabel"),e[7]=i,e[8]=u):u=e[8],e[9]!==u?(l=t.jsx(xe,{children:u}),e[9]=u,e[10]=l):l=e[10],a=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((C,b)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(ue,{value:C.key,onChange:g=>f(b,{key:g.target.value}),placeholder:i("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(ue,{value:C.value,onChange:g=>f(b,{value:g.target.value}),placeholder:i("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(it,{label:i("sandbox.postEditor.removePropLabel"),onClick:()=>p(o.filter((g,j)=>j!==b))})]},b))}),e[0]=p,e[1]=i,e[2]=s,e[3]=o,e[4]=d,e[5]=l,e[6]=a}else o=e[3],d=e[4],l=e[5],a=e[6];let c;e[11]!==i?(c=i("sandbox.postEditor.addPropLabel"),e[11]=i,e[12]=c):c=e[12];let r;e[13]!==o||e[14]!==p?(r=()=>p([...o,{key:"",value:""}]),e[13]=o,e[14]=p,e[15]=r):r=e[15];let m;e[16]!==c||e[17]!==r?(m=t.jsx(ot,{label:c,onClick:r}),e[16]=c,e[17]=r,e[18]=m):m=e[18];let x;return e[19]!==d||e[20]!==l||e[21]!==a||e[22]!==m?(x=t.jsxs("div",{className:d,children:[l,a,m]}),e[19]=d,e[20]=l,e[21]=a,e[22]=m,e[23]=x):x=e[23],x}function ye(V){const e=he.c(24),{label:s,decofile:p,kind:i,valueField:o,toRef:d,selected:l,onChange:a}=V,c=be();let r;e[0]!==p||e[1]!==i||e[2]!==l||e[3]!==d||e[4]!==o?(r=Qe({records:We(p,i),selected:l,valueField:o,toRef:d}),e[0]=p,e[1]=i,e[2]=l,e[3]=d,e[4]=o,e[5]=r):r=e[5];const{options:m,selectedValues:x,refsForValues:f}=r;let u;e[6]!==i||e[7]!==c?(u=c(i==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=i,e[7]=c,e[8]=u):u=e[8];const C=u;let b;e[9]!==i||e[10]!==c?(b=c(i==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=i,e[10]=c,e[11]=b):b=e[11];const g=b;let j;e[12]!==s?(j=t.jsx(xe,{children:s}),e[12]=s,e[13]=j):j=e[13];let k;e[14]!==C||e[15]!==a||e[16]!==m||e[17]!==f||e[18]!==g||e[19]!==x?(k=m.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:C}):t.jsx($e,{options:m,defaultValue:x,onValueChange:n=>a(f(n)),placeholder:g,maxCount:4}),e[14]=C,e[15]=a,e[16]=m,e[17]=f,e[18]=g,e[19]=x,e[20]=k):k=e[20];let y;return e[21]!==j||e[22]!==k?(y=t.jsxs("div",{className:"space-y-2",children:[j,k]}),e[21]=j,e[22]=k,e[23]=y):y=e[23],y}export{hi as PostEditor};
@@ -1 +0,0 @@
1
- import{bG as Z,c as k,b as L,j as s,r as H,E as ee,H as K,a as te,B as oe,k as ie}from"./index-BfSwG7jI.js";import{a as re,g as q,s as F}from"./automation-runs-DfK0VSMx.js";import{u as z}from"./use-mcp-client-B4byQ1wO.js";import{W as se,S as ne,p as le}from"./constants-dLUUoWH7.js";import{b as me,c as ce}from"./use-mcp-tools-Bb7R3ndw.js";import{u as ae}from"./index-Shv9_4go.js";import{c as pe}from"./monaco-editor-BBOBGlaR.js";import{g as de,M as fe,a as G}from"./types-M5Xw3OeR.js";import{a as ue,u as ge}from"./chat-context-BNnytLLb.js";import{u as xe}from"./shell-layout-Bpk7ohiD.js";import{c as he,e as Ce,s as je,f as Se,P as Ie,g as be,h as Ne}from"./self-tool-result-4Q8hQ6Im.js";import{b as W,a as J,d as Q,e as X}from"./dialog-4i8tKyZs.js";import{I as De}from"./integration-icon-RkVfBWiU.js";import{u as ve}from"./use-is-desktop-app-BNujXJc_.js";import"./agent-icon-D0VUz3F6.js";import"./AlertCircle-pzcnESJh.js";import"./UserSquare-CHnwGSuk.js";import"./Tool01-Dkl-Om1v.js";import"./ArrowUp-DMnh6s4b.js";import"./ArrowLeft-DXuRs3HX.js";import"./Tool02-BMdZDsm0.js";import"./XCircle-BlZmdI-G.js";import"./TrendUp01-D6VAnyKs.js";import"./ZapSquare-CKPKakyU.js";import"./ZoomOut-Db6FAGuS.js";import"./Users03-Df29VRo0.js";import"./CheckCircle-DWSrREW4.js";import"./Check-BESi8Og0.js";import"./ChevronDown-D9SrOc49.js";import"./ChevronRight-PYqPsqmX.js";import"./ChevronSelectorVertical-DtCb6SRW.js";import"./ChevronUp-DInto1b8.js";import"./DotsVertical-CH_GCWYz.js";import"./Stars02-Bbmo0zY3.js";import"./Copy01-l041cd35.js";import"./CreditCard01-p5hPt9es.js";import"./Download01-gw2mF-MC.js";import"./Settings02-Dy-2Qj4d.js";import"./Eye-Cm7KzDnH.js";import"./FilterLines-CafyJI14.js";import"./Share07-Rp0r2KZ9.js";import"./GitBranch01-Bxb2j_fZ.js";import"./Globe01-DLNdolGS.js";import"./Globe04-CViLCpme.js";import"./SwitchHorizontal01-CMuMpxZg.js";import"./HardDrive-QJn1w8tw.js";import"./Image01-B_oUPQXv.js";import"./Key01-BnQHMp8V.js";import"./LinkExternal01-B8eerp5u.js";import"./LockUnlocked01-B-LL1VJN.js";import"./LogOut01-39Jb5GrZ.js";import"./Monitor01-CQB2vCrj.js";import"./Sun-CLDrV-25.js";import"./Package-5u5XI3F0.js";import"./Palette-CXA1gi33.js";import"./Play-B-a-uZIp.js";import"./Plus-DuBsnz4i.js";import"./SearchLg-B8cxnIXO.js";import"./SearchMd-TCWEaJg-.js";import"./Shield01-DtK5gafE.js";import"./Stars01-BB8IcNTL.js";import"./Trash01-l-_qVOL8.js";import"./Upload01-BLnsIrPZ.js";import"./User01-Ck3_FIpD.js";import"./Users01-CFzvYiuw.js";import"./XClose-CnMJB9wB.js";import"./Zap-I-DMHk8W.js";import"./useInfiniteQuery-BXzx91qu.js";import"./use-infinite-scroll-Dd5C23ac.js";import"./use-connection-BudxFSJ1.js";import"./use-virtual-mcp-BKGaR5Vw.js";import"./table-CBDqSL5J.js";import"./empty-state-TkGPHkkR.js";import"./use-members-pG405IAQ.js";import"./use-org-auth-client-Br2IIgta.js";import"./use-automations-fmUj9duL.js";import"./useSuspenseInfiniteQuery-ByKcG5VI.js";import"./avatar-CAMx88Qh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BLd03kFT.js";import"./markdown-BIiViQno.js";import"./use-panel-navigate-BxQr2f1i.js";import"./use-destination-route-ChWdmqCT.js";import"./hooks-C0P3-Ouc.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C6zMztYI.js";import"./task-board-BsniqWRK.js";import"./use-navigate-to-agent-BhD-C3eq.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./chart-C5ZFqDIF.js";import"./index-BmAm7rGx.js";import"./AreaChart-BBl3HuXM.js";import"./form-DqHZuRjN.js";import"./label-CvqDH6pp.js";import"./input-BTAsE3JA.js";import"./spinner-CBT7H6Nj.js";import"./file-type-icon-6Mfusmw2.js";import"./auth-ltjrHdFv.js";import"./drawer-BOqo92AD.js";import"./collection-search-CfmsG6EB.js";import"./thread-route-X2aYk-A-.js";import"./select-B96sC0jU.js";import"./tabs-BHzFvM3d.js";import"./toggle-group-DPowLvjC.js";import"./super-agent-icon-CcEEod1i.js";import"./popover-Ds86LKX0.js";import"./toolbar-C_LYTIqP.js";import"./github-repo-picker-BT0gAgwT.js";import"./use-debounced-value-C5uG6eOe.js";import"./authenticate-and-persist-oauth-C5WoxICz.js";import"./mcp-oauth-CpjxOVqq.js";import"./extract-connection-data-BAHgy3b5.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-CrXfxqk-.js";import"./use-registry-connections-m9TXCiaY.js";import"./use-organization-settings-CxDKMH66.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-W0cHs7kb.js";import"./connection-form-helpers-kZEDJqLp.js";import"./collection-tabs-BMjNkk-e.js";import"./badge-BQ00ii0C.js";import"./use-ai-providers-DS9TpJ7R.js";import"./select-model-DKInz36h.js";import"./checkbox-8NR47DPn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Cb7l5H7F.js";import"./dropdown-menu-DHdxnqdQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B8QrmHEw.js";import"./use-decopilot-events-5HPG38qC.js";import"./skill-preview-B1BayRfx.js";import"./editor-B0xnuCCp.js";import"./location-oTTXFrSF.js";import"./use-file-configs-C9ZZlKNd.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-CADdLgiP.js";import"./use-debounced-autosave-ypk7z-ra.js";import"./scroll-area-DOLH1hgj.js";import"./search-input-CeEId8JN.js";import"./use-mcp-auth-status-Cptezoi_.js";import"./switch-DhvugTsO.js";import"./use-secrets-CANXygBX.js";import"./config-F76h-4Nb.js";import"./command-B4vg3kev.js";import"./index-ChRU4p6-.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-Bbul4qd6.js";import"./use-tags-BokBbgMx.js";import"./automation-list-row-S8Kym9UP.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-vOy2V2LC.js";import"./cards-CBOWo6Jv.js";import"./required-auth-layout-CT5fghv3.js";import"./use-org-sso-B4Tot0-C.js";import"./track-C6ehW_55.js";const Me="studio://navigate",_e=new Set(["vtex","ga4","gsc","github"]);function ye(N){const[e]=N;if(N.length!==1||e?.type!=="resource_link"||!e.uri.startsWith(Me))return{isNavigate:!1};let o=null,i=null;try{const r=new URL(e.uri).searchParams;o=r.get("main"),i=r.get("field")}catch{}return{isNavigate:!0,tab:o&&Z.has(o)?o:null,field:i&&_e.has(i)?i:null}}function B(N){const e=k.c(12),{onClose:o,children:i}=N,r=L();let t;e[0]!==o?(t=u=>!u&&o(),e[0]=o,e[1]=t):t=e[1];let a;e[2]!==r?(a=r("commerceOnboarding.connectSourceDialog.title"),e[2]=r,e[3]=a):a=e[3];let l;e[4]!==a?(l=s.jsx(J,{children:s.jsx(W,{children:a})}),e[4]=a,e[5]=l):l=e[5];let d;e[6]!==i||e[7]!==l?(d=s.jsxs(Q,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[l,i]}),e[6]=i,e[7]=l,e[8]=d):d=e[8];let n;return e[9]!==t||e[10]!==d?(n=s.jsx(X,{open:!0,onOpenChange:t,children:d}),e[9]=t,e[10]=d,e[11]=n):n=e[11],n}function V(N){const e=k.c(3),{label:o}=N;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ie,{size:16,className:"animate-spin"}),e[0]=i):i=e[0];let r;return e[1]!==o?(r=s.jsxs("div",{className:"flex items-center gap-2 py-2 text-sm text-muted-foreground",children:[i,s.jsx("span",{children:o})]}),e[1]=o,e[2]=r):r=e[2],r}function Oe(N){const e=k.c(19),{field:o,onClose:i}=N,r=L();let t;e[0]!==i||e[1]!==r?(t=()=>s.jsx(B,{onClose:i,children:s.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.commerceOnboarding.connectModal.loadError")})}),e[0]=i,e[1]=r,e[2]=t):t=e[2];let a;e[3]!==r?(a=r("commerceOnboarding.connectSourceDialog.loading"),e[3]=r,e[4]=a):a=e[4];let l;e[5]!==a?(l=s.jsx(V,{label:a}),e[5]=a,e[6]=l):l=e[6];let d;e[7]!==i||e[8]!==l?(d=s.jsx(B,{onClose:i,children:l}),e[7]=i,e[8]=l,e[9]=d):d=e[9];let n;e[10]!==o||e[11]!==i?(n=s.jsx(Te,{field:o,onClose:i}),e[10]=o,e[11]=i,e[12]=n):n=e[12];let u;e[13]!==d||e[14]!==n?(u=s.jsx(H.Suspense,{fallback:d,children:n}),e[13]=d,e[14]=n,e[15]=u):u=e[15];let g;return e[16]!==t||e[17]!==u?(g=s.jsx(ee,{fallback:t,children:u}),e[16]=t,e[17]=u,e[18]=g):g=e[18],g}function Te(N){const e=k.c(75),{field:o,onClose:i}=N,r=L(),{org:t}=K();let a;e[0]!==t.id?(a=se.COMMERCE_DISCOVERY(t.id),e[0]=t.id,e[1]=a):a=e[1];const l=a;let d;e[2]!==t.id||e[3]!==t.slug?(d={connectionId:ne,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=d):d=e[4];const n=z(d),{data:u}=te.useSession(),g=u?.user?.id??"";let j;e[5]!==l||e[6]!==t||e[7]!==n?(j={selfClient:n,org:t,cdConnectionId:l},e[5]=l,e[6]=t,e[7]=n,e[8]=j):j=e[8];const m=he(j);let f;e[9]!==l||e[10]!==t||e[11]!==n||e[12]!==m?(f={selfClient:n,org:t,cdConnectionId:l,siteUrl:m},e[9]=l,e[10]=t,e[11]=n,e[12]=m,e[13]=f):f=e[13];const{cards:S}=Ce(f);let h;e[14]!==m?(h=je(m)??void 0,e[14]=m,e[15]=h):h=e[15];let b;e[16]!==l||e[17]!==t||e[18]!==n||e[19]!==m||e[20]!==h||e[21]!==g?(b={selfClient:n,org:t,userId:g,cdConnectionId:l,domain:h,siteUrl:m},e[16]=l,e[17]=t,e[18]=n,e[19]=m,e[20]=h,e[21]=g,e[22]=b):b=e[22];const{connect:D,connectingFieldKey:I,error:_}=Se(b);let E;if(e[23]!==S||e[24]!==o){let p;e[26]!==o?(p=x=>x.fieldKey===o,e[26]=o,e[27]=p):p=e[27],E=S.find(p),e[23]=S,e[24]=o,e[25]=E}else E=e[25];const c=E;if(!c){let p;e[28]!==r?(p=r("routes.commerceOnboarding.connectModal.loadError"),e[28]=r,e[29]=p):p=e[29];let x;e[30]!==p?(x=s.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[30]=p,e[31]=x):x=e[31];let C;return e[32]!==i||e[33]!==x?(C=s.jsx(B,{onClose:i,children:x}),e[32]=i,e[33]=x,e[34]=C):C=e[34],C}const P=Ie[c.bindingType];if(P&&c.boundVia!=="oauth"){let p;e[35]!==i?(p=v=>!v&&i(),e[35]=i,e[36]=p):p=e[36];let x;e[37]!==c||e[38]!==D?(x=c.satisfied?void 0:()=>{D(c)},e[37]=c,e[38]=D,e[39]=x):x=e[39];let C;return e[40]!==c||e[41]!==t||e[42]!==P||e[43]!==n||e[44]!==m||e[45]!==p||e[46]!==x?(C=s.jsx(Ne,{card:c,provider:P,org:t,selfClient:n,siteUrl:m,open:!0,onOpenChange:p,onOAuthInstead:x}),e[40]=c,e[41]=t,e[42]=P,e[43]=n,e[44]=m,e[45]=p,e[46]=x,e[47]=C):C=e[47],C}if(c.satisfied&&c.linkedConnectionId){let p;e[48]!==r?(p=r("commerceOnboarding.connectSourceDialog.loading"),e[48]=r,e[49]=p):p=e[49];let x;e[50]!==p?(x=s.jsx(V,{label:p}),e[50]=p,e[51]=x):x=e[51];let C;e[52]!==i||e[53]!==x?(C=s.jsx(B,{onClose:i,children:x}),e[52]=i,e[53]=x,e[54]=C):C=e[54];let v;e[55]!==i?(v=A=>!A&&i(),e[55]=i,e[56]=v):v=e[56];let M;e[57]!==c||e[58]!==t||e[59]!==n||e[60]!==m||e[61]!==v?(M=s.jsx(be,{card:c,org:t,selfClient:n,connectionId:c.linkedConnectionId,contextSiteUrl:m,open:!0,onOpenChange:v}),e[57]=c,e[58]=t,e[59]=n,e[60]=m,e[61]=v,e[62]=M):M=e[62];let O;return e[63]!==C||e[64]!==M?(O=s.jsx(H.Suspense,{fallback:C,children:M}),e[63]=C,e[64]=M,e[65]=O):O=e[65],O}const T=I===c.fieldKey;let y;e[66]!==c||e[67]!==D?(y=()=>{D(c)},e[66]=c,e[67]=D,e[68]=y):y=e[68];let R;return e[69]!==c||e[70]!==_||e[71]!==i||e[72]!==T||e[73]!==y?(R=s.jsx(Ee,{card:c,connecting:T,error:_,onConnect:y,onClose:i}),e[69]=c,e[70]=_,e[71]=i,e[72]=T,e[73]=y,e[74]=R):R=e[74],R}function Ee(N){const e=k.c(22),{card:o,connecting:i,error:r,onConnect:t,onClose:a}=N,l=L(),[d,n]=H.useState(!1);d||(n(!0),queueMicrotask(t));let u;e[0]!==i||e[1]!==a?(u=b=>{!b&&i||b||a()},e[0]=i,e[1]=a,e[2]=u):u=e[2];let g;e[3]!==o.icon||e[4]!==o.title?(g=s.jsx(De,{icon:o.icon,name:o.title,size:"sm",fit:"contain",className:"p-1"}),e[3]=o.icon,e[4]=o.title,e[5]=g):g=e[5];let j;e[6]!==o.title?(j=s.jsx(W,{className:"min-w-0 flex-1",children:o.title}),e[6]=o.title,e[7]=j):j=e[7];let m;e[8]!==g||e[9]!==j?(m=s.jsxs(J,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[g,j]}),e[8]=g,e[9]=j,e[10]=m):m=e[10];let f;e[11]!==o.title||e[12]!==r||e[13]!==t||e[14]!==l?(f=r?s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),s.jsx(oe,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:t,children:l("routes.commerceOnboarding.companionSection.retry")})]}):s.jsx(V,{label:l("commerceOnboarding.connectSourceDialog.connecting",{title:o.title})}),e[11]=o.title,e[12]=r,e[13]=t,e[14]=l,e[15]=f):f=e[15];let S;e[16]!==m||e[17]!==f?(S=s.jsxs(Q,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[m,f]}),e[16]=m,e[17]=f,e[18]=S):S=e[18];let h;return e[19]!==u||e[20]!==S?(h=s.jsx(X,{open:!0,onOpenChange:u,children:S}),e[19]=u,e[20]=S,e[21]=h):h=e[21],h}const Pe={};function Re(N){const e=k.c(43),{client:o,resourceURI:i,tool:r,connectionId:t,orgId:a,args:l}=N,{sendMessage:d}=ue(),{setAppContext:n,clearAppContext:u}=ge(),{openSidePanel:g,openTab:j,closeTab:m}=xe(),f=`${t}:${r.name}`,[S,h]=H.useState(null);let b;e[0]!==m?(b=U=>U==="inline"?(m(),"inline"):"fullscreen",e[0]=m,e[1]=b):b=e[1];const D=b,I=l??Pe;let _;e[2]!==o||e[3]!==r.name||e[4]!==I?(_={client:o,toolName:r.name,toolArguments:I},e[2]=o,e[3]=r.name,e[4]=I,e[5]=_):_=e[5];const{data:E}=ce(_);let c;if(e[6]!==r._meta||e[7]!==r.name){const U=q(r._meta);c=F(r.name,U),e[6]=r._meta,e[7]=r.name,e[8]=c}else c=e[8];const P=c;let T;e[9]!==r.inputSchema?(T=r.inputSchema??{type:"object"},e[9]=r.inputSchema,e[10]=T):T=e[10];let y;e[11]!==P||e[12]!==T||e[13]!==r?(y={...r,name:P,inputSchema:T},e[11]=P,e[12]=T,e[13]=r,e[14]=y):y=e[14];const R=y;let p;e[15]!==g||e[16]!==j||e[17]!==d?(p=U=>{const w=ye(U.content);if(w.isNavigate){w.tab==="connect-sources"&&w.field?h(w.field):w.tab&&j(w.tab);return}const Y=pe(U.content);Y.content.length>0&&(g(),d({tiptapDoc:Y}))},e[15]=g,e[16]=j,e[17]=d,e[18]=p):p=e[18];const x=p;let C;e[19]!==R?(C={tool:R},e[19]=R,e[20]=C):C=e[20];let v;e[21]!==n||e[22]!==f?(v=U=>n(f,U),e[21]=n,e[22]=f,e[23]=v):v=e[23];let M;e[24]!==u||e[25]!==f?(M=()=>u(f),e[24]=u,e[25]=f,e[26]=M):M=e[26];let O;e[27]!==o||e[28]!==x||e[29]!==D||e[30]!==a||e[31]!==i||e[32]!==C||e[33]!==v||e[34]!==M||e[35]!==I||e[36]!==E?(O=s.jsx(fe,{resourceURI:i,orgId:a,toolInfo:C,toolInput:I,toolResult:E,displayMode:"fullscreen",minHeight:G.fullscreen.minHeight,maxHeight:G.fullscreen.maxHeight,client:o,onMessage:x,onUpdateModelContext:v,onTeardown:M,onRequestDisplayMode:D,className:"h-full"}),e[27]=o,e[28]=x,e[29]=D,e[30]=a,e[31]=i,e[32]=C,e[33]=v,e[34]=M,e[35]=I,e[36]=E,e[37]=O):O=e[37];let A;e[38]!==S?(A=S&&s.jsx(Oe,{field:S,onClose:()=>h(null)}),e[38]=S,e[39]=A):A=e[39];let $;return e[40]!==O||e[41]!==A?($=s.jsxs(s.Fragment,{children:[O,A]}),e[40]=O,e[41]=A,e[42]=$):$=e[42],$}function Ai(N){const e=k.c(25),{connectionId:o,toolName:i,args:r}=N,{org:t}=K(),a=ae(),l=ve();let d;e[0]!==o||e[1]!==l||e[2]!==a?(d=le(o)&&l?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,e[0]=o,e[1]=l,e[2]=a,e[3]=d):d=e[3];const n=d;let u;e[4]!==o||e[5]!==n||e[6]!==t.id||e[7]!==t.slug?(u={connectionId:o,orgId:t.id,orgSlug:t.slug,mcpUrl:n},e[4]=o,e[5]=n,e[6]=t.id,e[7]=t.slug,e[8]=u):u=e[8];const g=z(u);let j;e[9]!==g?(j={client:g},e[9]=g,e[10]=j):j=e[10];const{data:m}=me(j);let f,S,h;e[11]!==i||e[12]!==m.tools?(f=re(decodeURIComponent(i)),h=m.tools.find(I=>I.name===f)??m.tools.find(I=>{const _=q(I._meta);if(!_)return!1;if(F(I.name,_)===f)return!0;const c=F(f,_);return c!==f&&I.name===c}),S=h?._meta?de(h._meta):void 0,e[11]=i,e[12]=m.tools,e[13]=f,e[14]=S,e[15]=h):(f=e[13],S=e[14],h=e[15]);const b=S;if(!h||!b){let I;return e[16]!==f?(I=s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',f,'" not found or has no UI']})}),e[16]=f,e[17]=I):I=e[17],I}let D;return e[18]!==r||e[19]!==g||e[20]!==o||e[21]!==t.id||e[22]!==b||e[23]!==h?(D=s.jsx(Re,{client:g,resourceURI:b,tool:h,connectionId:o,orgId:t.id,args:r}),e[18]=r,e[19]=g,e[20]=o,e[21]=t.id,e[22]=b,e[23]=h,e[24]=D):D=e[24],D}export{Ai as AppViewContent};