decocms 4.353.0 → 4.353.2

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 (260) hide show
  1. package/dist/client/assets/{AlertCircle-CMbZRyyx.js → AlertCircle-BGBKpLte.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C6DElkke.js → AreaChart-BxP3pJd_.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-D6wg9dRX.js → ArrowLeft-CfNfj34W.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-S9PiBhNR.js → ArrowRight-DD5r1MRr.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Kp8iOYqA.js → ArrowUp-CaxOzWB5.js} +1 -1
  6. package/dist/client/assets/{Check-DobcY0eV.js → Check-eZLp0THO.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-BfaYLY9R.js → CheckCircle-Cany4v-s.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BHiyCeas.js → ChevronRight-Dyvjd0aP.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-WdXmtxZR.js → ChevronSelectorVertical-A2c5IggG.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CMgbFVj1.js → ChevronUp-kwVzh9Ea.js} +1 -1
  11. package/dist/client/assets/{Copy01-DJ6YIZzP.js → Copy01-HbP496BQ.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-DUewWiH3.js → CreditCard01-CBge11Ez.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-CcCXKjDQ.js → DotsVertical-Dlyi7q0q.js} +1 -1
  14. package/dist/client/assets/{Download01-B-xCoyh9.js → Download01-BL4NJ1GB.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-DqQfydrL.js → ErrorBarContext-TONSKSjE.js} +1 -1
  16. package/dist/client/assets/{Eye-C7WUgC8R.js → Eye-Do47wJSg.js} +1 -1
  17. package/dist/client/assets/{GitBranch01-BJ0mK5px.js → GitBranch01-NVGMWUuB.js} +1 -1
  18. package/dist/client/assets/{Globe01-Dj_gIo3g.js → Globe01-DkspZwhB.js} +1 -1
  19. package/dist/client/assets/{HardDrive-CipJx2oY.js → HardDrive-CjyB6tGL.js} +1 -1
  20. package/dist/client/assets/{Image01-DNsdL6t3.js → Image01-CSAsQNmT.js} +1 -1
  21. package/dist/client/assets/{Key01-CGrwBg5t.js → Key01-D6_hQFwL.js} +1 -1
  22. package/dist/client/assets/{Link01-LzgEXOLF.js → Link01-Bd1PdqAi.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-Cze-Sz0L.js → LinkExternal01-DzrVp9Tg.js} +1 -1
  24. package/dist/client/assets/{Monitor01-ByszFew3.js → Monitor01-CQluS8Nh.js} +1 -1
  25. package/dist/client/assets/{Package-Bm6sqwo4.js → Package-Cx0aWML0.js} +1 -1
  26. package/dist/client/assets/{Palette-C08pCl2b.js → Palette-px16mBfS.js} +1 -1
  27. package/dist/client/assets/{Play-0UyS0cyA.js → Play-DDDvRMzY.js} +1 -1
  28. package/dist/client/assets/{Plus-D8PEuEgy.js → Plus-BKlrZG61.js} +1 -1
  29. package/dist/client/assets/{SearchLg-U_q5JUZG.js → SearchLg-B4kXtc3z.js} +1 -1
  30. package/dist/client/assets/{SearchMd-DYC_WQcU.js → SearchMd-CIRXiD9f.js} +1 -1
  31. package/dist/client/assets/{Sector-DhSm4NcV.js → Sector-dcvexaGU.js} +1 -1
  32. package/dist/client/assets/{Settings02-CSMvEGdm.js → Settings02-B4w1q3sP.js} +1 -1
  33. package/dist/client/assets/{Share07-CGs29l88.js → Share07-LHpf870n.js} +1 -1
  34. package/dist/client/assets/{Shield01-CsXEChUa.js → Shield01-CU2hAP4a.js} +1 -1
  35. package/dist/client/assets/{Stars01-DwlxBP_x.js → Stars01-ISx16GP4.js} +1 -1
  36. package/dist/client/assets/{Sun-CWqe54Xb.js → Sun-dn0qQZeG.js} +1 -1
  37. package/dist/client/assets/{Tool01-lhbmtMl1.js → Tool01-pmMbVQOm.js} +1 -1
  38. package/dist/client/assets/{Tool02-DzjxjRKe.js → Tool02-8Dr2Gn8L.js} +1 -1
  39. package/dist/client/assets/{Trash01-C_Vel1r1.js → Trash01-pKP6eCpn.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-BLLPVsmc.js → TrendUp01-DRHBhQzq.js} +1 -1
  41. package/dist/client/assets/{Upload01-D_0fYmyw.js → Upload01-D81bzDyt.js} +1 -1
  42. package/dist/client/assets/{User01-Ca62JORv.js → User01-ClWEUyJU.js} +1 -1
  43. package/dist/client/assets/{UserSquare-SrVzzZLD.js → UserSquare-BDzzhNrw.js} +1 -1
  44. package/dist/client/assets/{Users01-p40208rr.js → Users01-DDC8ifx4.js} +1 -1
  45. package/dist/client/assets/{Users03-CGlyslgC.js → Users03-DBea94aF.js} +1 -1
  46. package/dist/client/assets/{XCircle-B3rJLgWV.js → XCircle-BaKTNZQS.js} +1 -1
  47. package/dist/client/assets/{XClose-BieaBilB.js → XClose-D_bUCgoz.js} +1 -1
  48. package/dist/client/assets/{Zap-BLGTK6tv.js → Zap-BAMfLNdX.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-CENrF5Nr.js → ZoomOut-DsRkRiGx.js} +1 -1
  50. package/dist/client/assets/{access-gate-DIa93VYf.js → access-gate-Cniwu6ws.js} +1 -1
  51. package/dist/client/assets/{agent-icon-CUvxlB2H.js → agent-icon-C6PrEUEK.js} +1 -1
  52. package/dist/client/assets/{agents-list-D_2N8Gky.js → agents-list-CQlQGxNc.js} +1 -1
  53. package/dist/client/assets/{ai-providers-M-AcishF.js → ai-providers-CEeFMeoF.js} +1 -1
  54. package/dist/client/assets/{alert-D-244-y8.js → alert-CKBRBqFd.js} +1 -1
  55. package/dist/client/assets/{alert-dialog-BqNLZYNg.js → alert-dialog-DrQfsXCX.js} +1 -1
  56. package/dist/client/assets/{analytics-tab-_0JmfIZE.js → analytics-tab-Bq7Lbawc.js} +1 -1
  57. package/dist/client/assets/{api-keys-mRCNl8fQ.js → api-keys-DYB7fnHz.js} +1 -1
  58. package/dist/client/assets/api-keys-DhiRuq3S.js +1 -0
  59. package/dist/client/assets/app-editor-DRm8_Rdc.js +1 -0
  60. package/dist/client/assets/{auth-DG9IEB0V.js → auth-BgRdtqaz.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-ChD_hdeM.js → auth-catchall-BwnFGCwK.js} +1 -1
  62. package/dist/client/assets/{auth-entry-GLVNqyxx.js → auth-entry-BYIKjzXP.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-BTVo43Oa.js → auth-split-layout-CFIWwgQy.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-BnVeb5VN.js → authenticate-and-persist-oauth-DT0TJ3Xk.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-DBtRma3A.js → automation-list-row-nHCmrcT0.js} +1 -1
  66. package/dist/client/assets/{automation-runs-B-qtHPJI.js → automation-runs-D_wih-40.js} +1 -1
  67. package/dist/client/assets/{automations-iXyDYWMW.js → automations-CCb8ofR7.js} +1 -1
  68. package/dist/client/assets/{autosend-BEGnkY84.js → autosend-Cv7gUhXB.js} +1 -1
  69. package/dist/client/assets/{avatar-BksZI35j.js → avatar-DOuGhn2H.js} +1 -1
  70. package/dist/client/assets/{badge-jb7Eney9.js → badge-CZW6tMPi.js} +1 -1
  71. package/dist/client/assets/{block-document-sPY_Q7Un.js → block-document-DUvynqPA.js} +1 -1
  72. package/dist/client/assets/{breadcrumb-qkauQmWa.js → breadcrumb-B0DmWHHb.js} +1 -1
  73. package/dist/client/assets/{buckets-DBRcwfkx.js → buckets-Co8n7t0b.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-B1AuhQg2.js → bulk-category-panel-DaFItZI1.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-4BGIkSS4.js → capability-load-error-YEX1tQVH.js} +1 -1
  76. package/dist/client/assets/{cards-CYkzIkKR.js → cards-CMOuzK6T.js} +1 -1
  77. package/dist/client/assets/{category-editor-BcV204Ds.js → category-editor-BAj7zejw.js} +1 -1
  78. package/dist/client/assets/{cdn-tab-BSSOurF-.js → cdn-tab-r3K2UAjA.js} +1 -1
  79. package/dist/client/assets/{chart-BHxHCYtw.js → chart-DaaNFnsz.js} +1 -1
  80. package/dist/client/assets/{chat-context-BCJQflxC.js → chat-context-C1McX52r.js} +1 -1
  81. package/dist/client/assets/{checkbox-Bi_Uot6u.js → checkbox-2ZraQb2Z.js} +1 -1
  82. package/dist/client/assets/{choose-editor-aaf3w97O.js → choose-editor-DeMjgjNL.js} +1 -1
  83. package/dist/client/assets/{cli-auth-success-CeBjlvjR.js → cli-auth-success-YQtaYAma.js} +1 -1
  84. package/dist/client/assets/{client-icons-CSMXdACR.js → client-icons-D5Ia17Al.js} +1 -1
  85. package/dist/client/assets/{collection-detail-dTIFNq5h.js → collection-detail-CK-zP7tZ.js} +1 -1
  86. package/dist/client/assets/{collection-display-button-tX4tpsMx.js → collection-display-button-BmV6gzco.js} +1 -1
  87. package/dist/client/assets/{collection-search-CCHSO3Rn.js → collection-search-dAqDbZ9U.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-Bd7zcUUT.js → collection-table-wrapper-YgUP_ymM.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-B_oQWXK5.js → collection-tabs-BZgmZA3q.js} +1 -1
  90. package/dist/client/assets/{command-DzUmiEwN.js → command-DkEJVvy-.js} +1 -1
  91. package/dist/client/assets/{commerce-onboarding-Day9zcGk.js → commerce-onboarding-D9PJ-OjU.js} +1 -1
  92. package/dist/client/assets/{connect-EyfCb5-y.js → connect-B9NfIVP6.js} +1 -1
  93. package/dist/client/assets/{connect-layout-CfXYson4.js → connect-layout-BO8t7WoM.js} +1 -1
  94. package/dist/client/assets/{connection-card-Q8pg1BfH.js → connection-card-hkd0iJlf.js} +1 -1
  95. package/dist/client/assets/{connection-detail-h3ij6cJ8.js → connection-detail-B1CUhrCf.js} +1 -1
  96. package/dist/client/assets/{connection-form-helpers-gBL9Nxes.js → connection-form-helpers-A-ice7hV.js} +1 -1
  97. package/dist/client/assets/{connection-iWW5aACQ.js → connection-i81ceuI_.js} +1 -1
  98. package/dist/client/assets/{connections-CKkDeY6W.js → connections-c58lE1Jh.js} +1 -1
  99. package/dist/client/assets/{create-organization-dialog-BlGOFb1T.js → create-organization-dialog-CMsTWAhN.js} +1 -1
  100. package/dist/client/assets/{decopilot-sse-pool-CjBfWywC.js → decopilot-sse-pool-Mm0_VpAW.js} +1 -1
  101. package/dist/client/assets/{dialog-D-uKwXFm.js → dialog-DvRG0LXq.js} +1 -1
  102. package/dist/client/assets/{domain-settings-DUMFv7Sl.js → domain-settings-Dqh5DIsU.js} +1 -1
  103. package/dist/client/assets/{drawer-Bp8C8-qH.js → drawer-DiywIRAo.js} +1 -1
  104. package/dist/client/assets/{dropdown-menu-DMelZ0yv.js → dropdown-menu-DvTh7p6k.js} +1 -1
  105. package/dist/client/assets/{e2e-tab-DBCmC4Hx.js → e2e-tab-BF6PMumQ.js} +1 -1
  106. package/dist/client/assets/{editor-oto4G8T3.js → editor-DjBvoIOB.js} +1 -1
  107. package/dist/client/assets/{empty-state-B-_jlzZd.js → empty-state-BOpb4mHN.js} +1 -1
  108. package/dist/client/assets/{empty-state-vKsTAbhp.js → empty-state-DDRzMCio.js} +1 -1
  109. package/dist/client/assets/{extract-connection-data-D6IairXX.js → extract-connection-data-4zMEd37v.js} +1 -1
  110. package/dist/client/assets/{file-explorer-U8Lw3ff9.js → file-explorer-DJ0rPlTn.js} +1 -1
  111. package/dist/client/assets/{file-type-icon-CALFZkPK.js → file-type-icon-DG23d1wD.js} +1 -1
  112. package/dist/client/assets/{folder-icon-RZCrj3jj.js → folder-icon-DKmdZs2Y.js} +1 -1
  113. package/dist/client/assets/{form-CbV5KIyp.js → form-BsByhnxl.js} +1 -1
  114. package/dist/client/assets/{general-CdnOqb7z.js → general-BvuajMaf.js} +1 -1
  115. package/dist/client/assets/{github-icon-CazNbiZj.js → github-icon-C8dHKvvO.js} +1 -1
  116. package/dist/client/assets/{hooks-xKYDzXmT.js → hooks-nEVrB3Q6.js} +1 -1
  117. package/dist/client/assets/{hosting-tab-DOqkxJ-z.js → hosting-tab-v8RKX4UW.js} +1 -1
  118. package/dist/client/assets/{index-BKRyH2uG.js → index-BpaQP7io.js} +1 -1
  119. package/dist/client/assets/{index-CAxyiWUX.js → index-CUqIeab7.js} +2 -2
  120. package/dist/client/assets/{index-Dl8Jqu3q.js → index-DAIDYoiz.js} +1 -1
  121. package/dist/client/assets/{index-DmY4xcT7.js → index-DDaBYwqH.js} +1 -1
  122. package/dist/client/assets/{index-BtGt4xP5.js → index-DJt-rspS.js} +1 -1
  123. package/dist/client/assets/{index-CLmkCxDm.js → index-Dbr1N5YS.js} +1 -1
  124. package/dist/client/assets/{index-h1NyFnph.js → index-DggClV5Q.js} +1 -1
  125. package/dist/client/assets/{index-CH-Bj-Ip.js → index-_hQRxCWe.js} +1 -1
  126. package/dist/client/assets/{index-B_J1J3ma.js → index-nP5Q02jB.js} +1 -1
  127. package/dist/client/assets/index-qaQ1QYNE.js +827 -0
  128. package/dist/client/assets/{index-redirect-0trzl4oM.js → index-redirect-Q86sWKme.js} +1 -1
  129. package/dist/client/assets/{index-ClNMM-Q8.js → index-sD98a00Y.js} +1 -1
  130. package/dist/client/assets/{infiniteQueryObserver-B_nP0mf8.js → infiniteQueryObserver-CNk--LJl.js} +1 -1
  131. package/dist/client/assets/{infra-billing-Dk5L4H1w.js → infra-billing-DNcL6rSd.js} +1 -1
  132. package/dist/client/assets/{input-CitSvqgT.js → input-Cxnnxdlr.js} +1 -1
  133. package/dist/client/assets/{integration-icon-CzkopEn-.js → integration-icon-CI03csrC.js} +1 -1
  134. package/dist/client/assets/{invite-member-dialog-DmVVlTqR.js → invite-member-dialog-BzYHeNZv.js} +1 -1
  135. package/dist/client/assets/{label-7SaWrgYE.js → label-B1C7T4pw.js} +1 -1
  136. package/dist/client/assets/{layout-BT1-keHT.js → layout-CJ4amu1a.js} +1 -1
  137. package/dist/client/assets/{login-CfvhY_fy.js → login-BeVgdxP4.js} +1 -1
  138. package/dist/client/assets/{markdown-CDl5OTvh.js → markdown--9USoVDl.js} +1 -1
  139. package/dist/client/assets/{mcp-app-renderer-DIiBD5lK.js → mcp-app-renderer-DRv-haRQ.js} +1 -1
  140. package/dist/client/assets/{mcp-oauth-DobgGAI3.js → mcp-oauth-CONCxFWe.js} +1 -1
  141. package/dist/client/assets/{members-DsEMwAZS.js → members-8e_4fnPc.js} +1 -1
  142. package/dist/client/assets/{monaco-editor-BVbF1NdG.js → monaco-editor-Pgx-H50J.js} +1 -1
  143. package/dist/client/assets/{monitoring-stats-row-D8VYrIxo.js → monitoring-stats-row-BdEB4KpK.js} +1 -1
  144. package/dist/client/assets/{multi-select-6otU-BoC.js → multi-select-v58WHEgh.js} +1 -1
  145. package/dist/client/assets/{oauth-callback-DZSxBAqJ.js → oauth-callback-CJXH8Oaq.js} +1 -1
  146. package/dist/client/assets/{oauth-callback-ai-provider-ZOT6i4aR.js → oauth-callback-ai-provider-RD6H5Bbm.js} +1 -1
  147. package/dist/client/assets/{onboarding-Courp4T-.js → onboarding-DRJ0hbZi.js} +1 -1
  148. package/dist/client/assets/{org-layout-DTDxRhY6.js → org-layout-B78TUmRd.js} +1 -1
  149. package/dist/client/assets/{organization-choice-azKkJZio.js → organization-choice-DHFPWgXh.js} +1 -1
  150. package/dist/client/assets/{orgs-Bit3hO4B.js → orgs-Bu8pWsv6.js} +1 -1
  151. package/dist/client/assets/{page-seo-form-BxezCThu.js → page-seo-form-QqmuDK1U.js} +1 -1
  152. package/dist/client/assets/{popover-BVzbVAEC.js → popover-YpurYtsj.js} +1 -1
  153. package/dist/client/assets/{post-calendar-BiQAaSQQ.js → post-calendar-DOpuGVop.js} +1 -1
  154. package/dist/client/assets/post-editor-D4aYTGxw.js +1 -0
  155. package/dist/client/assets/{primitives-CDAxd7J-.js → primitives-A34_KHi2.js} +1 -1
  156. package/dist/client/assets/{profile-Bit-RH8a.js → profile-VWMcAqbc.js} +1 -1
  157. package/dist/client/assets/{project-app-view-Bo51Gz3O.js → project-app-view-ETxQQwwB.js} +1 -1
  158. package/dist/client/assets/{project-icon-Bh8XJJ5v.js → project-icon-hCw8bcfe.js} +1 -1
  159. package/dist/client/assets/{prompts-CI8ZBFYK.js → prompts-CWmF0nUM.js} +1 -1
  160. package/dist/client/assets/record-editor-CHHK5F7J.js +1 -0
  161. package/dist/client/assets/redirect-editor-DWB3QNKL.js +1 -0
  162. package/dist/client/assets/registry-0K1LpgHe.js +2 -0
  163. package/dist/client/assets/{registry-layout-DNeBTqbz.js → registry-layout-NgqpMzWD.js} +1 -1
  164. package/dist/client/assets/{reports-It1aVrxR.js → reports-XDKJkxfv.js} +1 -1
  165. package/dist/client/assets/{repositories-w2R3QGB6.js → repositories-ClHGtd2l.js} +1 -1
  166. package/dist/client/assets/{repository-import-picker-VQJQIiOj.js → repository-import-picker-BEGrL2x5.js} +1 -1
  167. package/dist/client/assets/{repository-picker-D1QzRNsl.js → repository-picker-CSjQxH0j.js} +1 -1
  168. package/dist/client/assets/{require-capability-Bu1T_yDo.js → require-capability-B6Hi7_7R.js} +1 -1
  169. package/dist/client/assets/{required-auth-layout-B77LUmsG.js → required-auth-layout-C2VDRW_i.js} +1 -1
  170. package/dist/client/assets/{reset-password-fIByVwMv.js → reset-password-DnYn8mQc.js} +1 -1
  171. package/dist/client/assets/{review-settings-7Oij1Cxa.js → review-settings-CU3sgGzh.js} +1 -1
  172. package/dist/client/assets/{roles-BX1TFiVZ.js → roles-CowIucmE.js} +1 -1
  173. package/dist/client/assets/{schema-CI82sAmn.js → schema-gs8yp1Oc.js} +1 -1
  174. package/dist/client/assets/{scroll-area-Dkowaycv.js → scroll-area-DcLgt3b_.js} +1 -1
  175. package/dist/client/assets/{search-input-Cg9gyJ02.js → search-input-C7bpI8jZ.js} +1 -1
  176. package/dist/client/assets/{secrets-DAjovl82.js → secrets-DF0bX3Wp.js} +1 -1
  177. package/dist/client/assets/{sections-editor-Bc9y5t1P.js → sections-editor-DqyWYq_G.js} +1 -1
  178. package/dist/client/assets/{select-B319mTcJ.js → select--D2UH42o.js} +1 -1
  179. package/dist/client/assets/{select-model-sqeiRACB.js → select-model-ByqKkp0-.js} +1 -1
  180. package/dist/client/assets/{self-tool-result-DOfFUIit.js → self-tool-result-CkOMLwNz.js} +1 -1
  181. package/dist/client/assets/{seo-editor-HR6BXCEj.js → seo-editor-DKlw02eq.js} +1 -1
  182. package/dist/client/assets/settings-layout-CdH4rigQ.js +1 -0
  183. package/dist/client/assets/{settings-sidebar-Ct3SF6YY.js → settings-sidebar-BpTD6igi.js} +1 -1
  184. package/dist/client/assets/{shell-controls-11u0Zuk9.js → shell-controls-GTraqRZg.js} +1 -1
  185. package/dist/client/assets/{shell-layout-DQdhvYRd.js → shell-layout-CYvZIAPY.js} +1 -1
  186. package/dist/client/assets/{skill-preview-Du1lClro.js → skill-preview-Dn-HNldE.js} +1 -1
  187. package/dist/client/assets/{skills-xpgdaC5J.js → skills-DrMNoX5q.js} +1 -1
  188. package/dist/client/assets/{sso-DM9aOlkc.js → sso-DZdqtnBq.js} +1 -1
  189. package/dist/client/assets/{store-CbLYuUP_.js → store-TYuTf05T.js} +1 -1
  190. package/dist/client/assets/store-registry-DuhwwiUC.js +2 -0
  191. package/dist/client/assets/{switch-DXcrBQXR.js → switch-DkXW4Inp.js} +1 -1
  192. package/dist/client/assets/{synced-repos-DEPOsWFn.js → synced-repos-D4i6b91D.js} +1 -1
  193. package/dist/client/assets/{table-D8Qd6N0C.js → table-DmZhvzS8.js} +1 -1
  194. package/dist/client/assets/{tabs-i46LKPV5.js → tabs-Dx52e2-m.js} +1 -1
  195. package/dist/client/assets/{task-board-BkZ3ZsEu.js → task-board-B5MYUZUj.js} +1 -1
  196. package/dist/client/assets/{task-route-DohuS8Ym.js → task-route-CA4MfbR4.js} +1 -1
  197. package/dist/client/assets/{tasks-ImOcG55m.js → tasks-DtTz3TFn.js} +1 -1
  198. package/dist/client/assets/{textarea-DqwsyaOF.js → textarea-BPMuqjk3.js} +1 -1
  199. package/dist/client/assets/{thread-intent-DTzLO3tp.js → thread-intent-DCuIcoAx.js} +1 -1
  200. package/dist/client/assets/{thread-route-BSCCkF_C.js → thread-route-DuHkYu3h.js} +1 -1
  201. package/dist/client/assets/{toggle-group-BsolqnFB.js → toggle-group-DdfsDx5y.js} +1 -1
  202. package/dist/client/assets/{toolbar-Bcj-GM8-.js → toolbar-Ddwg6O0b.js} +1 -1
  203. package/dist/client/assets/{toolbar-icon-button-CdtOfW41.js → toolbar-icon-button-DohhzRvL.js} +1 -1
  204. package/dist/client/assets/{track-Bb8KTegC.js → track-Bw_kBQv5.js} +1 -1
  205. package/dist/client/assets/{types-B_x_XnPM.js → types-BnuWUSRA.js} +1 -1
  206. package/dist/client/assets/{use-ai-providers-D4l2pJBE.js → use-ai-providers-D8ThbPeW.js} +1 -1
  207. package/dist/client/assets/{use-automations-DXl-o9Ng.js → use-automations-BYNTBsB6.js} +1 -1
  208. package/dist/client/assets/{use-autosave-C1NvfoV6.js → use-autosave-CgD0E-SG.js} +1 -1
  209. package/dist/client/assets/{use-connection-CgHONo8e.js → use-connection-gg5XBPjf.js} +1 -1
  210. package/dist/client/assets/{use-copy-DwA3jMXs.js → use-copy-OEnuKHsD.js} +1 -1
  211. package/dist/client/assets/{use-create-virtual-mcp-BgQodeXA.js → use-create-virtual-mcp-CiL61M09.js} +1 -1
  212. package/dist/client/assets/{use-date-fns-locale-BXoRYQdg.js → use-date-fns-locale-DcVwo3N3.js} +1 -1
  213. package/dist/client/assets/{use-debounced-autosave-DOPE8JMy.js → use-debounced-autosave-Kg34IBKv.js} +1 -1
  214. package/dist/client/assets/{use-debounced-value-EfFezSsf.js → use-debounced-value-rk7GBhdA.js} +1 -1
  215. package/dist/client/assets/{use-decopilot-events-ClpFiFWE.js → use-decopilot-events-DinKLrMf.js} +1 -1
  216. package/dist/client/assets/{use-delete-connection-vORhZix_.js → use-delete-connection-BSCFwju2.js} +1 -1
  217. package/dist/client/assets/{use-deployment-admin-qlvkGM-s.js → use-deployment-admin-KlnZdC4K.js} +1 -1
  218. package/dist/client/assets/{use-destination-route-DDkyeLXx.js → use-destination-route-B8BLrnk5.js} +1 -1
  219. package/dist/client/assets/{use-file-configs-D3SICNe7.js → use-file-configs-BrzTQNY6.js} +1 -1
  220. package/dist/client/assets/{use-infinite-scroll-Bh9tLO8G.js → use-infinite-scroll-BOYL1oEn.js} +1 -1
  221. package/dist/client/assets/{use-join-requests-CDw-wGKL.js → use-join-requests-BSV-ukRL.js} +1 -1
  222. package/dist/client/assets/{use-mcp-auth-status-BZ_EmIXq.js → use-mcp-auth-status-B3dt-k5d.js} +1 -1
  223. package/dist/client/assets/{use-mcp-client-BmITSWDc.js → use-mcp-client-DGbUDOMD.js} +1 -1
  224. package/dist/client/assets/{use-mcp-prompts-C-RpeOl9.js → use-mcp-prompts-B3bXOrA6.js} +1 -1
  225. package/dist/client/assets/{use-mcp-tools-qKKyzcTI.js → use-mcp-tools-DlIsZL8B.js} +1 -1
  226. package/dist/client/assets/{use-members-Cly6ZRuF.js → use-members-CAiQrBit.js} +1 -1
  227. package/dist/client/assets/{use-navigate-to-agent-BAIm5fDQ.js → use-navigate-to-agent-D2S3QPJf.js} +1 -1
  228. package/dist/client/assets/{use-org-auth-client-vLBbes5N.js → use-org-auth-client-B6wyW2hL.js} +1 -1
  229. package/dist/client/assets/{use-org-notice-B9--X4Uj.js → use-org-notice-BxvURUBZ.js} +1 -1
  230. package/dist/client/assets/{use-org-sso-CGyaUDmi.js → use-org-sso-sotFBxSE.js} +1 -1
  231. package/dist/client/assets/{use-organization-roles-Du4WcFJr.js → use-organization-roles-l5KeHAux.js} +1 -1
  232. package/dist/client/assets/{use-organization-settings-DKZN8RUD.js → use-organization-settings-DkOeJGqN.js} +1 -1
  233. package/dist/client/assets/{use-panel-navigate-85HGXGn5.js → use-panel-navigate-Ddo_Q-1H.js} +1 -1
  234. package/dist/client/assets/{use-registry-connections-BKlOxkfQ.js → use-registry-connections-Dc5cn3PN.js} +1 -1
  235. package/dist/client/assets/{use-secrets-DaS9Knm4.js → use-secrets-BAy-T_BS.js} +1 -1
  236. package/dist/client/assets/{use-section-preview-base-P1QgVb19.js → use-section-preview-base-BjeKCjJ5.js} +1 -1
  237. package/dist/client/assets/{use-status-sounds-BA0_daQ8.js → use-status-sounds-APSzQXMI.js} +1 -1
  238. package/dist/client/assets/{use-tags-Ctbe89zh.js → use-tags-BGmubQti.js} +1 -1
  239. package/dist/client/assets/{use-view-mode-_A1ExYFV.js → use-view-mode-sBzZVdJa.js} +1 -1
  240. package/dist/client/assets/{use-virtual-mcp-CMCUUQtS.js → use-virtual-mcp-BeOAAcq_.js} +1 -1
  241. package/dist/client/assets/useInfiniteQuery-DWwdYeB9.js +1 -0
  242. package/dist/client/assets/useSuspenseInfiniteQuery-P9i3bKW9.js +1 -0
  243. package/dist/client/assets/{users-D06GZ8g2.js → users-1gv5m1kK.js} +1 -1
  244. package/dist/client/assets/{variant-calendar-byALqNEM.js → variant-calendar-BoFdesdI.js} +1 -1
  245. package/dist/client/assets/{view-mode-toggle-BXz_zlTa.js → view-mode-toggle-CeZPYT5t.js} +1 -1
  246. package/dist/client/index.html +1 -1
  247. package/dist/server/cli.js +1 -1
  248. package/dist/server/server.js +1 -1
  249. package/package.json +1 -1
  250. package/dist/client/assets/api-keys-C3bN47iA.js +0 -1
  251. package/dist/client/assets/app-editor-CuN05X2t.js +0 -1
  252. package/dist/client/assets/index-Kh6VnT2D.js +0 -827
  253. package/dist/client/assets/post-editor-Xs13U-aL.js +0 -1
  254. package/dist/client/assets/record-editor-dwd6D1qT.js +0 -1
  255. package/dist/client/assets/redirect-editor-zRgLUJCK.js +0 -1
  256. package/dist/client/assets/registry-DwfgMeR2.js +0 -2
  257. package/dist/client/assets/settings-layout-CL13yluv.js +0 -1
  258. package/dist/client/assets/store-registry-O8R_boaz.js +0 -2
  259. package/dist/client/assets/useInfiniteQuery-DWWv6g11.js +0 -1
  260. package/dist/client/assets/useSuspenseInfiniteQuery-BqxnvA9n.js +0 -1
@@ -1,2 +1,2 @@
1
- import{c as m,G as x,K as y,m as I,n as R,e as P,r as A,j as g}from"./index-CAxyiWUX.js";import{s as D}from"./Eye-C7WUgC8R.js";function nt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function S(s,t,e,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(t)}/${e}${r?`?${r}`:""}`}async function F(s,t,e){const n=await fetch(s,t);if(n.ok||e?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function rt(s,t){const e=m.c(15),{org:n}=x();let r;e[0]!==n.id||e[1]!==t||e[2]!==s?(r=y.orgFsList(n.id,s,t),e[0]=n.id,e[1]=t,e[2]=s,e[3]=r):r=e[3];let i;e[4]!==n.id||e[5]!==s?(i=(c,l)=>l?.queryKey[1]===n.id&&l.queryKey[2]===s?c:void 0,e[4]=n.id,e[5]=s,e[6]=i):i=e[6];let a;e[7]!==n.slug||e[8]!==t||e[9]!==s?(a=async()=>(await(await F(S(n.slug,s,"list",{path:t}))).json()).entries.toSorted(M),e[7]=n.slug,e[8]=t,e[9]=s,e[10]=a):a=e[10];let o;return e[11]!==r||e[12]!==i||e[13]!==a?(o={queryKey:r,placeholderData:i,queryFn:a},e[11]=r,e[12]=i,e[13]=a,e[14]=o):o=e[14],I(o)}function M(s,t){return s.kind!==t.kind?s.kind==="dir"?-1:1:s.path.localeCompare(t.path)}async function B(s,t,e){const n=await F(S(s,t,"stat",{path:e}),void 0,{allow404:!0});return n.status===404?null:(await n.json()).entry}function it(s,t,e){const n=m.c(15),{org:r}=x();let i;n[0]!==r.id||n[1]!==t||n[2]!==s?(i=y.orgFsStat(r.id,s??"",t),n[0]=r.id,n[1]=t,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let o;n[4]!==e?(o=e?.refetchIntervalWhenAbsent?d=>d.state.data?!1:e.refetchIntervalWhenAbsent??!1:void 0,n[4]=e,n[5]=o):o=n[5];let c;n[6]!==r.slug||n[7]!==t||n[8]!==s?(c=()=>B(r.slug,s??"",t),n[6]=r.slug,n[7]=t,n[8]=s,n[9]=c):c=n[9];let l;return n[10]!==i||n[11]!==a||n[12]!==o||n[13]!==c?(l={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},n[10]=i,n[11]=a,n[12]=o,n[13]=c,n[14]=l):l=n[14],I(l)}function ot(s){const t=m.c(9),{org:e}=x();let n;t[0]!==e.id||t[1]!==s?(n=y.orgFsUsage(e.id,s),t[0]=e.id,t[1]=s,t[2]=n):n=t[2];let r;t[3]!==e.slug||t[4]!==s?(r=async()=>await(await F(S(e.slug,s,"usage"))).json(),t[3]=e.slug,t[4]=s,t[5]=r):r=t[5];let i;return t[6]!==n||t[7]!==r?(i={queryKey:n,queryFn:r},t[6]=n,t[7]=r,t[8]=i):i=t[8],I(i)}function at(s,t){const e=m.c(9),n=s===void 0?60:s,{org:r}=x();let i;e[0]!==r.id?(i=y.orgFsRecent(r.id),e[0]=r.id,e[1]=i):i=e[1];const a=t?.enabled;let o;e[2]!==n||e[3]!==r.slug?(o=async()=>(await(await F(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,e[2]=n,e[3]=r.slug,e[4]=o):o=e[4];let c;return e[5]!==i||e[6]!==a||e[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},e[5]=i,e[6]=a,e[7]=o,e[8]=c):c=e[8],I(c)}const Q=50;function lt(s,t){const e=m.c(16),{org:n}=x();let r;e[0]!==n.id||e[1]!==s||e[2]!==t?.prefix||e[3]!==t?.volume?(r=y.orgFsSearch(n.id,s,t?.volume??"",t?.prefix??""),e[0]=n.id,e[1]=s,e[2]=t?.prefix,e[3]=t?.volume,e[4]=r):r=e[4];const i=s.length>0;let a;e[5]!==n.id?(a=(l,d)=>d?.queryKey[1]===n.id?l:void 0,e[5]=n.id,e[6]=a):a=e[6];let o;e[7]!==n.slug||e[8]!==s||e[9]!==t?(o=async()=>{const l=new URLSearchParams({q:s,limit:String(Q)});return t&&(l.set("volume",t.volume),t.prefix&&l.set("prefix",t.prefix)),(await(await F(`/api/${encodeURIComponent(n.slug)}/fs/search?${l}`)).json()).entries},e[7]=n.slug,e[8]=s,e[9]=t,e[10]=o):o=e[10];let c;return e[11]!==r||e[12]!==i||e[13]!==a||e[14]!==o?(c={queryKey:r,enabled:i,placeholderData:a,queryFn:o},e[11]=r,e[12]=i,e[13]=a,e[14]=o,e[15]=c):c=e[15],I(c)}function ct(s){const t=m.c(8),{org:e}=x();let n;t[0]!==e.id?(n=y.orgFsSkills(e.id),t[0]=e.id,t[1]=n):n=t[1];const r=s?.enabled;let i;t[2]!==e.slug?(i=async()=>{const o=await F(`/api/${encodeURIComponent(e.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(N)},t[2]=e.slug,t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],I(a)}function N(s){return{volume:s.volume,path:s.path}}async function W(s){const t=await F(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:e}=await t.json();return e}function ft(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.slashSkills(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=()=>W(t.slug),s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,queryFn:n,staleTime:6e4},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}async function H(s,t,e){return(await F(S(s,t,"read",{path:e}))).text()}function dt(s,t){const e=m.c(8);let n;e[0]!==s?(n=y.fileText(s),e[0]=s,e[1]=n):n=e[1];const r=t?.enabled!==!1&&s!=="";let i;e[2]!==s?(i=async()=>{const o=await fetch(s,{credentials:"include"});return o.ok?await o.text():null},e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],I(a)}const X=new Set(["md","mdx","markdown","txt","text"]),G=25,V=64*1024,z=256*1024,Y=4;function J(s){const t=s.lastIndexOf(".");return t===-1?!1:X.has(s.slice(t+1).toLowerCase())}async function ut(s,t,e){const n=e?`${e}/`:"",r=f=>f.startsWith(n)?f.slice(n.length):f,i=[],a=[],o=[{path:e,depth:0}];for(;o.length>0;){const f=o.shift();if(!f)break;let h;try{h=(await(await F(S(s,t,"list",{path:f.path}))).json()).entries}catch{continue}for(const u of[...h].sort((b,w)=>b.path.localeCompare(w.path))){if(u.kind==="dir"){f.depth<Y&&o.push({path:u.path,depth:f.depth+1});continue}J(u.path)&&u.size<=V&&i.length<G?i.push(u.path):a.push(r(u.path))}}const c=await Promise.all(i.map(f=>H(s,t,f).catch(()=>null))),l=[];let d=0;return i.forEach((f,h)=>{const u=c[h];if(u==null||d+u.length>z){a.push(r(f));return}d+=u.length,l.push({relPath:r(f),content:u})}),l.sort((f,h)=>f.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:f.relPath.localeCompare(h.relPath)),a.sort(),{files:l,omittedPaths:a}}function ht(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.orgFsPublicSets(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=async()=>(await(await F(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`)).json()).sets,s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,staleTime:3e5,queryFn:n},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}function gt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e.slug||t[1]!==s?(n=r=>S(e.slug,s,"read",{path:r}),t[0]=e.slug,t[1]=s,t[2]=n):n=t[2],n}function yt(){const s=m.c(2),{org:t}=x();let e;return s[0]!==t.slug?(e=(n,r)=>S(t.slug,n,"read",{path:r}),s[0]=t.slug,s[1]=e):e=s[1],e}function pt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e||t[1]!==s?(n={mutationFn:async r=>(await(await F(S(e.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},t[0]=e,t[1]=s,t[2]=n):n=t[2],P(n)}function Ft(s){const t=m.c(18),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==s?(r=async l=>(await(await F(S(e.slug,s,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,t[0]=e,t[1]=s,t[2]=r):r=t[2];let i;t[3]!==e||t[4]!==n||t[5]!==s?(i=async l=>{const d=y.orgFsStat(e.id,s,l.path);await n.cancelQueries({queryKey:d});const f=n.getQueryData(d),h=l.mode!=="private";return n.setQueryData(d,u=>u&&{...u,readPublic:h,effectivePublic:h,shareMode:l.mode}),{key:d,previous:f}},t[3]=e,t[4]=n,t[5]=s,t[6]=i):i=t[6];let a;t[7]!==n?(a=(l,d,f)=>{f&&n.setQueryData(f.key,f.previous)},t[7]=n,t[8]=a):a=t[8];let o;t[9]!==e||t[10]!==n||t[11]!==s?(o=(l,d,f)=>{n.invalidateQueries({queryKey:y.orgFsStat(e.id,s,f.path)}),n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[9]=e,t[10]=n,t[11]=s,t[12]=o):o=t[12];let c;return t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=c):c=t[17],P(c)}function mt(s){const t=m.c(33),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==n||t[2]!==s?(r=()=>{n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[0]=e,t[1]=n,t[2]=s,t[3]=r):r=t[3];const i=r;let a;t[4]!==e||t[5]!==s?(a=async p=>{const C=(await Promise.allSettled(p.files.map(j=>{const q=p.dir?`${p.dir}/${j.name}`:j.name;return F(S(e.slug,s,"file",{path:q}),{method:"PUT",headers:{"content-type":j.type||"application/octet-stream"},body:j})}))).find(Z);if(C)throw C.reason},t[4]=e,t[5]=s,t[6]=a):a=t[6];let o;t[7]!==i||t[8]!==a?(o={mutationFn:a,onSettled:i},t[7]=i,t[8]=a,t[9]=o):o=t[9];const c=P(o);let l;t[10]!==e||t[11]!==s?(l=async p=>{await F(S(e.slug,s,"dir",{path:p}),{method:"POST"})},t[10]=e,t[11]=s,t[12]=l):l=t[12];let d;t[13]!==i||t[14]!==l?(d={mutationFn:l,onSuccess:i},t[13]=i,t[14]=l,t[15]=d):d=t[15];const f=P(d);let h;t[16]!==e||t[17]!==s?(h=async p=>{await F(S(e.slug,s,"file",{path:p}),{method:"DELETE"})},t[16]=e,t[17]=s,t[18]=h):h=t[18];let u;t[19]!==i||t[20]!==h?(u={mutationFn:h,onSuccess:i},t[19]=i,t[20]=h,t[21]=u):u=t[21];const b=P(u);let w;t[22]!==e||t[23]!==s?(w=async p=>{await F(S(e.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},t[22]=e,t[23]=s,t[24]=w):w=t[24];let k;t[25]!==i||t[26]!==w?(k={mutationFn:w,onSuccess:i},t[25]=i,t[26]=w,t[27]=k):k=t[27];const T=P(k);let $;return t[28]!==f||t[29]!==T||t[30]!==b||t[31]!==c?($={upload:c,mkdir:f,remove:b,move:T},t[28]=f,t[29]=T,t[30]=b,t[31]=c,t[32]=$):$=t[32],$}function Z(s){return s.status==="rejected"}function v(s){const t={};for(const e of s.split(`
1
+ import{c as m,G as x,K as y,m as I,n as R,e as P,r as A,j as g}from"./index-CUqIeab7.js";import{s as D}from"./Eye-Do47wJSg.js";function nt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function S(s,t,e,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(t)}/${e}${r?`?${r}`:""}`}async function F(s,t,e){const n=await fetch(s,t);if(n.ok||e?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function rt(s,t){const e=m.c(15),{org:n}=x();let r;e[0]!==n.id||e[1]!==t||e[2]!==s?(r=y.orgFsList(n.id,s,t),e[0]=n.id,e[1]=t,e[2]=s,e[3]=r):r=e[3];let i;e[4]!==n.id||e[5]!==s?(i=(c,l)=>l?.queryKey[1]===n.id&&l.queryKey[2]===s?c:void 0,e[4]=n.id,e[5]=s,e[6]=i):i=e[6];let a;e[7]!==n.slug||e[8]!==t||e[9]!==s?(a=async()=>(await(await F(S(n.slug,s,"list",{path:t}))).json()).entries.toSorted(M),e[7]=n.slug,e[8]=t,e[9]=s,e[10]=a):a=e[10];let o;return e[11]!==r||e[12]!==i||e[13]!==a?(o={queryKey:r,placeholderData:i,queryFn:a},e[11]=r,e[12]=i,e[13]=a,e[14]=o):o=e[14],I(o)}function M(s,t){return s.kind!==t.kind?s.kind==="dir"?-1:1:s.path.localeCompare(t.path)}async function B(s,t,e){const n=await F(S(s,t,"stat",{path:e}),void 0,{allow404:!0});return n.status===404?null:(await n.json()).entry}function it(s,t,e){const n=m.c(15),{org:r}=x();let i;n[0]!==r.id||n[1]!==t||n[2]!==s?(i=y.orgFsStat(r.id,s??"",t),n[0]=r.id,n[1]=t,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let o;n[4]!==e?(o=e?.refetchIntervalWhenAbsent?d=>d.state.data?!1:e.refetchIntervalWhenAbsent??!1:void 0,n[4]=e,n[5]=o):o=n[5];let c;n[6]!==r.slug||n[7]!==t||n[8]!==s?(c=()=>B(r.slug,s??"",t),n[6]=r.slug,n[7]=t,n[8]=s,n[9]=c):c=n[9];let l;return n[10]!==i||n[11]!==a||n[12]!==o||n[13]!==c?(l={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},n[10]=i,n[11]=a,n[12]=o,n[13]=c,n[14]=l):l=n[14],I(l)}function ot(s){const t=m.c(9),{org:e}=x();let n;t[0]!==e.id||t[1]!==s?(n=y.orgFsUsage(e.id,s),t[0]=e.id,t[1]=s,t[2]=n):n=t[2];let r;t[3]!==e.slug||t[4]!==s?(r=async()=>await(await F(S(e.slug,s,"usage"))).json(),t[3]=e.slug,t[4]=s,t[5]=r):r=t[5];let i;return t[6]!==n||t[7]!==r?(i={queryKey:n,queryFn:r},t[6]=n,t[7]=r,t[8]=i):i=t[8],I(i)}function at(s,t){const e=m.c(9),n=s===void 0?60:s,{org:r}=x();let i;e[0]!==r.id?(i=y.orgFsRecent(r.id),e[0]=r.id,e[1]=i):i=e[1];const a=t?.enabled;let o;e[2]!==n||e[3]!==r.slug?(o=async()=>(await(await F(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,e[2]=n,e[3]=r.slug,e[4]=o):o=e[4];let c;return e[5]!==i||e[6]!==a||e[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},e[5]=i,e[6]=a,e[7]=o,e[8]=c):c=e[8],I(c)}const Q=50;function lt(s,t){const e=m.c(16),{org:n}=x();let r;e[0]!==n.id||e[1]!==s||e[2]!==t?.prefix||e[3]!==t?.volume?(r=y.orgFsSearch(n.id,s,t?.volume??"",t?.prefix??""),e[0]=n.id,e[1]=s,e[2]=t?.prefix,e[3]=t?.volume,e[4]=r):r=e[4];const i=s.length>0;let a;e[5]!==n.id?(a=(l,d)=>d?.queryKey[1]===n.id?l:void 0,e[5]=n.id,e[6]=a):a=e[6];let o;e[7]!==n.slug||e[8]!==s||e[9]!==t?(o=async()=>{const l=new URLSearchParams({q:s,limit:String(Q)});return t&&(l.set("volume",t.volume),t.prefix&&l.set("prefix",t.prefix)),(await(await F(`/api/${encodeURIComponent(n.slug)}/fs/search?${l}`)).json()).entries},e[7]=n.slug,e[8]=s,e[9]=t,e[10]=o):o=e[10];let c;return e[11]!==r||e[12]!==i||e[13]!==a||e[14]!==o?(c={queryKey:r,enabled:i,placeholderData:a,queryFn:o},e[11]=r,e[12]=i,e[13]=a,e[14]=o,e[15]=c):c=e[15],I(c)}function ct(s){const t=m.c(8),{org:e}=x();let n;t[0]!==e.id?(n=y.orgFsSkills(e.id),t[0]=e.id,t[1]=n):n=t[1];const r=s?.enabled;let i;t[2]!==e.slug?(i=async()=>{const o=await F(`/api/${encodeURIComponent(e.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(N)},t[2]=e.slug,t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],I(a)}function N(s){return{volume:s.volume,path:s.path}}async function W(s){const t=await F(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:e}=await t.json();return e}function ft(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.slashSkills(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=()=>W(t.slug),s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,queryFn:n,staleTime:6e4},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}async function H(s,t,e){return(await F(S(s,t,"read",{path:e}))).text()}function dt(s,t){const e=m.c(8);let n;e[0]!==s?(n=y.fileText(s),e[0]=s,e[1]=n):n=e[1];const r=t?.enabled!==!1&&s!=="";let i;e[2]!==s?(i=async()=>{const o=await fetch(s,{credentials:"include"});return o.ok?await o.text():null},e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],I(a)}const X=new Set(["md","mdx","markdown","txt","text"]),G=25,V=64*1024,z=256*1024,Y=4;function J(s){const t=s.lastIndexOf(".");return t===-1?!1:X.has(s.slice(t+1).toLowerCase())}async function ut(s,t,e){const n=e?`${e}/`:"",r=f=>f.startsWith(n)?f.slice(n.length):f,i=[],a=[],o=[{path:e,depth:0}];for(;o.length>0;){const f=o.shift();if(!f)break;let h;try{h=(await(await F(S(s,t,"list",{path:f.path}))).json()).entries}catch{continue}for(const u of[...h].sort((b,w)=>b.path.localeCompare(w.path))){if(u.kind==="dir"){f.depth<Y&&o.push({path:u.path,depth:f.depth+1});continue}J(u.path)&&u.size<=V&&i.length<G?i.push(u.path):a.push(r(u.path))}}const c=await Promise.all(i.map(f=>H(s,t,f).catch(()=>null))),l=[];let d=0;return i.forEach((f,h)=>{const u=c[h];if(u==null||d+u.length>z){a.push(r(f));return}d+=u.length,l.push({relPath:r(f),content:u})}),l.sort((f,h)=>f.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:f.relPath.localeCompare(h.relPath)),a.sort(),{files:l,omittedPaths:a}}function ht(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.orgFsPublicSets(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=async()=>(await(await F(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`)).json()).sets,s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,staleTime:3e5,queryFn:n},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}function gt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e.slug||t[1]!==s?(n=r=>S(e.slug,s,"read",{path:r}),t[0]=e.slug,t[1]=s,t[2]=n):n=t[2],n}function yt(){const s=m.c(2),{org:t}=x();let e;return s[0]!==t.slug?(e=(n,r)=>S(t.slug,n,"read",{path:r}),s[0]=t.slug,s[1]=e):e=s[1],e}function pt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e||t[1]!==s?(n={mutationFn:async r=>(await(await F(S(e.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},t[0]=e,t[1]=s,t[2]=n):n=t[2],P(n)}function Ft(s){const t=m.c(18),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==s?(r=async l=>(await(await F(S(e.slug,s,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,t[0]=e,t[1]=s,t[2]=r):r=t[2];let i;t[3]!==e||t[4]!==n||t[5]!==s?(i=async l=>{const d=y.orgFsStat(e.id,s,l.path);await n.cancelQueries({queryKey:d});const f=n.getQueryData(d),h=l.mode!=="private";return n.setQueryData(d,u=>u&&{...u,readPublic:h,effectivePublic:h,shareMode:l.mode}),{key:d,previous:f}},t[3]=e,t[4]=n,t[5]=s,t[6]=i):i=t[6];let a;t[7]!==n?(a=(l,d,f)=>{f&&n.setQueryData(f.key,f.previous)},t[7]=n,t[8]=a):a=t[8];let o;t[9]!==e||t[10]!==n||t[11]!==s?(o=(l,d,f)=>{n.invalidateQueries({queryKey:y.orgFsStat(e.id,s,f.path)}),n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[9]=e,t[10]=n,t[11]=s,t[12]=o):o=t[12];let c;return t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=c):c=t[17],P(c)}function mt(s){const t=m.c(33),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==n||t[2]!==s?(r=()=>{n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[0]=e,t[1]=n,t[2]=s,t[3]=r):r=t[3];const i=r;let a;t[4]!==e||t[5]!==s?(a=async p=>{const C=(await Promise.allSettled(p.files.map(j=>{const q=p.dir?`${p.dir}/${j.name}`:j.name;return F(S(e.slug,s,"file",{path:q}),{method:"PUT",headers:{"content-type":j.type||"application/octet-stream"},body:j})}))).find(Z);if(C)throw C.reason},t[4]=e,t[5]=s,t[6]=a):a=t[6];let o;t[7]!==i||t[8]!==a?(o={mutationFn:a,onSettled:i},t[7]=i,t[8]=a,t[9]=o):o=t[9];const c=P(o);let l;t[10]!==e||t[11]!==s?(l=async p=>{await F(S(e.slug,s,"dir",{path:p}),{method:"POST"})},t[10]=e,t[11]=s,t[12]=l):l=t[12];let d;t[13]!==i||t[14]!==l?(d={mutationFn:l,onSuccess:i},t[13]=i,t[14]=l,t[15]=d):d=t[15];const f=P(d);let h;t[16]!==e||t[17]!==s?(h=async p=>{await F(S(e.slug,s,"file",{path:p}),{method:"DELETE"})},t[16]=e,t[17]=s,t[18]=h):h=t[18];let u;t[19]!==i||t[20]!==h?(u={mutationFn:h,onSuccess:i},t[19]=i,t[20]=h,t[21]=u):u=t[21];const b=P(u);let w;t[22]!==e||t[23]!==s?(w=async p=>{await F(S(e.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},t[22]=e,t[23]=s,t[24]=w):w=t[24];let k;t[25]!==i||t[26]!==w?(k={mutationFn:w,onSuccess:i},t[25]=i,t[26]=w,t[27]=k):k=t[27];const T=P(k);let $;return t[28]!==f||t[29]!==T||t[30]!==b||t[31]!==c?($={upload:c,mkdir:f,remove:b,move:T},t[28]=f,t[29]=T,t[30]=b,t[31]=c,t[32]=$):$=t[32],$}function Z(s){return s.status==="rejected"}function v(s){const t={};for(const e of s.split(`
2
2
  `)){const n=e.match(/^([A-Za-z][\w-]*):\s*(.*)$/);n?.[1]&&n[2]!==void 0&&(t[n[1].toLowerCase()]=n[2].trim())}return t}function U(s){for(const t of s.split(/\n\s*\n/)){const e=t.trim();if(!(!e||e.startsWith("#")))return e.replace(/\n/g," ")}return null}function wt(s){const t=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!t||t[1]===void 0)return{name:null,description:U(s),body:s};const e=v(t[1]),n=s.slice(t[0].length);return{name:e.name||null,description:e.description||U(n),body:n}}const tt={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}};function St(s){const t=m.c(46);let e,n,r,i;t[0]!==s?({glyph:e,readOnly:r,tone:i,...n}=s,t[0]=s,t[1]=e,t[2]=n,t[3]=r,t[4]=i):(e=t[1],n=t[2],r=t[3],i=t[4]);const o=tt[i===void 0?"default":i],c=A.useId(),l=`${c}-back`,d=`${c}-front`,f=`url(#${l})`;let h;t[5]!==f?(h=g.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:f}),t[5]=f,t[6]=h):h=t[6];const u=`url(#${d})`;let b;t[7]!==u?(b=g.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),t[7]=u,t[8]=b):b=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),t[9]=w):w=t[9];let k,T;t[10]!==o.stripe?(k=g.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:o.stripe}),T=g.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:o.stripe}),t[10]=o.stripe,t[11]=k,t[12]=T):(k=t[11],T=t[12]);let $;t[13]!==e||t[14]!==o.glyph?($=e&&g.jsx(e,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:o.glyph,opacity:.55}}),t[13]=e,t[14]=o.glyph,t[15]=$):$=t[15];let p;t[16]!==r?(p=r&&g.jsxs(g.Fragment,{children:[g.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),g.jsx(D,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),t[16]=r,t[17]=p):p=t[17];let K;t[18]!==o.backFrom?(K=g.jsx("stop",{offset:"0.3",stopColor:o.backFrom}),t[18]=o.backFrom,t[19]=K):K=t[19];let C;t[20]!==o.backTo?(C=g.jsx("stop",{offset:"1",stopColor:o.backTo}),t[20]=o.backTo,t[21]=C):C=t[21];let j;t[22]!==l||t[23]!==K||t[24]!==C?(j=g.jsxs("linearGradient",{id:l,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[K,C]}),t[22]=l,t[23]=K,t[24]=C,t[25]=j):j=t[25];let q;t[26]!==o.frontFrom?(q=g.jsx("stop",{stopColor:o.frontFrom}),t[26]=o.frontFrom,t[27]=q):q=t[27];let O;t[28]!==o.frontTo?(O=g.jsx("stop",{offset:"1",stopColor:o.frontTo}),t[28]=o.frontTo,t[29]=O):O=t[29];let L;t[30]!==d||t[31]!==q||t[32]!==O?(L=g.jsxs("radialGradient",{id:d,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[q,O]}),t[30]=d,t[31]=q,t[32]=O,t[33]=L):L=t[33];let E;t[34]!==j||t[35]!==L?(E=g.jsxs("defs",{children:[j,L]}),t[34]=j,t[35]=L,t[36]=E):E=t[36];let _;return t[37]!==n||t[38]!==p||t[39]!==E||t[40]!==h||t[41]!==b||t[42]!==k||t[43]!==T||t[44]!==$?(_=g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[h,b,w,k,T,$,p,E]}),t[37]=n,t[38]=p,t[39]=E,t[40]=h,t[41]=b,t[42]=k,t[43]=T,t[44]=$,t[45]=_):_=t[45],_}export{St as F,W as a,yt as b,at as c,ct as d,gt as e,ut as f,pt as g,nt as h,Ft as i,it as j,dt as k,rt as l,lt as m,ht as n,ot as o,wt as p,ft as q,B as r,mt as u};
@@ -1 +1 @@
1
- import{fa as C,c as f,j as c,as as j,r as d,l as p,cf as b,fb as v,fc as h}from"./index-CAxyiWUX.js";import{L as N}from"./label-7SaWrgYE.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
1
+ import{fa as C,c as f,j as c,as as j,r as d,l as p,cf as b,fb as v,fc as h}from"./index-CUqIeab7.js";import{L as N}from"./label-B1C7T4pw.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
@@ -1 +1 @@
1
- import{ae as re,ag as X,b as U,G as ie,n as le,aq as ce,ar as ge,e as ne,o as W,t as G,K as ee,j as i,b1 as se,b0 as oe,a$ as Q,as as de,c as Y,r as J,a7 as me,M as te,cS as ue,cT as fe,w as pe,B as he,P as M,b5 as xe}from"./index-CAxyiWUX.js";import{u as je}from"./use-org-auth-client-vLBbes5N.js";import{u as ze}from"./use-debounced-autosave-DOPE8JMy.js";import{A as Se}from"./avatar-BksZI35j.js";import{I as ae}from"./input-CitSvqgT.js";import{C as ve}from"./review-settings-7Oij1Cxa.js";import{D as Oe}from"./domain-settings-DUMFv7Sl.js";import{c as be,d as ye,b as Ce,f as _e,g as Ae,e as De,a as Fe,A as we}from"./alert-dialog-BqNLZYNg.js";import{R as Ne}from"./require-capability-Bu1T_yDo.js";import"./User01-Ca62JORv.js";import"./switch-DXcrBQXR.js";import"./UserSquare-SrVzzZLD.js";import"./GitBranch01-BJ0mK5px.js";import"./SearchLg-U_q5JUZG.js";import"./use-organization-settings-DKZN8RUD.js";import"./use-mcp-client-BmITSWDc.js";import"./auth-DG9IEB0V.js";import"./schema-CI82sAmn.js";import"./task-board-BkZ3ZsEu.js";import"./use-connection-CgHONo8e.js";import"./badge-jb7Eney9.js";import"./select-B319mTcJ.js";import"./Check-DobcY0eV.js";import"./ChevronUp-CMgbFVj1.js";import"./access-gate-DIa93VYf.js";import"./capability-load-error-4BGIkSS4.js";const Te=re({name:X().min(1,"Name is required").max(255,"Name is too long"),logo:X().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=U(),m=J.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=Z=>{const z=Z.target.files?.[0];if(!z)return;if(z.size>2097152){G.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>G.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Pe(){const e=U(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{W("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),G.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{W("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),G.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.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:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Le(){const e=Y.c(86),t=U(),{org:n}=ie(),[g,r]=J.useState(!1),[l,d]=J.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{W("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),G.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{G.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const Z=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:Z,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=v=>{r(v),v||d("")},e[35]=$):$=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=v=>d(v.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:K,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(_e,{children:E}),e[63]=E,e[64]=P):P=e[64];let L;e[65]!==o?(L=()=>o.mutate(),e[65]=o,e[66]=L):L=e[66];const H=l!==n.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==L||e[71]!==H||e[72]!==k?(R=i.jsx(Ae,{onClick:L,disabled:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=L,e[71]=H,e[72]=k,e[73]=R):R=e[73];let I;e[74]!==P||e[75]!==R?(I=i.jsxs(De,{children:[P,R]}),e[74]=P,e[75]=R,e[76]=I):I=e[76];let q;e[77]!==T||e[78]!==I?(q=i.jsxs(Fe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=q):q=e[79];let B;e[80]!==g||e[81]!==q?(B=i.jsx(we,{open:g,onOpenChange:$,children:q}),e[80]=g,e[81]=q,e[82]=B):B=e[82];let V;return e[83]!==b||e[84]!==B?(V=i.jsxs(i.Fragment,{children:[b,B]}),e[83]=b,e[84]=B,e[85]=V):V=e[85],V}function ke(){const e=Y.c(10),t=U();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx(M.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Pe,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Le,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Body,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function ct(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(ke,{})}),e[0]=t):t=e[0],t}export{ct as default};
1
+ import{ae as re,ag as X,b as U,G as ie,n as le,aq as ce,ar as ge,e as ne,o as W,t as G,K as ee,j as i,b1 as se,b0 as oe,a$ as Q,as as de,c as Y,r as J,a7 as me,M as te,cS as ue,cT as fe,w as pe,B as he,P as M,b5 as xe}from"./index-CUqIeab7.js";import{u as je}from"./use-org-auth-client-B6wyW2hL.js";import{u as ze}from"./use-debounced-autosave-Kg34IBKv.js";import{A as Se}from"./avatar-DOuGhn2H.js";import{I as ae}from"./input-Cxnnxdlr.js";import{C as ve}from"./review-settings-CU3sgGzh.js";import{D as Oe}from"./domain-settings-Dqh5DIsU.js";import{c as be,d as ye,b as Ce,f as _e,g as Ae,e as De,a as Fe,A as we}from"./alert-dialog-DrQfsXCX.js";import{R as Ne}from"./require-capability-B6Hi7_7R.js";import"./User01-ClWEUyJU.js";import"./switch-DkXW4Inp.js";import"./UserSquare-BDzzhNrw.js";import"./GitBranch01-NVGMWUuB.js";import"./SearchLg-B4kXtc3z.js";import"./use-organization-settings-DkOeJGqN.js";import"./use-mcp-client-DGbUDOMD.js";import"./auth-BgRdtqaz.js";import"./schema-gs8yp1Oc.js";import"./task-board-B5MYUZUj.js";import"./use-connection-gg5XBPjf.js";import"./badge-CZW6tMPi.js";import"./select--D2UH42o.js";import"./Check-eZLp0THO.js";import"./ChevronUp-kwVzh9Ea.js";import"./access-gate-Cniwu6ws.js";import"./capability-load-error-YEX1tQVH.js";const Te=re({name:X().min(1,"Name is required").max(255,"Name is too long"),logo:X().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=U(),m=J.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=Z=>{const z=Z.target.files?.[0];if(!z)return;if(z.size>2097152){G.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>G.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Pe(){const e=U(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{W("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),G.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{W("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),G.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.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:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Le(){const e=Y.c(86),t=U(),{org:n}=ie(),[g,r]=J.useState(!1),[l,d]=J.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{W("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),G.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{G.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const Z=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:Z,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=v=>{r(v),v||d("")},e[35]=$):$=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=v=>d(v.target.value),e[50]=K):K=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:K,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(_e,{children:E}),e[63]=E,e[64]=P):P=e[64];let L;e[65]!==o?(L=()=>o.mutate(),e[65]=o,e[66]=L):L=e[66];const H=l!==n.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==L||e[71]!==H||e[72]!==k?(R=i.jsx(Ae,{onClick:L,disabled:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=L,e[71]=H,e[72]=k,e[73]=R):R=e[73];let I;e[74]!==P||e[75]!==R?(I=i.jsxs(De,{children:[P,R]}),e[74]=P,e[75]=R,e[76]=I):I=e[76];let q;e[77]!==T||e[78]!==I?(q=i.jsxs(Fe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=q):q=e[79];let B;e[80]!==g||e[81]!==q?(B=i.jsx(we,{open:g,onOpenChange:$,children:q}),e[80]=g,e[81]=q,e[82]=B):B=e[82];let V;return e[83]!==b||e[84]!==B?(V=i.jsxs(i.Fragment,{children:[b,B]}),e[83]=b,e[84]=B,e[85]=V):V=e[85],V}function ke(){const e=Y.c(10),t=U();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx(M.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Pe,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Le,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx(M,{children:i.jsx(M.Content,{children:i.jsx(M.Body,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function ct(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(ke,{})}),e[0]=t):t=e[0],t}export{ct as default};
@@ -1 +1 @@
1
- import{c as n,j as o}from"./index-CAxyiWUX.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
1
+ import{c as n,j as o}from"./index-CUqIeab7.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
@@ -1,4 +1,4 @@
1
- import{eI as It,eJ as Et,cj as R,ag as c,eK as de,co as Je,eL as Tt,ci as wt,am as Mt,ah as O,ak as W,af as oe,ae as S,aj as m,ao as U,an as At,eM as I,ai as Ot,t as ge,r as J,c as Ee,G as Ct,j as Rt}from"./index-CAxyiWUX.js";import{S as Nt,u as xt}from"./use-mcp-client-BmITSWDc.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-CjBfWywC.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));class L{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
1
+ import{eI as It,eJ as Et,cj as R,ag as c,eK as de,co as Je,eL as Tt,ci as wt,am as Mt,ah as O,ak as W,af as oe,ae as S,aj as m,ao as U,an as At,eM as I,ai as Ot,t as ge,r as J,c as Ee,G as Ct,j as Rt}from"./index-CUqIeab7.js";import{S as Nt,u as xt}from"./use-mcp-client-DGbUDOMD.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-Mm0_VpAW.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));class L{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=V(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(V):V(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(V)),t.allOf!=null&&(t.allOf=t.allOf.map(V)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(V));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=V(e[a]);return t}function V(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
@@ -1 +1 @@
1
- import{c as Ee,b as cs,G as at,m as ms,K as Ue,j as s,n as Ss,r as ne,e as as,B as ce,b8 as Rs,t as de}from"./index-CAxyiWUX.js";import{i as ot}from"./AlertCircle-CMbZRyyx.js";import{t as rt}from"./ChevronUp-CMgbFVj1.js";import{i as ct}from"./ChevronRight-BHiyCeas.js";import{be as dt,bf as Us,aD as it,av as mt,aF as ft,aY as ht,bg as ut,k as As}from"./agent-icon-CUvxlB2H.js";import{a as gt}from"./Copy01-DJ6YIZzP.js";import{i as Ns}from"./Globe01-Dj_gIo3g.js";import{n as et}from"./LinkExternal01-Cze-Sz0L.js";import{s as qs}from"./Plus-D8PEuEgy.js";import{d as Bs}from"./UserSquare-SrVzzZLD.js";import{s as Os}from"./Trash01-C_Vel1r1.js";import{i as xt}from"./Zap-BLGTK6tv.js";import{B as me}from"./badge-jb7Eney9.js";import{I as ls}from"./input-CitSvqgT.js";import{L as hs}from"./label-7SaWrgYE.js";import{c as Cs,d as Ds,b as ws,f as $s,g as zs,e as Ls,a as _s,A as ks}from"./alert-dialog-BqNLZYNg.js";import{c as Hs,d as Ms,e as Ws,b as Ks,D as Qs}from"./dialog-D-uKwXFm.js";import{S as Ys,b as Gs,a as Xs,d as Zs,c as js}from"./select-B319mTcJ.js";import{c as ss,e as os,a as ye,d as I,b as ts,T as q}from"./table-D8Qd6N0C.js";import{E as Ps}from"./empty-state-B-_jlzZd.js";import{u as bt}from"./use-virtual-mcp-CMCUUQtS.js";import{r as Tt}from"./site-slug-uya6Wp4-.js";import"./Tool01-lhbmtMl1.js";import"./ArrowUp-Kp8iOYqA.js";import"./ArrowLeft-D6wg9dRX.js";import"./Tool02-DzjxjRKe.js";import"./ArrowRight-S9PiBhNR.js";import"./TrendUp01-BLLPVsmc.js";import"./ZoomOut-CENrF5Nr.js";import"./Users03-CGlyslgC.js";import"./CheckCircle-BfaYLY9R.js";import"./Check-DobcY0eV.js";import"./ChevronSelectorVertical-WdXmtxZR.js";import"./DotsVertical-CcCXKjDQ.js";import"./CreditCard01-DUewWiH3.js";import"./Download01-B-xCoyh9.js";import"./Settings02-CSMvEGdm.js";import"./Eye-C7WUgC8R.js";import"./Share07-CGs29l88.js";import"./GitBranch01-BJ0mK5px.js";import"./XClose-BieaBilB.js";import"./HardDrive-CipJx2oY.js";import"./Image01-DNsdL6t3.js";import"./Key01-CGrwBg5t.js";import"./Link01-LzgEXOLF.js";import"./Monitor01-ByszFew3.js";import"./Sun-CWqe54Xb.js";import"./Package-Bm6sqwo4.js";import"./Palette-C08pCl2b.js";import"./Play-0UyS0cyA.js";import"./SearchLg-U_q5JUZG.js";import"./SearchMd-DYC_WQcU.js";import"./Shield01-CsXEChUa.js";import"./Stars01-DwlxBP_x.js";import"./Upload01-D_0fYmyw.js";import"./User01-Ca62JORv.js";import"./Users01-p40208rr.js";import"./XCircle-B3rJLgWV.js";import"./use-mcp-client-BmITSWDc.js";import"./auth-DG9IEB0V.js";function Is(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function ps(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 Js(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function pt(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 st(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 jt(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 Vs(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function ds(r){return r instanceof Error?r.message:String(r)}async function fs(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 rs(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 ys(r){const e=Ee.c(15),{title:o,count:l,action:i,children:a}=r;let c;e[0]!==o?(c=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:o}),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==l?(d=typeof l=="number"&&l>0&&s.jsx(me,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=d):d=e[3];let t;e[4]!==i?(t=i&&s.jsx("div",{className:"ml-auto",children:i}),e[4]=i,e[5]=t):t=e[5];let n;e[6]!==c||e[7]!==d||e[8]!==t?(n=s.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[c,d,t]}),e[6]=c,e[7]=d,e[8]=t,e[9]=n):n=e[9];let u;e[10]!==a?(u=s.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=s.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 vs(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=s.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(a=>s.jsx("div",{className:"flex gap-3",children:Array.from({length:o}).map(Pt)},a))}),e[1]=o,e[2]=i):i=e[2],i}function Pt(r,e){return s.jsx(Rs,{className:"h-4 flex-1"},e)}function Ye(r){const e=Ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=s.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 yt(r){const e=Ee.c(54),{base:o,orgSlug:l,site:i}=r,a=cs(),c=Ss(),[d,t]=ne.useState(!1);let n;e[0]!==o?(n=()=>rs(`${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)}),de.success(a("mainPanelTabs.hostingTab.toastDeployQueued")),t(!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:vt},e[7]=n,e[8]=u,e[9]=v):v=e[9];const m=as(v);let N;e[10]===Symbol.for("react.memo_cache_sentinel")?(N=()=>t(!0),e[10]=N):N=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Bs,{className:"size-4"}),e[11]=g):g=e[11];let p;e[12]!==m.isPending||e[13]!==a?(p=m.isPending?a("mainPanelTabs.hostingTab.deploying"):a("mainPanelTabs.hostingTab.deploy"),e[12]=m.isPending,e[13]=a,e[14]=p):p=e[14];let h;e[15]!==m.isPending||e[16]!==p?(h=s.jsxs(ce,{size:"sm",onClick:N,disabled:m.isPending,children:[g,p]}),e[15]=m.isPending,e[16]=p,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=s.jsx(Cs,{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 T;e[24]!==w?(T=s.jsx(Ds,{children:w}),e[24]=w,e[25]=T):T=e[25];let S;e[26]!==T||e[27]!==j?(S=s.jsxs(ws,{children:[j,T]}),e[26]=T,e[27]=j,e[28]=S):S=e[28];const $=m.isPending;let z;e[29]!==a?(z=a("mainPanelTabs.hostingTab.cancel"),e[29]=a,e[30]=z):z=e[30];let C;e[31]!==m.isPending||e[32]!==z?(C=s.jsx($s,{disabled:$,children:z}),e[31]=m.isPending,e[32]=z,e[33]=C):C=e[33];let x;e[34]!==m?(x=f=>{f.preventDefault(),m.mutate()},e[34]=m,e[35]=x):x=e[35];const P=m.isPending;let L;e[36]!==a?(L=a("mainPanelTabs.hostingTab.deploy"),e[36]=a,e[37]=L):L=e[37];let _;e[38]!==m.isPending||e[39]!==x||e[40]!==L?(_=s.jsx(zs,{onClick:x,disabled:P,children:L}),e[38]=m.isPending,e[39]=x,e[40]=L,e[41]=_):_=e[41];let b;e[42]!==C||e[43]!==_?(b=s.jsxs(Ls,{children:[C,_]}),e[42]=C,e[43]=_,e[44]=b):b=e[44];let B;e[45]!==S||e[46]!==b?(B=s.jsxs(_s,{children:[S,b]}),e[45]=S,e[46]=b,e[47]=B):B=e[47];let A;e[48]!==d||e[49]!==B?(A=s.jsx(ks,{open:d,onOpenChange:t,children:B}),e[48]=d,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==A||e[52]!==h?(V=s.jsxs(s.Fragment,{children:[h,A]}),e[51]=A,e[52]=h,e[53]=V):V=e[53],V}function vt(r){return de.error(ds(r))}function Nt(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?s.jsxs(me,{variant:"warning",children:[s.jsx(ht,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?s.jsxs(me,{variant:"secondary",children:[s.jsx(ut,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):s.jsxs(me,{variant:"secondary",children:[s.jsx(Bs,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function St(r,e,o){const l=(r??"").toLowerCase();return l==="build"?s.jsxs(me,{variant:"secondary",children:[s.jsx(Us,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?s.jsxs(me,{variant:"secondary",children:[s.jsx(xt,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?s.jsxs(me,{variant:"secondary",children:[s.jsx(Bs,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Nt(e,o)}function Ct(r,e){const o=(r??"").toLowerCase();return o==="success"?s.jsx(me,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?s.jsx(me,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?s.jsxs(me,{variant:"secondary",children:[s.jsx(it,{className:"size-3"}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Dt(r){const e=Ee.c(35),{base:o,orgSlug:l,site:i,target:a,onOpenChange:c}=r,d=cs(),t=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 m;e[5]!==o||e[6]!==n||e[7]!==u?(m=()=>fs(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(u)}`),e[5]=o,e[6]=n,e[7]=u,e[8]=m):m=e[8];const N=t&&!!n;let g;e[9]!==v||e[10]!==m||e[11]!==N?(g={queryKey:v,queryFn:m,enabled:N,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=v,e[10]=m,e[11]=N,e[12]=g):g=e[12];const p=ms(g),h=p.data;let y;e[13]!==d?(y=d("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=d,e[14]=y):y=e[14];let j;e[15]!==y?(j=s.jsx(Hs,{children:s.jsx(Ms,{children:y})}),e[15]=y,e[16]=j):j=e[16];let w;e[17]!==n||e[18]!==d?(w=d("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=d,e[19]=w):w=e[19];let T;e[20]!==w?(T=s.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:w}),e[20]=w,e[21]=T):T=e[21];let S;e[22]!==h||e[23]!==p.error||e[24]!==p.isLoading||e[25]!==d?(S=Vs(p.error)?s.jsx(Ps,{icon:s.jsx(As,{className:"size-5"}),title:d("mainPanelTabs.hostingTab.notConnectedTitle"),description:d("mainPanelTabs.hostingTab.notConnectedDescription")}):p.isLoading?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(Rs,{className:"h-4 w-full"}),s.jsx(Rs,{className:"h-4 w-full"}),s.jsx(Rs,{className:"h-4 w-2/3"})]}):p.error?s.jsx(Ye,{children:d("mainPanelTabs.hostingTab.buildLogsError")}):h&&h.configured===!1?s.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:[s.jsx(ot,{className:"size-5 text-muted-foreground"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:d("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:h.reason??d("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):h?.text?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.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&&s.jsx("p",{className:"text-xs text-warning",children:d("mainPanelTabs.hostingTab.buildLogsTruncated")}),h.url&&s.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:[s.jsx(et,{className:"size-3.5"}),d("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):h?.url?s.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:[s.jsx(et,{className:"size-4"}),d("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):s.jsx(Ye,{children:d("mainPanelTabs.hostingTab.buildLogsEmpty")}),e[22]=h,e[23]=p.error,e[24]=p.isLoading,e[25]=d,e[26]=S):S=e[26];let $;e[27]!==j||e[28]!==T||e[29]!==S?($=s.jsxs(Ks,{className:"sm:max-w-2xl",children:[j,T,S]}),e[27]=j,e[28]=T,e[29]=S,e[30]=$):$=e[30];let z;return e[31]!==c||e[32]!==t||e[33]!==$?(z=s.jsx(Qs,{open:t,onOpenChange:c,children:$}),e[31]=c,e[32]=t,e[33]=$,e[34]=z):z=e[34],z}function wt(r){const e=Ee.c(52),{base:o,orgSlug:l,site:i,enabled:a,deployments:c,isLoading:d,error:t}=r,n=cs(),[u,v]=ne.useState(null),[m,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 p;e[3]!==o?(p=()=>fs(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=p):p=e[4];let h;e[5]!==a||e[6]!==g||e[7]!==p?(h={queryKey:g,queryFn:p,enabled:a,retry:!1,staleTime:3e4},e[5]=a,e[6]=g,e[7]=p,e[8]=h):h=e[8];const y=ms(h);let j,w,T,S,$;if(e[9]!==c||e[10]!==t||e[11]!==u||e[12]!==y.data||e[13]!==y.error||e[14]!==y.isLoading||e[15]!==d||e[16]!==n){const L=ps(y.data,"items"),_=c.find(zt)?.commitSha??c.find($t)?.commitSha??null;let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=(f,G)=>{f&&N({commit:f,env:G??"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 V;e[25]!==c||e[26]!==t||e[27]!==u||e[28]!==d||e[29]!==n?(V=d?s.jsx(vs,{cols:5}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deploymentsError")}):c.length===0?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noDeployments")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:c.map(f=>{const G=!!f.buildMessage,Z=u===f.id;return s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[G?s.jsx("button",{type:"button",onClick:()=>v(Z?null:f.id),"aria-label":n("mainPanelTabs.hostingTab.showBuildMessage"),className:"text-muted-foreground hover:text-foreground",children:Z?s.jsx(rt,{className:"size-4"}):s.jsx(ct,{className:"size-4"})}):s.jsx(dt,{className:"size-4 text-muted-foreground/60"}),s.jsx("span",{className:"font-mono text-xs",children:f.shortCommit??f.commitSha?.slice(0,7)??"—"}),f.production===!0&&s.jsx(me,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(me,{variant:pt(f.phase),children:f.phase??"—"}),f.up===!0&&s.jsx(me,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:Js(f.framework)??"—"}),s.jsx(q,{className:"text-right align-middle font-mono text-xs text-muted-foreground tabular-nums",children:jt(f.durationMs)}),s.jsx(q,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:st(f.finishedAt??f.startedAt??f.createdAt)}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:s.jsx(Us,{className:"size-4"})})})]}),G&&Z&&s.jsx(ye,{children:s.jsx(q,{colSpan:6,className:"bg-muted/10",children:s.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]=t,e[27]=u,e[28]=d,e[29]=n,e[30]=V):V=e[30],e[31]!==c.length||e[32]!==V||e[33]!==A?($=s.jsx(ys,{title:A,count:c.length,children:V}),e[31]=c.length,e[32]=V,e[33]=A,e[34]=$):$=e[34],j=ys,e[35]!==n?(w=n("mainPanelTabs.hostingTab.deployHistory"),e[35]=n,e[36]=w):w=e[36],T=L.length,S=y.isLoading?s.jsx(vs,{cols:4}):y.error?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deployHistoryError")}):L.length===0?s.jsx(Ps,{icon:s.jsx(Bs,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colAction")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colActor")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:L.map(f=>{const G=!!_&&f.commitSha===_;return s.jsxs(ye,{children:[s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[St(f.type,f.action,n),Ct(f.outcome,n)]})}),s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"font-mono text-xs",children:f.commitSha?.slice(0,7)??"—"}),G&&s.jsx(me,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:Js(f.framework)??"—"}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:f.actor??"—"}),s.jsx(q,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(it,{className:"size-3"}),st(f.createdAt)]})}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:s.jsx(Us,{className:"size-4"})})})]},f.id)})})]}),e[9]=c,e[10]=t,e[11]=u,e[12]=y.data,e[13]=y.error,e[14]=y.isLoading,e[15]=d,e[16]=n,e[17]=j,e[18]=w,e[19]=T,e[20]=S,e[21]=$}else j=e[17],w=e[18],T=e[19],S=e[20],$=e[21];let z;e[37]!==j||e[38]!==w||e[39]!==T||e[40]!==S?(z=s.jsx(j,{title:w,count:T,children:S}),e[37]=j,e[38]=w,e[39]=T,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]!==m||e[45]!==l||e[46]!==i?(x=s.jsx(Dt,{base:o,orgSlug:l,site:i,target:m,onOpenChange:C}),e[43]=o,e[44]=m,e[45]=l,e[46]=i,e[47]=x):x=e[47];let P;return e[48]!==x||e[49]!==$||e[50]!==z?(P=s.jsxs(s.Fragment,{children:[$,z,x]}),e[48]=x,e[49]=$,e[50]=z,e[51]=P):P=e[51],P}function $t(r){return r.production===!0&&r.up}function zt(r){return r.up===!0}function Lt(r){const e=Ee.c(82),{base:o,orgSlug:l,site:i,envVars:a,codeVars:c,isLoading:d,error:t}=r,n=cs(),u=Ss(),[v,m]=ne.useState(""),[N,g]=ne.useState(""),[p,h]=ne.useState("runtime"),[y,j]=ne.useState(null),[w,T]=ne.useState(""),[S,$]=ne.useState(null);let z;e[0]!==o?(z=D=>rs(`${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)}),de.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:kt},e[7]=z,e[8]=C,e[9]=x):x=e[9];const P=as(x);let L;e[10]!==v||e[11]!==p||e[12]!==N||e[13]!==P||e[14]!==a||e[15]!==n?(L=()=>{const D=v.trim();if(!D){de.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(a.some(O=>Is(O,{name:D,scope:p}))){de.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}P.mutate([...a,{name:D,value:N,scope:p}],{onSuccess:()=>{m(""),g(""),h("runtime")}})},e[10]=v,e[11]=p,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=>Is(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=>!Is(D,S)),{onSuccess:()=>$(null)})},e[21]=S,e[22]=P,e[23]=a,e[24]=A):A=e[24];const V=A;let f;e[25]!==n?(f=n("mainPanelTabs.hostingTab.env"),e[25]=n,e[26]=f):f=e[26];const G=a.length;let Z;e[27]!==v||e[28]!==p||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]!==t||e[37]!==_||e[38]!==B||e[39]!==d||e[40]!==n?(Z=d?s.jsx(vs,{cols:2}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.envError")}):s.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noEnv")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colName")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colValue")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map(D=>{const O=D.scope==="build"?"build":"runtime",ze=y?.name===D.name&&y?.scope===O;return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:s.jsxs("span",{className:"inline-flex items-center gap-2",children:[D.name,s.jsx(me,{variant:O==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:n(O==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")})]})}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[360px] align-middle",children:ze?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ls,{value:w,onChange:fe=>T(fe.target.value),className:"h-7 font-mono text-xs"}),s.jsx(ce,{size:"xs",onClick:()=>B({name:D.name,scope:O}),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.save")}),s.jsx(ce,{size:"xs",variant:"ghost",onClick:()=>j(null),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.cancel")})]}):s.jsx("button",{type:"button",onClick:()=>{j({name:D.name,scope:O}),T(D.value)},className:"block w-full truncate text-left hover:underline","aria-label":n("mainPanelTabs.hostingTab.editValue"),children:D.value})}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>$({name:D.name,scope:O}),disabled:P.isPending,children:s.jsx(Os,{className:"size-4"})})})]},`${D.name}:${O}`)})})]}),s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[s.jsx(ls,{placeholder:n("mainPanelTabs.hostingTab.envNamePlaceholder"),value:v,onChange:D=>m(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),s.jsx(ls,{placeholder:n("mainPanelTabs.hostingTab.envValuePlaceholder"),value:N,onChange:D=>g(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),s.jsxs(Ys,{value:p,onValueChange:D=>h(D==="build"?"build":"runtime"),disabled:P.isPending,children:[s.jsx(Gs,{className:"h-8 w-[110px]",children:s.jsx(Xs,{})}),s.jsxs(Zs,{children:[s.jsx(js,{value:"runtime",children:n("mainPanelTabs.hostingTab.secretScopeRuntime")}),s.jsx(js,{value:"build",children:n("mainPanelTabs.hostingTab.secretScopeBuild")})]})]}),s.jsxs(ce,{size:"sm","aria-label":n("mainPanelTabs.hostingTab.addVariable"),onClick:_,disabled:P.isPending||!v.trim(),children:[s.jsx(qs,{className:"size-4"}),n("mainPanelTabs.hostingTab.add")]})]}),c.length>0&&s.jsxs("div",{className:"mt-3 flex flex-col gap-1.5 border-t border-border pt-3",children:[s.jsx("p",{className:"px-2 text-xs text-muted-foreground",children:n("mainPanelTabs.hostingTab.codeVarsHint")}),s.jsx(ss,{children:s.jsx(ts,{children:c.map(_t)})})]})]}),e[27]=v,e[28]=p,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]=t,e[37]=_,e[38]=B,e[39]=d,e[40]=n,e[41]=Z):Z=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 te;e[45]!==ve?(te=s.jsx(Cs,{children:ve}),e[45]=ve,e[46]=te):te=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=s.jsx(Ds,{children:M}),e[50]=M,e[51]=U):U=e[51];let X;e[52]!==te||e[53]!==U?(X=s.jsxs(ws,{children:[te,U]}),e[52]=te,e[53]=U,e[54]=X):X=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=s.jsx($s,{disabled:ee,children:ie}),e[57]=P.isPending,e[58]=ie,e[59]=K):K=e[59];let J;e[60]!==V?(J=D=>{D.preventDefault(),V()},e[60]=V,e[61]=J):J=e[61];const se=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=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:J,disabled:se,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=s.jsxs(Ls,{children:[K,E]}),e[68]=K,e[69]=E,e[70]=k):k=e[70];let F;e[71]!==X||e[72]!==k?(F=s.jsxs(_s,{children:[X,k]}),e[71]=X,e[72]=k,e[73]=F):F=e[73];let Q;e[74]!==le||e[75]!==F?(Q=s.jsx(ks,{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]!==Z?(Y=s.jsxs(ys,{title:f,count:G,children:[Z,Q]}),e[77]=a.length,e[78]=Q,e[79]=f,e[80]=Z,e[81]=Y):Y=e[81],Y}function _t(r){return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:r.name}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[360px] truncate align-middle",children:r.value})]},r.name)}function kt(r){return de.error(ds(r))}function Et(r){const e=Ee.c(176),{base:o,orgSlug:l,site:i,secrets:a,isLoading:c,error:d}=r,t=cs(),n=Ss(),[u,v]=ne.useState(!1),[m,N]=ne.useState(""),[g,p]=ne.useState(""),[h,y]=ne.useState("runtime"),[j,w]=ne.useState(null);let T;e[0]!==l||e[1]!==n||e[2]!==i?(T=()=>n.invalidateQueries({queryKey:Ue.hostingSecrets(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=T):T=e[3];const S=T;let $;e[4]!==o?($=oe=>rs(`${o}/secrets`,"PUT",oe),e[4]=o,e[5]=$):$=e[5];let z;e[6]!==S||e[7]!==t?(z=()=>{S(),de.success(t("mainPanelTabs.hostingTab.toastSecretSaved")),v(!1),N(""),p(""),y("runtime")},e[6]=S,e[7]=t,e[8]=z):z=e[8];let C;e[9]!==$||e[10]!==z?(C={mutationFn:$,onSuccess:z,onError:Rt},e[9]=$,e[10]=z,e[11]=C):C=e[11];const x=as(C);let P;e[12]!==o?(P=oe=>rs(`${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]!==t?(L=()=>{S(),de.success(t("mainPanelTabs.hostingTab.toastSecretDeleted")),w(null)},e[14]=S,e[15]=t,e[16]=L):L=e[16];let _;e[17]!==P||e[18]!==L?(_={mutationFn:P,onSuccess:L,onError:Ft},e[17]=P,e[18]=L,e[19]=_):_=e[19];const b=as(_);let B;e[20]!==m||e[21]!==h||e[22]!==g||e[23]!==x||e[24]!==t?(B=()=>{const oe=m.trim();if(!oe){de.error(t("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!g){de.error(t("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}x.mutate({name:oe,value:g,scope:h})},e[20]=m,e[21]=h,e[22]=g,e[23]=x,e[24]=t,e[25]=B):B=e[25];const A=B;let V,f;e[26]===Symbol.for("react.memo_cache_sentinel")?(f=()=>v(!0),V=s.jsx(qs,{className:"size-4"}),e[26]=V,e[27]=f):(V=e[26],f=e[27]);let G;e[28]!==t?(G=t("mainPanelTabs.hostingTab.addSecret"),e[28]=t,e[29]=G):G=e[29];let Z;e[30]!==G?(Z=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:f,children:[V,G]}),e[30]=G,e[31]=Z):Z=e[31];const le=Z;let ae;e[32]!==t?(ae=t("mainPanelTabs.hostingTab.secrets"),e[32]=t,e[33]=ae):ae=e[33];const ve=a.length;let te;e[34]!==b.isPending||e[35]!==d||e[36]!==c||e[37]!==a||e[38]!==t?(te=c?s.jsx(vs,{cols:2}):d?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.secretsError")}):a.length===0?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.noSecrets")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:t("mainPanelTabs.hostingTab.colName")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colValue")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map(oe=>{const We=oe.scope==="build"?"build":"runtime";return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:s.jsxs("span",{className:"inline-flex items-center gap-2",children:[oe.name,s.jsx(me,{variant:We==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:t(We==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")}),oe.origin==="worker"&&s.jsx(me,{variant:"secondary",className:"font-sans text-[10px]",children:t("mainPanelTabs.hostingTab.secretOnWorker")})]})}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground align-middle",children:t("mainPanelTabs.hostingTab.secretValueHidden")}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>w({name:oe.name,scope:We}),disabled:b.isPending,children:s.jsx(Os,{className:"size-4"})})})]},`${oe.name}:${We}`)})})]}),e[34]=b.isPending,e[35]=d,e[36]=c,e[37]=a,e[38]=t,e[39]=te):te=e[39];let re;e[40]!==t?(re=t("mainPanelTabs.hostingTab.addSecretTitle"),e[40]=t,e[41]=re):re=e[41];let M;e[42]!==re?(M=s.jsx(Hs,{children:s.jsx(Ms,{children:re})}),e[42]=re,e[43]=M):M=e[43];let U;e[44]!==t?(U=t("mainPanelTabs.hostingTab.colName"),e[44]=t,e[45]=U):U=e[45];let X;e[46]!==U?(X=s.jsx(hs,{htmlFor:"secret-name",children:U}),e[46]=U,e[47]=X):X=e[47];let ee;e[48]!==t?(ee=t("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[48]=t,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]!==m||e[52]!==x.isPending||e[53]!==ee?(K=s.jsx(ls,{id:"secret-name",placeholder:ee,value:m,onChange:ie,className:"font-mono text-xs",disabled:x.isPending}),e[51]=m,e[52]=x.isPending,e[53]=ee,e[54]=K):K=e[54];let J;e[55]!==X||e[56]!==K?(J=s.jsxs("div",{className:"flex flex-col gap-2",children:[X,K]}),e[55]=X,e[56]=K,e[57]=J):J=e[57];let se;e[58]!==t?(se=t("mainPanelTabs.hostingTab.colValue"),e[58]=t,e[59]=se):se=e[59];let W;e[60]!==se?(W=s.jsx(hs,{htmlFor:"secret-value",children:se}),e[60]=se,e[61]=W):W=e[61];let E;e[62]!==t?(E=t("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[62]=t,e[63]=E):E=e[63];let k;e[64]===Symbol.for("react.memo_cache_sentinel")?(k=oe=>p(oe.target.value),e[64]=k):k=e[64];let F;e[65]!==g||e[66]!==x.isPending||e[67]!==E?(F=s.jsx(ls,{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=s.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]!==t?(Y=t("mainPanelTabs.hostingTab.secretScope"),e[72]=t,e[73]=Y):Y=e[73];let D;e[74]!==Y?(D=s.jsx(hs,{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=s.jsx(Gs,{className:"w-full",children:s.jsx(Xs,{})}),e[77]=fe):fe=e[77];let Ne;e[78]!==t?(Ne=t("mainPanelTabs.hostingTab.secretScopeRuntime"),e[78]=t,e[79]=Ne):Ne=e[79];let he;e[80]!==Ne?(he=s.jsx(js,{value:"runtime",children:Ne}),e[80]=Ne,e[81]=he):he=e[81];let ue;e[82]!==t?(ue=t("mainPanelTabs.hostingTab.secretScopeBuild"),e[82]=t,e[83]=ue):ue=e[83];let Le;e[84]!==ue?(Le=s.jsx(js,{value:"build",children:ue}),e[84]=ue,e[85]=Le):Le=e[85];let Se;e[86]!==he||e[87]!==Le?(Se=s.jsxs(Zs,{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=s.jsxs(Ys,{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]!==t?(Fe=t(h==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[93]=h,e[94]=t,e[95]=Fe):Fe=e[95];let Re;e[96]!==Fe?(Re=s.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=s.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=s.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 Ge=x.isPending;let be;e[107]!==t?(be=t("mainPanelTabs.hostingTab.cancel"),e[107]=t,e[108]=be):be=e[108];let Te;e[109]!==x.isPending||e[110]!==be?(Te=s.jsx(ce,{variant:"outline",type:"button",onClick:De,disabled:Ge,children:be}),e[109]=x.isPending,e[110]=be,e[111]=Te):Te=e[111];let pe;e[112]!==m||e[113]!==g||e[114]!==x.isPending?(pe=x.isPending||!m.trim()||!g,e[112]=m,e[113]=g,e[114]=x.isPending,e[115]=pe):pe=e[115];let Ae;e[116]!==x.isPending||e[117]!==t?(Ae=x.isPending?t("mainPanelTabs.hostingTab.saving"):t("mainPanelTabs.hostingTab.add"),e[116]=x.isPending,e[117]=t,e[118]=Ae):Ae=e[118];let je;e[119]!==A||e[120]!==pe||e[121]!==Ae?(je=s.jsx(ce,{type:"button",onClick:A,disabled:pe,children:Ae}),e[119]=A,e[120]=pe,e[121]=Ae,e[122]=je):je=e[122];let we;e[123]!==Te||e[124]!==je?(we=s.jsxs(Ws,{children:[Te,je]}),e[123]=Te,e[124]=je,e[125]=we):we=e[125];let Ve;e[126]!==M||e[127]!==xe||e[128]!==we?(Ve=s.jsxs(Ks,{className:"sm:max-w-md",children:[M,xe,we]}),e[126]=M,e[127]=xe,e[128]=we,e[129]=Ve):Ve=e[129];let Pe;e[130]!==u||e[131]!==Ve?(Pe=s.jsx(Qs,{open:u,onOpenChange:v,children:Ve}),e[130]=u,e[131]=Ve,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]!==t?(R=t("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[134]=t,e[135]=R):R=e[135];let $e;e[136]!==R?($e=s.jsx(Cs,{children:R}),e[136]=R,e[137]=$e):$e=e[137];const Xe=j?.name??"";let qe;e[138]!==t||e[139]!==Xe?(qe=t("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Xe}),e[138]=t,e[139]=Xe,e[140]=qe):qe=e[140];let Be;e[141]!==qe?(Be=s.jsx(Ds,{children:qe}),e[141]=qe,e[142]=Be):Be=e[142];let Ze;e[143]!==$e||e[144]!==Be?(Ze=s.jsxs(ws,{children:[$e,Be]}),e[143]=$e,e[144]=Be,e[145]=Ze):Ze=e[145];const us=b.isPending;let Oe;e[146]!==t?(Oe=t("mainPanelTabs.hostingTab.cancel"),e[146]=t,e[147]=Oe):Oe=e[147];let He;e[148]!==b.isPending||e[149]!==Oe?(He=s.jsx($s,{disabled:us,children:Oe}),e[148]=b.isPending,e[149]=Oe,e[150]=He):He=e[150];let es;e[151]!==b||e[152]!==j?(es=oe=>{oe.preventDefault(),j&&b.mutate(j)},e[151]=b,e[152]=j,e[153]=es):es=e[153];const ns=b.isPending;let Me;e[154]!==t?(Me=t("mainPanelTabs.hostingTab.deleteSecret"),e[154]=t,e[155]=Me):Me=e[155];let Ke;e[156]!==b.isPending||e[157]!==es||e[158]!==Me?(Ke=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:es,disabled:ns,children:Me}),e[156]=b.isPending,e[157]=es,e[158]=Me,e[159]=Ke):Ke=e[159];let is;e[160]!==He||e[161]!==Ke?(is=s.jsxs(Ls,{children:[He,Ke]}),e[160]=He,e[161]=Ke,e[162]=is):is=e[162];let Qe;e[163]!==Ze||e[164]!==is?(Qe=s.jsxs(_s,{children:[Ze,is]}),e[163]=Ze,e[164]=is,e[165]=Qe):Qe=e[165];let Ie;e[166]!==_e||e[167]!==Qe?(Ie=s.jsx(ks,{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]!==te||e[173]!==Pe||e[174]!==Ie?(Je=s.jsxs(ys,{title:ae,count:ve,action:le,children:[te,Pe,Ie]}),e[169]=le,e[170]=a.length,e[171]=ae,e[172]=te,e[173]=Pe,e[174]=Ie,e[175]=Je):Je=e[175],Je}function Ft(r){return de.error(ds(r))}function Rt(r){return de.error(ds(r))}const At=["16.148.147.194","52.32.122.94","52.35.156.199"];function Vt(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function qt(r){return Vt(r)?"@":r}function lt(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),de.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=s.jsx(gt,{className:"size-3.5"}),e[5]=c):c=e[5];let d;return e[6]!==i||e[7]!==a?(d=s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":i,onClick:a,children:c}),e[6]=i,e[7]=a,e[8]=d):d=e[8],d}function tt(r){const e=Ee.c(64),{from:o,source:l,t:i}=r;let a,c,d,t,n,u,v;if(e[0]!==o||e[1]!==l||e[2]!==i){const L=o.trim().replace(/\.$/,"");c=L?qt(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")?(_=s.jsx(Ns,{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=s.jsx("span",{className:"text-xs font-medium",children:b}),e[13]=b,e[14]=B):B=e[14];const A=a?"secondary":"outline";let V;e[15]!==a||e[16]!==i?(V=i(a?"mainPanelTabs.hostingTab.dnsActive":"mainPanelTabs.hostingTab.dnsAwaiting"),e[15]=a,e[16]=i,e[17]=V):V=e[17];let f;e[18]!==V||e[19]!==A?(f=s.jsx(me,{variant:A,className:"ml-auto",children:V}),e[18]=V,e[19]=A,e[20]=f):f=e[20],e[21]!==f||e[22]!==B?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[_,B,f]}),e[21]=f,e[22]=B,e[23]=u):u=e[23],v=s.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:L||"—"})}),d="text-xs text-muted-foreground",t=i("mainPanelTabs.hostingTab.dnsSetupDescription",{host:L||"—"}),e[0]=o,e[1]=l,e[2]=i,e[3]=a,e[4]=c,e[5]=d,e[6]=t,e[7]=n,e[8]=u,e[9]=v}else a=e[3],c=e[4],d=e[5],t=e[6],n=e[7],u=e[8],v=e[9];let m;e[24]!==d||e[25]!==t?(m=s.jsx("p",{className:d,children:t}),e[24]=d,e[25]=t,e[26]=m):m=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=s.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[30]=N,e[31]=g):g=e[31];let p;e[32]!==i?(p=i("mainPanelTabs.hostingTab.dnsColType"),e[32]=i,e[33]=p):p=e[33];let h;e[34]!==p?(h=s.jsx(I,{children:p}),e[34]=p,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=s.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 T;e[42]!==w?(T=s.jsx(I,{children:w}),e[42]=w,e[43]=T):T=e[43];let S;e[44]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(I,{className:"w-[1%]"}),e[44]=S):S=e[44];let $;e[45]!==h||e[46]!==j||e[47]!==T?($=s.jsx(os,{children:s.jsxs(ye,{children:[h,j,T,S]})}),e[45]=h,e[46]=j,e[47]=T,e[48]=$):$=e[48];let z;e[49]!==c||e[50]!==i?(z=At.map(L=>s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:"A"}),s.jsx(q,{className:"font-mono text-xs align-middle",children:c}),s.jsx(q,{className:"font-mono text-xs align-middle",children:L}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(lt,{value:L,t:i})})]},L)),e[49]=c,e[50]=i,e[51]=z):z=e[51];let C;e[52]!==z?(C=s.jsx(ts,{children:z}),e[52]=z,e[53]=C):C=e[53];let x;e[54]!==$||e[55]!==C?(x=s.jsxs(ss,{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]!==m||e[62]!==g?(P=s.jsxs("div",{className:n,children:[u,v,m,g,x]}),e[57]=x,e[58]=n,e[59]=u,e[60]=v,e[61]=m,e[62]=g,e[63]=P):P=e[63],P}function Bt(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=s.jsx(me,{variant:i,children:a}),e[3]=i,e[4]=a,e[5]=c):c=e[5],c}function Ot(r){const e=Ee.c(180),{base:o,orgSlug:l,site:i,redirects:a,isLoading:c,error:d}=r,t=cs(),n=Ss(),[u,v]=ne.useState(!1),[m,N]=ne.useState(null),[g,p]=ne.useState(""),[h,y]=ne.useState(""),[j,w]=ne.useState("permanent"),[T,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=>rs(`${o}/redirects`,"PUT",H),e[4]=o,e[5]=P):P=e[5];let L;e[6]!==x||e[7]!==t?(L=()=>{x(),de.success(t("mainPanelTabs.hostingTab.toastRedirectSaved")),v(!1)},e[6]=x,e[7]=t,e[8]=L):L=e[8];let _;e[9]!==P||e[10]!==L?(_={mutationFn:P,onSuccess:L,onError:Mt},e[9]=P,e[10]=L,e[11]=_):_=e[11];const b=as(_);let B;e[12]!==o?(B=H=>rs(`${o}/redirects/${encodeURIComponent(H)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==x||e[15]!==t?(A=()=>{x(),de.success(t("mainPanelTabs.hostingTab.toastRedirectDeleted")),S(null)},e[14]=x,e[15]=t,e[16]=A):A=e[16];let V;e[17]!==B||e[18]!==A?(V={mutationFn:B,onSuccess:A,onError:Ht},e[17]=B,e[18]=A,e[19]=V):V=e[19];const f=as(V);let G;e[20]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{N(null),p(""),y(""),w("permanent"),v(!0)},e[20]=G):G=e[20];const Z=G;let le;e[21]===Symbol.for("react.memo_cache_sentinel")?(le=H=>{N(H.from),p(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]!==t?(ve=()=>{const H=g.trim(),Fs=h.trim();if(!H||!Fs){de.error(t("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}b.mutate({from:H,to:Fs,type:j})},e[22]=g,e[23]=h,e[24]=j,e[25]=b,e[26]=t,e[27]=ve):ve=e[27];const te=ve;let re;e[28]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(qs,{className:"size-4"}),e[28]=re):re=e[28];let M;e[29]!==t?(M=t("mainPanelTabs.hostingTab.addRedirect"),e[29]=t,e[30]=M):M=e[30];let U;e[31]!==M?(U=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:Z,children:[re,M]}),e[31]=M,e[32]=U):U=e[32];const X=U;let ee;e[33]!==t?(ee=t("mainPanelTabs.hostingTab.redirects"),e[33]=t,e[34]=ee):ee=e[34];const ie=a.length;let K;e[35]!==f.isPending||e[36]!==$||e[37]!==d||e[38]!==c||e[39]!==b.isPending||e[40]!==a||e[41]!==t?(K=c?s.jsx(vs,{cols:3}):d?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.redirectsError")}):a.length===0?s.jsx(Ps,{icon:s.jsx(mt,{className:"size-5"}),title:t("mainPanelTabs.hostingTab.noRedirects")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:t("mainPanelTabs.hostingTab.colFrom")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colTo")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colType")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map((H,Fs)=>s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:H.from}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[280px] truncate align-middle",children:H.to}),s.jsx(q,{className:"align-middle",children:s.jsx(Bt,{type:H.type,t})}),s.jsxs(q,{className:"text-right align-middle whitespace-nowrap",children:[s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>z($===H.from?null:H.from),children:s.jsx(Ns,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>ae(H),disabled:b.isPending,children:s.jsx(ft,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>S(H.from),disabled:f.isPending,children:s.jsx(Os,{className:"size-4"})})]})]}),$===H.from&&s.jsx(ye,{children:s.jsx(q,{colSpan:4,className:"bg-muted/10",children:s.jsx(tt,{from:H.from,source:H.source,t})})})]},H.id??`${H.from}-${Fs}`))})]}),e[35]=f.isPending,e[36]=$,e[37]=d,e[38]=c,e[39]=b.isPending,e[40]=a,e[41]=t,e[42]=K):K=e[42];let J;e[43]!==m||e[44]!==t?(J=m!=null?t("mainPanelTabs.hostingTab.editRedirectTitle"):t("mainPanelTabs.hostingTab.addRedirectTitle"),e[43]=m,e[44]=t,e[45]=J):J=e[45];let se;e[46]!==J?(se=s.jsx(Hs,{children:s.jsx(Ms,{children:J})}),e[46]=J,e[47]=se):se=e[47];let W;e[48]!==t?(W=t("mainPanelTabs.hostingTab.colFrom"),e[48]=t,e[49]=W):W=e[49];let E;e[50]!==W?(E=s.jsx(hs,{htmlFor:"redirect-from",children:W}),e[50]=W,e[51]=E):E=e[51];let k;e[52]!==t?(k=t("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[52]=t,e[53]=k):k=e[53];let F;e[54]===Symbol.for("react.memo_cache_sentinel")?(F=H=>p(H.target.value),e[54]=F):F=e[54];const Q=m!=null||b.isPending;let Y;e[55]!==g||e[56]!==k||e[57]!==Q?(Y=s.jsx(ls,{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=s.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]!==t?(O=t("mainPanelTabs.hostingTab.colTo"),e[62]=t,e[63]=O):O=e[63];let ze;e[64]!==O?(ze=s.jsx(hs,{htmlFor:"redirect-to",children:O}),e[64]=O,e[65]=ze):ze=e[65];let fe;e[66]!==t?(fe=t("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[66]=t,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=s.jsx(ls,{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=s.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]!==t?(Le=t("mainPanelTabs.hostingTab.colType"),e[76]=t,e[77]=Le):Le=e[77];let Se;e[78]!==Le?(Se=s.jsx(hs,{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=s.jsx(Gs,{className:"w-full",children:s.jsx(Xs,{})}),e[81]=Re):Re=e[81];let ge;e[82]!==t?(ge=t("mainPanelTabs.hostingTab.permanent"),e[82]=t,e[83]=ge):ge=e[83];let xe;e[84]!==ge?(xe=s.jsx(js,{value:"permanent",children:ge}),e[84]=ge,e[85]=xe):xe=e[85];let De;e[86]!==t?(De=t("mainPanelTabs.hostingTab.temporary"),e[86]=t,e[87]=De):De=e[87];let Ge;e[88]!==De?(Ge=s.jsx(js,{value:"temporary",children:De}),e[88]=De,e[89]=Ge):Ge=e[89];let be;e[90]!==xe||e[91]!==Ge?(be=s.jsxs(Zs,{children:[xe,Ge]}),e[90]=xe,e[91]=Ge,e[92]=be):be=e[92];let Te;e[93]!==j||e[94]!==b.isPending||e[95]!==be?(Te=s.jsxs(Ys,{value:j,onValueChange:Ce,disabled:Fe,children:[Re,be]}),e[93]=j,e[94]=b.isPending,e[95]=be,e[96]=Te):Te=e[96];let pe;e[97]!==Se||e[98]!==Te?(pe=s.jsxs("div",{className:"flex flex-col gap-2",children:[Se,Te]}),e[97]=Se,e[98]=Te,e[99]=pe):pe=e[99];let Ae;e[100]!==m||e[101]!==g||e[102]!==a||e[103]!==t?(Ae=g.trim()&&s.jsx(tt,{from:g,source:a.find(H=>H.from===m)?.source,t}),e[100]=m,e[101]=g,e[102]=a,e[103]=t,e[104]=Ae):Ae=e[104];let je;e[105]!==D||e[106]!==ue||e[107]!==pe||e[108]!==Ae?(je=s.jsxs("div",{className:"flex flex-col gap-4",children:[D,ue,pe,Ae]}),e[105]=D,e[106]=ue,e[107]=pe,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 Ve=b.isPending;let Pe;e[111]!==t?(Pe=t("mainPanelTabs.hostingTab.cancel"),e[111]=t,e[112]=Pe):Pe=e[112];let _e;e[113]!==b.isPending||e[114]!==Pe?(_e=s.jsx(ce,{variant:"outline",type:"button",onClick:we,disabled:Ve,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]!==t?(R=b.isPending?t("mainPanelTabs.hostingTab.saving"):t("mainPanelTabs.hostingTab.save"),e[120]=b.isPending,e[121]=t,e[122]=R):R=e[122];let $e;e[123]!==te||e[124]!==ke||e[125]!==R?($e=s.jsx(ce,{type:"button",onClick:te,disabled:ke,children:R}),e[123]=te,e[124]=ke,e[125]=R,e[126]=$e):$e=e[126];let Xe;e[127]!==_e||e[128]!==$e?(Xe=s.jsxs(Ws,{children:[_e,$e]}),e[127]=_e,e[128]=$e,e[129]=Xe):Xe=e[129];let qe;e[130]!==se||e[131]!==je||e[132]!==Xe?(qe=s.jsxs(Ks,{className:"sm:max-w-md",children:[se,je,Xe]}),e[130]=se,e[131]=je,e[132]=Xe,e[133]=qe):qe=e[133];let Be;e[134]!==u||e[135]!==qe?(Be=s.jsx(Qs,{open:u,onOpenChange:v,children:qe}),e[134]=u,e[135]=qe,e[136]=Be):Be=e[136];const Ze=T!=null;let us;e[137]===Symbol.for("react.memo_cache_sentinel")?(us=H=>{H||S(null)},e[137]=us):us=e[137];let Oe;e[138]!==t?(Oe=t("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[138]=t,e[139]=Oe):Oe=e[139];let He;e[140]!==Oe?(He=s.jsx(Cs,{children:Oe}),e[140]=Oe,e[141]=He):He=e[141];const es=T??"";let ns;e[142]!==t||e[143]!==es?(ns=t("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:es}),e[142]=t,e[143]=es,e[144]=ns):ns=e[144];let Me;e[145]!==ns?(Me=s.jsx(Ds,{children:ns}),e[145]=ns,e[146]=Me):Me=e[146];let Ke;e[147]!==He||e[148]!==Me?(Ke=s.jsxs(ws,{children:[He,Me]}),e[147]=He,e[148]=Me,e[149]=Ke):Ke=e[149];const is=f.isPending;let Qe;e[150]!==t?(Qe=t("mainPanelTabs.hostingTab.cancel"),e[150]=t,e[151]=Qe):Qe=e[151];let Ie;e[152]!==f.isPending||e[153]!==Qe?(Ie=s.jsx($s,{disabled:is,children:Qe}),e[152]=f.isPending,e[153]=Qe,e[154]=Ie):Ie=e[154];let Je;e[155]!==f||e[156]!==T?(Je=H=>{H.preventDefault(),T&&f.mutate(T)},e[155]=f,e[156]=T,e[157]=Je):Je=e[157];const oe=f.isPending;let We;e[158]!==t?(We=t("mainPanelTabs.hostingTab.deleteRedirect"),e[158]=t,e[159]=We):We=e[159];let gs;e[160]!==f.isPending||e[161]!==Je||e[162]!==We?(gs=s.jsx(zs,{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]=gs):gs=e[163];let xs;e[164]!==Ie||e[165]!==gs?(xs=s.jsxs(Ls,{children:[Ie,gs]}),e[164]=Ie,e[165]=gs,e[166]=xs):xs=e[166];let bs;e[167]!==Ke||e[168]!==xs?(bs=s.jsxs(_s,{children:[Ke,xs]}),e[167]=Ke,e[168]=xs,e[169]=bs):bs=e[169];let Ts;e[170]!==Ze||e[171]!==bs?(Ts=s.jsx(ks,{open:Ze,onOpenChange:us,children:bs}),e[170]=Ze,e[171]=bs,e[172]=Ts):Ts=e[172];let Es;return e[173]!==X||e[174]!==a.length||e[175]!==ee||e[176]!==K||e[177]!==Be||e[178]!==Ts?(Es=s.jsxs(ys,{title:ee,count:ie,action:X,children:[K,Be,Ts]}),e[173]=X,e[174]=a.length,e[175]=ee,e[176]=K,e[177]=Be,e[178]=Ts,e[179]=Es):Es=e[179],Es}function Ht(r){return de.error(ds(r))}function Mt(r){return de.error(ds(r))}function nt(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=s.jsx(Ns,{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=s.jsxs("div",{className:"flex items-center gap-2",children:[i,s.jsx("span",{className:"text-xs font-medium",children:a})]}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==l?(d=l("mainPanelTabs.hostingTab.dnsColType"),e[5]=l,e[6]=d):d=e[6];let t;e[7]!==d?(t=s.jsx(I,{className:"w-14",children:d}),e[7]=d,e[8]=t):t=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=s.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 m;e[15]!==v?(m=s.jsx(I,{children:v}),e[15]=v,e[16]=m):m=e[16];let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I,{className:"w-8"}),e[17]=N):N=e[17];let g;e[18]!==t||e[19]!==u||e[20]!==m?(g=s.jsx(os,{children:s.jsxs(ye,{children:[t,u,m,N]})}),e[18]=t,e[19]=u,e[20]=m,e[21]=g):g=e[21];let p;if(e[22]!==o||e[23]!==l){let w;e[25]!==l?(w=T=>s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-top",children:T.type}),s.jsx(q,{className:"break-all font-mono text-xs align-top",children:T.name}),s.jsx(q,{className:"break-all font-mono text-xs align-top",children:T.value}),s.jsx(q,{className:"text-right align-top",children:s.jsx(lt,{value:T.value,t:l})})]},`${T.type}-${T.name}-${T.value}`),e[25]=l,e[26]=w):w=e[26],p=o.map(w),e[22]=o,e[23]=l,e[24]=p}else p=e[24];let h;e[27]!==p?(h=s.jsx(ts,{children:p}),e[27]=p,e[28]=h):h=e[28];let y;e[29]!==g||e[30]!==h?(y=s.jsxs(ss,{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=s.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 Kt(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 d;e[3]!==o.detail||e[4]!==l?(d=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=d):d=e[5];const t=d,n=i==="active"?"secondary":"outline";let u;return e[6]!==t||e[7]!==c||e[8]!==n?(u=s.jsx(me,{variant:n,title:t,children:c}),e[6]=t,e[7]=c,e[8]=n,e[9]=u):u=e[9],u}function Qt(r){const e=Ee.c(138),{base:o,orgSlug:l,site:i,domains:a,dnsTemplate:c,isLoading:d,error:t}=r,n=cs(),u=Ss(),[v,m]=ne.useState(!1),[N,g]=ne.useState(""),[p,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 T=w;let S;e[4]!==o?(S=R=>rs(`${o}/domains`,"PUT",R),e[4]=o,e[5]=S):S=e[5];let $;e[6]!==T||e[7]!==n?($=()=>{T(),de.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),m(!1)},e[6]=T,e[7]=n,e[8]=$):$=e[8];let z;e[9]!==S||e[10]!==$?(z={mutationFn:S,onSuccess:$,onError:Ut},e[9]=S,e[10]=$,e[11]=z):z=e[11];const C=as(z);let x;e[12]!==o?(x=R=>rs(`${o}/domains/${encodeURIComponent(R)}`,"DELETE"),e[12]=o,e[13]=x):x=e[13];let P;e[14]!==T||e[15]!==n?(P=()=>{T(),de.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),h(null)},e[14]=T,e[15]=n,e[16]=P):P=e[16];let L;e[17]!==x||e[18]!==P?(L={mutationFn:x,onSuccess:P,onError:It},e[17]=x,e[18]=P,e[19]=L):L=e[19];const _=as(L);let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{g(""),m(!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){de.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 V=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 G=f;let Z;e[30]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(qs,{className:"size-4"}),e[30]=Z):Z=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=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:B,children:[Z,le]}),e[33]=le,e[34]=ae):ae=e[34];const ve=ae;let te;e[35]!==n?(te=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=te):te=e[36];const re=a.length;let M;e[37]!==_.isPending||e[38]!==y||e[39]!==a||e[40]!==t||e[41]!==d||e[42]!==n?(M=d?s.jsx(vs,{cols:3}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.domainsError")}):a.length===0?s.jsx(Ps,{icon:s.jsx(Ns,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colHost")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map((R,$e)=>s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsxs(q,{className:"font-mono text-xs align-middle",children:[R.host,R.canonical&&s.jsx(me,{variant:"outline",className:"ml-2",children:n("mainPanelTabs.hostingTab.canonical")})]}),s.jsx(q,{className:"align-middle",children:s.jsx(Kt,{domain:R,t:n})}),s.jsx(q,{className:"text-right align-middle whitespace-nowrap",children:!R.canonical&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>j(y===R.host?null:R.host),children:s.jsx(Ns,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>h(R.host),disabled:_.isPending,children:s.jsx(Os,{className:"size-4"})})]})})]}),y===R.host&&s.jsx(ye,{children:s.jsx(q,{colSpan:3,className:"bg-muted/10",children:s.jsx(nt,{records:R.dns??[],t:n})})})]},`${R.host}-${$e}`))})]}),e[37]=_.isPending,e[38]=y,e[39]=a,e[40]=t,e[41]=d,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 X;e[46]!==U?(X=s.jsx(Hs,{children:s.jsx(Ms,{children:U})}),e[46]=U,e[47]=X):X=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=s.jsx(hs,{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 se;e[55]!==N||e[56]!==C.isPending||e[57]!==K?(se=s.jsx(ls,{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]=se):se=e[58];let W;e[59]!==ie||e[60]!==se?(W=s.jsxs("div",{className:"flex flex-col gap-2",children:[ie,se]}),e[59]=ie,e[60]=se,e[61]=W):W=e[61];let E;e[62]!==N||e[63]!==G||e[64]!==n?(E=N.trim()&&s.jsx(nt,{records:G,t:n}),e[62]=N,e[63]=G,e[64]=n,e[65]=E):E=e[65];let k;e[66]!==W||e[67]!==E?(k=s.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=()=>m(!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=s.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]!==V||e[82]!==O||e[83]!==ze?(fe=s.jsx(ce,{type:"button",onClick:V,disabled:O,children:ze}),e[81]=V,e[82]=O,e[83]=ze,e[84]=fe):fe=e[84];let Ne;e[85]!==D||e[86]!==fe?(Ne=s.jsxs(Ws,{children:[D,fe]}),e[85]=D,e[86]=fe,e[87]=Ne):Ne=e[87];let he;e[88]!==X||e[89]!==k||e[90]!==Ne?(he=s.jsxs(Ks,{className:"sm:max-w-md",children:[X,k,Ne]}),e[88]=X,e[89]=k,e[90]=Ne,e[91]=he):he=e[91];let ue;e[92]!==v||e[93]!==he?(ue=s.jsx(Qs,{open:v,onOpenChange:m,children:he}),e[92]=v,e[93]=he,e[94]=ue):ue=e[94];const Le=p!=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=s.jsx(Cs,{children:Ce}),e[98]=Ce,e[99]=Fe):Fe=e[99];const Re=p??"";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=s.jsx(Ds,{children:ge}),e[103]=ge,e[104]=xe):xe=e[104];let De;e[105]!==Fe||e[106]!==xe?(De=s.jsxs(ws,{children:[Fe,xe]}),e[105]=Fe,e[106]=xe,e[107]=De):De=e[107];const Ge=_.isPending;let be;e[108]!==n?(be=n("mainPanelTabs.hostingTab.cancel"),e[108]=n,e[109]=be):be=e[109];let Te;e[110]!==_.isPending||e[111]!==be?(Te=s.jsx($s,{disabled:Ge,children:be}),e[110]=_.isPending,e[111]=be,e[112]=Te):Te=e[112];let pe;e[113]!==_||e[114]!==p?(pe=R=>{R.preventDefault(),p&&_.mutate(p)},e[113]=_,e[114]=p,e[115]=pe):pe=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]!==pe||e[120]!==je?(we=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:pe,disabled:Ae,children:je}),e[118]=_.isPending,e[119]=pe,e[120]=je,e[121]=we):we=e[121];let Ve;e[122]!==Te||e[123]!==we?(Ve=s.jsxs(Ls,{children:[Te,we]}),e[122]=Te,e[123]=we,e[124]=Ve):Ve=e[124];let Pe;e[125]!==De||e[126]!==Ve?(Pe=s.jsxs(_s,{children:[De,Ve]}),e[125]=De,e[126]=Ve,e[127]=Pe):Pe=e[127];let _e;e[128]!==Le||e[129]!==Pe?(_e=s.jsx(ks,{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]!==te||e[134]!==M||e[135]!==ue||e[136]!==_e?(ke=s.jsxs(ys,{title:te,count:re,action:ve,children:[M,ue,_e]}),e[131]=ve,e[132]=a.length,e[133]=te,e[134]=M,e[135]=ue,e[136]=_e,e[137]=ke):ke=e[137],ke}function It(r){return de.error(ds(r))}function Ut(r){return de.error(ds(r))}function ti(r){const e=Ee.c(118),{virtualMcpId:o}=r,l=cs(),{org:i}=at(),a=bt(o),c=Tt(a),d=!!c,t=c?`/api/${i.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==t?(n=()=>fs(`${t}/deployments`),e[0]=t,e[1]=n):n=e[1];const u=ms({queryKey:Ue.hostingDeployments(i.slug,c??""),queryFn:n,enabled:d,retry:!1,staleTime:3e4});let v;e[2]!==t?(v=()=>fs(`${t}/env`),e[2]=t,e[3]=v):v=e[3];const m=ms({queryKey:Ue.hostingEnv(i.slug,c??""),queryFn:v,enabled:d,retry:!1,staleTime:3e4});let N;e[4]!==t?(N=()=>fs(`${t}/secrets`),e[4]=t,e[5]=N):N=e[5];const g=ms({queryKey:Ue.hostingSecrets(i.slug,c??""),queryFn:N,enabled:d,retry:!1,staleTime:3e4});let p;e[6]!==t?(p=()=>fs(`${t}/redirects`),e[6]=t,e[7]=p):p=e[7];const h=ms({queryKey:Ue.hostingRedirects(i.slug,c??""),queryFn:p,enabled:d,retry:!1,staleTime:3e4});let y;e[8]!==t?(y=()=>fs(`${t}/domains`),e[8]=t,e[9]=y):y=e[9];const j=ms({queryKey:Ue.hostingDomains(i.slug,c??""),queryFn:y,enabled:d,retry:!1,staleTime:3e4});if(!c){let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(As,{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=s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(Ps,{icon:E,title:k,description:F})}),e[15]=k,e[16]=F,e[17]=Q):Q=e[17],Q}if(Vs(u.error)&&Vs(m.error)&&Vs(h.error)){let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(As,{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=s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(Ps,{icon:E,title:k,description:F})}),e[23]=k,e[24]=F,e[25]=Q):Q=e[25],Q}let T,S,$,z,C,x,P,L;if(e[26]!==u.data||e[27]!==j.data||e[28]!==m.data||e[29]!==h.data||e[30]!==g.data){S=ps(u.data,"items");let E;e[39]!==m.data?(E=ps(m.data,"vars"),e[39]=m.data,e[40]=E):E=e[40],C=E;let k;e[41]!==m.data?(k=ps(m.data,"codeVars"),e[41]=m.data,e[42]=k):k=e[42],T=k;let F;e[43]!==g.data?(F=ps(g.data,"secrets"),e[43]=g.data,e[44]=F):F=e[44],P=F;let Q;e[45]!==h.data?(Q=ps(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=Js(S.find(Jt)?.framework),e[26]=u.data,e[27]=j.data,e[28]=m.data,e[29]=h.data,e[30]=g.data,e[31]=T,e[32]=S,e[33]=$,e[34]=z,e[35]=C,e[36]=x,e[37]=P,e[38]=L}else T=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",V="flex flex-col gap-1";let f;e[51]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(As,{className:"size-[18px] text-muted-foreground"}),e[51]=f):f=e[51];let G;e[52]!==l?(G=l("mainPanelTabs.hostingTab.title"),e[52]=l,e[53]=G):G=e[53];let Z;e[54]!==G?(Z=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:G}),e[54]=G,e[55]=Z):Z=e[55];let le;e[56]!==_?(le=_&&s.jsx(me,{variant:"secondary",children:_}),e[56]=_,e[57]=le):le=e[57];let ae;e[58]!==Z||e[59]!==le?(ae=s.jsxs("div",{className:"flex items-center gap-2",children:[f,Z,le]}),e[58]=Z,e[59]=le,e[60]=ae):ae=e[60];const ve="text-sm text-muted-foreground",te=l("mainPanelTabs.hostingTab.subtitle",{site:c});let re;e[61]!==te?(re=s.jsx("p",{className:ve,children:te}),e[61]=te,e[62]=re):re=e[62];let M;e[63]!==ae||e[64]!==re?(M=s.jsxs("div",{className:V,children:[ae,re]}),e[63]=ae,e[64]=re,e[65]=M):M=e[65];let U;e[66]!==t||e[67]!==i.slug||e[68]!==c?(U=s.jsx(yt,{base:t,orgSlug:i.slug,site:c}),e[66]=t,e[67]=i.slug,e[68]=c,e[69]=U):U=e[69];let X;e[70]!==M||e[71]!==U?(X=s.jsxs("div",{className:A,children:[M,U]}),e[70]=M,e[71]=U,e[72]=X):X=e[72];let ee;e[73]!==t||e[74]!==S||e[75]!==u.error||e[76]!==u.isLoading||e[77]!==d||e[78]!==i.slug||e[79]!==c?(ee=s.jsx(wt,{base:t,orgSlug:i.slug,site:c,enabled:d,deployments:S,isLoading:u.isLoading,error:u.error}),e[73]=t,e[74]=S,e[75]=u.error,e[76]=u.isLoading,e[77]=d,e[78]=i.slug,e[79]=c,e[80]=ee):ee=e[80];let ie;e[81]!==t||e[82]!==T||e[83]!==m.error||e[84]!==m.isLoading||e[85]!==C||e[86]!==i.slug||e[87]!==c?(ie=s.jsx(Lt,{base:t,orgSlug:i.slug,site:c,envVars:C,codeVars:T,isLoading:m.isLoading,error:m.error}),e[81]=t,e[82]=T,e[83]=m.error,e[84]=m.isLoading,e[85]=C,e[86]=i.slug,e[87]=c,e[88]=ie):ie=e[88];let K;e[89]!==t||e[90]!==i.slug||e[91]!==P||e[92]!==g.error||e[93]!==g.isLoading||e[94]!==c?(K=s.jsx(Et,{base:t,orgSlug:i.slug,site:c,secrets:P,isLoading:g.isLoading,error:g.error}),e[89]=t,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]!==t||e[97]!==$||e[98]!==z||e[99]!==j.error||e[100]!==j.isLoading||e[101]!==i.slug||e[102]!==c?(J=s.jsx(Qt,{base:t,orgSlug:i.slug,site:c,domains:z,dnsTemplate:$,isLoading:j.isLoading,error:j.error}),e[96]=t,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 se;e[104]!==t||e[105]!==i.slug||e[106]!==x||e[107]!==h.error||e[108]!==h.isLoading||e[109]!==c?(se=s.jsx(Ot,{base:t,orgSlug:i.slug,site:c,redirects:x,isLoading:h.isLoading,error:h.error}),e[104]=t,e[105]=i.slug,e[106]=x,e[107]=h.error,e[108]=h.isLoading,e[109]=c,e[110]=se):se=e[110];let W;return e[111]!==X||e[112]!==ee||e[113]!==ie||e[114]!==K||e[115]!==J||e[116]!==se?(W=s.jsx("div",{className:b,children:s.jsxs("div",{className:B,children:[X,ee,ie,K,J,se]})}),e[111]=X,e[112]=ee,e[113]=ie,e[114]=K,e[115]=J,e[116]=se,e[117]=W):W=e[117],W}function Jt(r){return r.framework}export{ti as HostingTab};
1
+ import{c as Ee,b as cs,G as at,m as ms,K as Ue,j as s,n as Ss,r as ne,e as as,B as ce,b8 as Rs,t as de}from"./index-CUqIeab7.js";import{i as ot}from"./AlertCircle-BGBKpLte.js";import{t as rt}from"./ChevronUp-kwVzh9Ea.js";import{i as ct}from"./ChevronRight-Dyvjd0aP.js";import{be as dt,bf as Us,aD as it,av as mt,aF as ft,aY as ht,bg as ut,k as As}from"./agent-icon-C6PrEUEK.js";import{a as gt}from"./Copy01-HbP496BQ.js";import{i as Ns}from"./Globe01-DkspZwhB.js";import{n as et}from"./LinkExternal01-DzrVp9Tg.js";import{s as qs}from"./Plus-BKlrZG61.js";import{d as Bs}from"./UserSquare-BDzzhNrw.js";import{s as Os}from"./Trash01-pKP6eCpn.js";import{i as xt}from"./Zap-BAMfLNdX.js";import{B as me}from"./badge-CZW6tMPi.js";import{I as ls}from"./input-Cxnnxdlr.js";import{L as hs}from"./label-B1C7T4pw.js";import{c as Cs,d as Ds,b as ws,f as $s,g as zs,e as Ls,a as _s,A as ks}from"./alert-dialog-DrQfsXCX.js";import{c as Hs,d as Ms,e as Ws,b as Ks,D as Qs}from"./dialog-DvRG0LXq.js";import{S as Ys,b as Gs,a as Xs,d as Zs,c as js}from"./select--D2UH42o.js";import{c as ss,e as os,a as ye,d as I,b as ts,T as q}from"./table-DmZhvzS8.js";import{E as Ps}from"./empty-state-BOpb4mHN.js";import{u as bt}from"./use-virtual-mcp-BeOAAcq_.js";import{r as Tt}from"./site-slug-uya6Wp4-.js";import"./Tool01-pmMbVQOm.js";import"./ArrowUp-CaxOzWB5.js";import"./ArrowLeft-CfNfj34W.js";import"./Tool02-8Dr2Gn8L.js";import"./ArrowRight-DD5r1MRr.js";import"./TrendUp01-DRHBhQzq.js";import"./ZoomOut-DsRkRiGx.js";import"./Users03-DBea94aF.js";import"./CheckCircle-Cany4v-s.js";import"./Check-eZLp0THO.js";import"./ChevronSelectorVertical-A2c5IggG.js";import"./DotsVertical-Dlyi7q0q.js";import"./CreditCard01-CBge11Ez.js";import"./Download01-BL4NJ1GB.js";import"./Settings02-B4w1q3sP.js";import"./Eye-Do47wJSg.js";import"./Share07-LHpf870n.js";import"./GitBranch01-NVGMWUuB.js";import"./XClose-D_bUCgoz.js";import"./HardDrive-CjyB6tGL.js";import"./Image01-CSAsQNmT.js";import"./Key01-D6_hQFwL.js";import"./Link01-Bd1PdqAi.js";import"./Monitor01-CQluS8Nh.js";import"./Sun-dn0qQZeG.js";import"./Package-Cx0aWML0.js";import"./Palette-px16mBfS.js";import"./Play-DDDvRMzY.js";import"./SearchLg-B4kXtc3z.js";import"./SearchMd-CIRXiD9f.js";import"./Shield01-CU2hAP4a.js";import"./Stars01-ISx16GP4.js";import"./Upload01-D81bzDyt.js";import"./User01-ClWEUyJU.js";import"./Users01-DDC8ifx4.js";import"./XCircle-BaKTNZQS.js";import"./use-mcp-client-DGbUDOMD.js";import"./auth-BgRdtqaz.js";function Is(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function ps(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 Js(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function pt(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 st(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 jt(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 Vs(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function ds(r){return r instanceof Error?r.message:String(r)}async function fs(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 rs(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 ys(r){const e=Ee.c(15),{title:o,count:l,action:i,children:a}=r;let c;e[0]!==o?(c=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:o}),e[0]=o,e[1]=c):c=e[1];let d;e[2]!==l?(d=typeof l=="number"&&l>0&&s.jsx(me,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=d):d=e[3];let t;e[4]!==i?(t=i&&s.jsx("div",{className:"ml-auto",children:i}),e[4]=i,e[5]=t):t=e[5];let n;e[6]!==c||e[7]!==d||e[8]!==t?(n=s.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[c,d,t]}),e[6]=c,e[7]=d,e[8]=t,e[9]=n):n=e[9];let u;e[10]!==a?(u=s.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=s.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 vs(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=s.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(a=>s.jsx("div",{className:"flex gap-3",children:Array.from({length:o}).map(Pt)},a))}),e[1]=o,e[2]=i):i=e[2],i}function Pt(r,e){return s.jsx(Rs,{className:"h-4 flex-1"},e)}function Ye(r){const e=Ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=s.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 yt(r){const e=Ee.c(54),{base:o,orgSlug:l,site:i}=r,a=cs(),c=Ss(),[d,t]=ne.useState(!1);let n;e[0]!==o?(n=()=>rs(`${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)}),de.success(a("mainPanelTabs.hostingTab.toastDeployQueued")),t(!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:vt},e[7]=n,e[8]=u,e[9]=v):v=e[9];const m=as(v);let N;e[10]===Symbol.for("react.memo_cache_sentinel")?(N=()=>t(!0),e[10]=N):N=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Bs,{className:"size-4"}),e[11]=g):g=e[11];let p;e[12]!==m.isPending||e[13]!==a?(p=m.isPending?a("mainPanelTabs.hostingTab.deploying"):a("mainPanelTabs.hostingTab.deploy"),e[12]=m.isPending,e[13]=a,e[14]=p):p=e[14];let h;e[15]!==m.isPending||e[16]!==p?(h=s.jsxs(ce,{size:"sm",onClick:N,disabled:m.isPending,children:[g,p]}),e[15]=m.isPending,e[16]=p,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=s.jsx(Cs,{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 T;e[24]!==w?(T=s.jsx(Ds,{children:w}),e[24]=w,e[25]=T):T=e[25];let S;e[26]!==T||e[27]!==j?(S=s.jsxs(ws,{children:[j,T]}),e[26]=T,e[27]=j,e[28]=S):S=e[28];const $=m.isPending;let z;e[29]!==a?(z=a("mainPanelTabs.hostingTab.cancel"),e[29]=a,e[30]=z):z=e[30];let C;e[31]!==m.isPending||e[32]!==z?(C=s.jsx($s,{disabled:$,children:z}),e[31]=m.isPending,e[32]=z,e[33]=C):C=e[33];let x;e[34]!==m?(x=f=>{f.preventDefault(),m.mutate()},e[34]=m,e[35]=x):x=e[35];const P=m.isPending;let L;e[36]!==a?(L=a("mainPanelTabs.hostingTab.deploy"),e[36]=a,e[37]=L):L=e[37];let _;e[38]!==m.isPending||e[39]!==x||e[40]!==L?(_=s.jsx(zs,{onClick:x,disabled:P,children:L}),e[38]=m.isPending,e[39]=x,e[40]=L,e[41]=_):_=e[41];let b;e[42]!==C||e[43]!==_?(b=s.jsxs(Ls,{children:[C,_]}),e[42]=C,e[43]=_,e[44]=b):b=e[44];let B;e[45]!==S||e[46]!==b?(B=s.jsxs(_s,{children:[S,b]}),e[45]=S,e[46]=b,e[47]=B):B=e[47];let A;e[48]!==d||e[49]!==B?(A=s.jsx(ks,{open:d,onOpenChange:t,children:B}),e[48]=d,e[49]=B,e[50]=A):A=e[50];let V;return e[51]!==A||e[52]!==h?(V=s.jsxs(s.Fragment,{children:[h,A]}),e[51]=A,e[52]=h,e[53]=V):V=e[53],V}function vt(r){return de.error(ds(r))}function Nt(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?s.jsxs(me,{variant:"warning",children:[s.jsx(ht,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?s.jsxs(me,{variant:"secondary",children:[s.jsx(ut,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):s.jsxs(me,{variant:"secondary",children:[s.jsx(Bs,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function St(r,e,o){const l=(r??"").toLowerCase();return l==="build"?s.jsxs(me,{variant:"secondary",children:[s.jsx(Us,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?s.jsxs(me,{variant:"secondary",children:[s.jsx(xt,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?s.jsxs(me,{variant:"secondary",children:[s.jsx(Bs,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Nt(e,o)}function Ct(r,e){const o=(r??"").toLowerCase();return o==="success"?s.jsx(me,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?s.jsx(me,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?s.jsxs(me,{variant:"secondary",children:[s.jsx(it,{className:"size-3"}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Dt(r){const e=Ee.c(35),{base:o,orgSlug:l,site:i,target:a,onOpenChange:c}=r,d=cs(),t=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 m;e[5]!==o||e[6]!==n||e[7]!==u?(m=()=>fs(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(u)}`),e[5]=o,e[6]=n,e[7]=u,e[8]=m):m=e[8];const N=t&&!!n;let g;e[9]!==v||e[10]!==m||e[11]!==N?(g={queryKey:v,queryFn:m,enabled:N,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=v,e[10]=m,e[11]=N,e[12]=g):g=e[12];const p=ms(g),h=p.data;let y;e[13]!==d?(y=d("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=d,e[14]=y):y=e[14];let j;e[15]!==y?(j=s.jsx(Hs,{children:s.jsx(Ms,{children:y})}),e[15]=y,e[16]=j):j=e[16];let w;e[17]!==n||e[18]!==d?(w=d("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=d,e[19]=w):w=e[19];let T;e[20]!==w?(T=s.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:w}),e[20]=w,e[21]=T):T=e[21];let S;e[22]!==h||e[23]!==p.error||e[24]!==p.isLoading||e[25]!==d?(S=Vs(p.error)?s.jsx(Ps,{icon:s.jsx(As,{className:"size-5"}),title:d("mainPanelTabs.hostingTab.notConnectedTitle"),description:d("mainPanelTabs.hostingTab.notConnectedDescription")}):p.isLoading?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(Rs,{className:"h-4 w-full"}),s.jsx(Rs,{className:"h-4 w-full"}),s.jsx(Rs,{className:"h-4 w-2/3"})]}):p.error?s.jsx(Ye,{children:d("mainPanelTabs.hostingTab.buildLogsError")}):h&&h.configured===!1?s.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:[s.jsx(ot,{className:"size-5 text-muted-foreground"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:d("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:h.reason??d("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):h?.text?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.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&&s.jsx("p",{className:"text-xs text-warning",children:d("mainPanelTabs.hostingTab.buildLogsTruncated")}),h.url&&s.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:[s.jsx(et,{className:"size-3.5"}),d("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):h?.url?s.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:[s.jsx(et,{className:"size-4"}),d("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):s.jsx(Ye,{children:d("mainPanelTabs.hostingTab.buildLogsEmpty")}),e[22]=h,e[23]=p.error,e[24]=p.isLoading,e[25]=d,e[26]=S):S=e[26];let $;e[27]!==j||e[28]!==T||e[29]!==S?($=s.jsxs(Ks,{className:"sm:max-w-2xl",children:[j,T,S]}),e[27]=j,e[28]=T,e[29]=S,e[30]=$):$=e[30];let z;return e[31]!==c||e[32]!==t||e[33]!==$?(z=s.jsx(Qs,{open:t,onOpenChange:c,children:$}),e[31]=c,e[32]=t,e[33]=$,e[34]=z):z=e[34],z}function wt(r){const e=Ee.c(52),{base:o,orgSlug:l,site:i,enabled:a,deployments:c,isLoading:d,error:t}=r,n=cs(),[u,v]=ne.useState(null),[m,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 p;e[3]!==o?(p=()=>fs(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=p):p=e[4];let h;e[5]!==a||e[6]!==g||e[7]!==p?(h={queryKey:g,queryFn:p,enabled:a,retry:!1,staleTime:3e4},e[5]=a,e[6]=g,e[7]=p,e[8]=h):h=e[8];const y=ms(h);let j,w,T,S,$;if(e[9]!==c||e[10]!==t||e[11]!==u||e[12]!==y.data||e[13]!==y.error||e[14]!==y.isLoading||e[15]!==d||e[16]!==n){const L=ps(y.data,"items"),_=c.find(zt)?.commitSha??c.find($t)?.commitSha??null;let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=(f,G)=>{f&&N({commit:f,env:G??"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 V;e[25]!==c||e[26]!==t||e[27]!==u||e[28]!==d||e[29]!==n?(V=d?s.jsx(vs,{cols:5}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deploymentsError")}):c.length===0?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noDeployments")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:c.map(f=>{const G=!!f.buildMessage,Z=u===f.id;return s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[G?s.jsx("button",{type:"button",onClick:()=>v(Z?null:f.id),"aria-label":n("mainPanelTabs.hostingTab.showBuildMessage"),className:"text-muted-foreground hover:text-foreground",children:Z?s.jsx(rt,{className:"size-4"}):s.jsx(ct,{className:"size-4"})}):s.jsx(dt,{className:"size-4 text-muted-foreground/60"}),s.jsx("span",{className:"font-mono text-xs",children:f.shortCommit??f.commitSha?.slice(0,7)??"—"}),f.production===!0&&s.jsx(me,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(me,{variant:pt(f.phase),children:f.phase??"—"}),f.up===!0&&s.jsx(me,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:Js(f.framework)??"—"}),s.jsx(q,{className:"text-right align-middle font-mono text-xs text-muted-foreground tabular-nums",children:jt(f.durationMs)}),s.jsx(q,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:st(f.finishedAt??f.startedAt??f.createdAt)}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:s.jsx(Us,{className:"size-4"})})})]}),G&&Z&&s.jsx(ye,{children:s.jsx(q,{colSpan:6,className:"bg-muted/10",children:s.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]=t,e[27]=u,e[28]=d,e[29]=n,e[30]=V):V=e[30],e[31]!==c.length||e[32]!==V||e[33]!==A?($=s.jsx(ys,{title:A,count:c.length,children:V}),e[31]=c.length,e[32]=V,e[33]=A,e[34]=$):$=e[34],j=ys,e[35]!==n?(w=n("mainPanelTabs.hostingTab.deployHistory"),e[35]=n,e[36]=w):w=e[36],T=L.length,S=y.isLoading?s.jsx(vs,{cols:4}):y.error?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deployHistoryError")}):L.length===0?s.jsx(Ps,{icon:s.jsx(Bs,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colAction")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colActor")}),s.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:L.map(f=>{const G=!!_&&f.commitSha===_;return s.jsxs(ye,{children:[s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[St(f.type,f.action,n),Ct(f.outcome,n)]})}),s.jsx(q,{className:"align-middle",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"font-mono text-xs",children:f.commitSha?.slice(0,7)??"—"}),G&&s.jsx(me,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:Js(f.framework)??"—"}),s.jsx(q,{className:"align-middle text-xs text-muted-foreground",children:f.actor??"—"}),s.jsx(q,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(it,{className:"size-3"}),st(f.createdAt)]})}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:s.jsx(Us,{className:"size-4"})})})]},f.id)})})]}),e[9]=c,e[10]=t,e[11]=u,e[12]=y.data,e[13]=y.error,e[14]=y.isLoading,e[15]=d,e[16]=n,e[17]=j,e[18]=w,e[19]=T,e[20]=S,e[21]=$}else j=e[17],w=e[18],T=e[19],S=e[20],$=e[21];let z;e[37]!==j||e[38]!==w||e[39]!==T||e[40]!==S?(z=s.jsx(j,{title:w,count:T,children:S}),e[37]=j,e[38]=w,e[39]=T,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]!==m||e[45]!==l||e[46]!==i?(x=s.jsx(Dt,{base:o,orgSlug:l,site:i,target:m,onOpenChange:C}),e[43]=o,e[44]=m,e[45]=l,e[46]=i,e[47]=x):x=e[47];let P;return e[48]!==x||e[49]!==$||e[50]!==z?(P=s.jsxs(s.Fragment,{children:[$,z,x]}),e[48]=x,e[49]=$,e[50]=z,e[51]=P):P=e[51],P}function $t(r){return r.production===!0&&r.up}function zt(r){return r.up===!0}function Lt(r){const e=Ee.c(82),{base:o,orgSlug:l,site:i,envVars:a,codeVars:c,isLoading:d,error:t}=r,n=cs(),u=Ss(),[v,m]=ne.useState(""),[N,g]=ne.useState(""),[p,h]=ne.useState("runtime"),[y,j]=ne.useState(null),[w,T]=ne.useState(""),[S,$]=ne.useState(null);let z;e[0]!==o?(z=D=>rs(`${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)}),de.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:kt},e[7]=z,e[8]=C,e[9]=x):x=e[9];const P=as(x);let L;e[10]!==v||e[11]!==p||e[12]!==N||e[13]!==P||e[14]!==a||e[15]!==n?(L=()=>{const D=v.trim();if(!D){de.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(a.some(O=>Is(O,{name:D,scope:p}))){de.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}P.mutate([...a,{name:D,value:N,scope:p}],{onSuccess:()=>{m(""),g(""),h("runtime")}})},e[10]=v,e[11]=p,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=>Is(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=>!Is(D,S)),{onSuccess:()=>$(null)})},e[21]=S,e[22]=P,e[23]=a,e[24]=A):A=e[24];const V=A;let f;e[25]!==n?(f=n("mainPanelTabs.hostingTab.env"),e[25]=n,e[26]=f):f=e[26];const G=a.length;let Z;e[27]!==v||e[28]!==p||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]!==t||e[37]!==_||e[38]!==B||e[39]!==d||e[40]!==n?(Z=d?s.jsx(vs,{cols:2}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.envError")}):s.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noEnv")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colName")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colValue")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map(D=>{const O=D.scope==="build"?"build":"runtime",ze=y?.name===D.name&&y?.scope===O;return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:s.jsxs("span",{className:"inline-flex items-center gap-2",children:[D.name,s.jsx(me,{variant:O==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:n(O==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")})]})}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[360px] align-middle",children:ze?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ls,{value:w,onChange:fe=>T(fe.target.value),className:"h-7 font-mono text-xs"}),s.jsx(ce,{size:"xs",onClick:()=>B({name:D.name,scope:O}),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.save")}),s.jsx(ce,{size:"xs",variant:"ghost",onClick:()=>j(null),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.cancel")})]}):s.jsx("button",{type:"button",onClick:()=>{j({name:D.name,scope:O}),T(D.value)},className:"block w-full truncate text-left hover:underline","aria-label":n("mainPanelTabs.hostingTab.editValue"),children:D.value})}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>$({name:D.name,scope:O}),disabled:P.isPending,children:s.jsx(Os,{className:"size-4"})})})]},`${D.name}:${O}`)})})]}),s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[s.jsx(ls,{placeholder:n("mainPanelTabs.hostingTab.envNamePlaceholder"),value:v,onChange:D=>m(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),s.jsx(ls,{placeholder:n("mainPanelTabs.hostingTab.envValuePlaceholder"),value:N,onChange:D=>g(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),s.jsxs(Ys,{value:p,onValueChange:D=>h(D==="build"?"build":"runtime"),disabled:P.isPending,children:[s.jsx(Gs,{className:"h-8 w-[110px]",children:s.jsx(Xs,{})}),s.jsxs(Zs,{children:[s.jsx(js,{value:"runtime",children:n("mainPanelTabs.hostingTab.secretScopeRuntime")}),s.jsx(js,{value:"build",children:n("mainPanelTabs.hostingTab.secretScopeBuild")})]})]}),s.jsxs(ce,{size:"sm","aria-label":n("mainPanelTabs.hostingTab.addVariable"),onClick:_,disabled:P.isPending||!v.trim(),children:[s.jsx(qs,{className:"size-4"}),n("mainPanelTabs.hostingTab.add")]})]}),c.length>0&&s.jsxs("div",{className:"mt-3 flex flex-col gap-1.5 border-t border-border pt-3",children:[s.jsx("p",{className:"px-2 text-xs text-muted-foreground",children:n("mainPanelTabs.hostingTab.codeVarsHint")}),s.jsx(ss,{children:s.jsx(ts,{children:c.map(_t)})})]})]}),e[27]=v,e[28]=p,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]=t,e[37]=_,e[38]=B,e[39]=d,e[40]=n,e[41]=Z):Z=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 te;e[45]!==ve?(te=s.jsx(Cs,{children:ve}),e[45]=ve,e[46]=te):te=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=s.jsx(Ds,{children:M}),e[50]=M,e[51]=U):U=e[51];let X;e[52]!==te||e[53]!==U?(X=s.jsxs(ws,{children:[te,U]}),e[52]=te,e[53]=U,e[54]=X):X=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=s.jsx($s,{disabled:ee,children:ie}),e[57]=P.isPending,e[58]=ie,e[59]=K):K=e[59];let J;e[60]!==V?(J=D=>{D.preventDefault(),V()},e[60]=V,e[61]=J):J=e[61];const se=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=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:J,disabled:se,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=s.jsxs(Ls,{children:[K,E]}),e[68]=K,e[69]=E,e[70]=k):k=e[70];let F;e[71]!==X||e[72]!==k?(F=s.jsxs(_s,{children:[X,k]}),e[71]=X,e[72]=k,e[73]=F):F=e[73];let Q;e[74]!==le||e[75]!==F?(Q=s.jsx(ks,{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]!==Z?(Y=s.jsxs(ys,{title:f,count:G,children:[Z,Q]}),e[77]=a.length,e[78]=Q,e[79]=f,e[80]=Z,e[81]=Y):Y=e[81],Y}function _t(r){return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:r.name}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[360px] truncate align-middle",children:r.value})]},r.name)}function kt(r){return de.error(ds(r))}function Et(r){const e=Ee.c(176),{base:o,orgSlug:l,site:i,secrets:a,isLoading:c,error:d}=r,t=cs(),n=Ss(),[u,v]=ne.useState(!1),[m,N]=ne.useState(""),[g,p]=ne.useState(""),[h,y]=ne.useState("runtime"),[j,w]=ne.useState(null);let T;e[0]!==l||e[1]!==n||e[2]!==i?(T=()=>n.invalidateQueries({queryKey:Ue.hostingSecrets(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=T):T=e[3];const S=T;let $;e[4]!==o?($=oe=>rs(`${o}/secrets`,"PUT",oe),e[4]=o,e[5]=$):$=e[5];let z;e[6]!==S||e[7]!==t?(z=()=>{S(),de.success(t("mainPanelTabs.hostingTab.toastSecretSaved")),v(!1),N(""),p(""),y("runtime")},e[6]=S,e[7]=t,e[8]=z):z=e[8];let C;e[9]!==$||e[10]!==z?(C={mutationFn:$,onSuccess:z,onError:Rt},e[9]=$,e[10]=z,e[11]=C):C=e[11];const x=as(C);let P;e[12]!==o?(P=oe=>rs(`${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]!==t?(L=()=>{S(),de.success(t("mainPanelTabs.hostingTab.toastSecretDeleted")),w(null)},e[14]=S,e[15]=t,e[16]=L):L=e[16];let _;e[17]!==P||e[18]!==L?(_={mutationFn:P,onSuccess:L,onError:Ft},e[17]=P,e[18]=L,e[19]=_):_=e[19];const b=as(_);let B;e[20]!==m||e[21]!==h||e[22]!==g||e[23]!==x||e[24]!==t?(B=()=>{const oe=m.trim();if(!oe){de.error(t("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!g){de.error(t("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}x.mutate({name:oe,value:g,scope:h})},e[20]=m,e[21]=h,e[22]=g,e[23]=x,e[24]=t,e[25]=B):B=e[25];const A=B;let V,f;e[26]===Symbol.for("react.memo_cache_sentinel")?(f=()=>v(!0),V=s.jsx(qs,{className:"size-4"}),e[26]=V,e[27]=f):(V=e[26],f=e[27]);let G;e[28]!==t?(G=t("mainPanelTabs.hostingTab.addSecret"),e[28]=t,e[29]=G):G=e[29];let Z;e[30]!==G?(Z=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:f,children:[V,G]}),e[30]=G,e[31]=Z):Z=e[31];const le=Z;let ae;e[32]!==t?(ae=t("mainPanelTabs.hostingTab.secrets"),e[32]=t,e[33]=ae):ae=e[33];const ve=a.length;let te;e[34]!==b.isPending||e[35]!==d||e[36]!==c||e[37]!==a||e[38]!==t?(te=c?s.jsx(vs,{cols:2}):d?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.secretsError")}):a.length===0?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.noSecrets")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:t("mainPanelTabs.hostingTab.colName")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colValue")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map(oe=>{const We=oe.scope==="build"?"build":"runtime";return s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:s.jsxs("span",{className:"inline-flex items-center gap-2",children:[oe.name,s.jsx(me,{variant:We==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:t(We==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")}),oe.origin==="worker"&&s.jsx(me,{variant:"secondary",className:"font-sans text-[10px]",children:t("mainPanelTabs.hostingTab.secretOnWorker")})]})}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground align-middle",children:t("mainPanelTabs.hostingTab.secretValueHidden")}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>w({name:oe.name,scope:We}),disabled:b.isPending,children:s.jsx(Os,{className:"size-4"})})})]},`${oe.name}:${We}`)})})]}),e[34]=b.isPending,e[35]=d,e[36]=c,e[37]=a,e[38]=t,e[39]=te):te=e[39];let re;e[40]!==t?(re=t("mainPanelTabs.hostingTab.addSecretTitle"),e[40]=t,e[41]=re):re=e[41];let M;e[42]!==re?(M=s.jsx(Hs,{children:s.jsx(Ms,{children:re})}),e[42]=re,e[43]=M):M=e[43];let U;e[44]!==t?(U=t("mainPanelTabs.hostingTab.colName"),e[44]=t,e[45]=U):U=e[45];let X;e[46]!==U?(X=s.jsx(hs,{htmlFor:"secret-name",children:U}),e[46]=U,e[47]=X):X=e[47];let ee;e[48]!==t?(ee=t("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[48]=t,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]!==m||e[52]!==x.isPending||e[53]!==ee?(K=s.jsx(ls,{id:"secret-name",placeholder:ee,value:m,onChange:ie,className:"font-mono text-xs",disabled:x.isPending}),e[51]=m,e[52]=x.isPending,e[53]=ee,e[54]=K):K=e[54];let J;e[55]!==X||e[56]!==K?(J=s.jsxs("div",{className:"flex flex-col gap-2",children:[X,K]}),e[55]=X,e[56]=K,e[57]=J):J=e[57];let se;e[58]!==t?(se=t("mainPanelTabs.hostingTab.colValue"),e[58]=t,e[59]=se):se=e[59];let W;e[60]!==se?(W=s.jsx(hs,{htmlFor:"secret-value",children:se}),e[60]=se,e[61]=W):W=e[61];let E;e[62]!==t?(E=t("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[62]=t,e[63]=E):E=e[63];let k;e[64]===Symbol.for("react.memo_cache_sentinel")?(k=oe=>p(oe.target.value),e[64]=k):k=e[64];let F;e[65]!==g||e[66]!==x.isPending||e[67]!==E?(F=s.jsx(ls,{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=s.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]!==t?(Y=t("mainPanelTabs.hostingTab.secretScope"),e[72]=t,e[73]=Y):Y=e[73];let D;e[74]!==Y?(D=s.jsx(hs,{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=s.jsx(Gs,{className:"w-full",children:s.jsx(Xs,{})}),e[77]=fe):fe=e[77];let Ne;e[78]!==t?(Ne=t("mainPanelTabs.hostingTab.secretScopeRuntime"),e[78]=t,e[79]=Ne):Ne=e[79];let he;e[80]!==Ne?(he=s.jsx(js,{value:"runtime",children:Ne}),e[80]=Ne,e[81]=he):he=e[81];let ue;e[82]!==t?(ue=t("mainPanelTabs.hostingTab.secretScopeBuild"),e[82]=t,e[83]=ue):ue=e[83];let Le;e[84]!==ue?(Le=s.jsx(js,{value:"build",children:ue}),e[84]=ue,e[85]=Le):Le=e[85];let Se;e[86]!==he||e[87]!==Le?(Se=s.jsxs(Zs,{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=s.jsxs(Ys,{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]!==t?(Fe=t(h==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[93]=h,e[94]=t,e[95]=Fe):Fe=e[95];let Re;e[96]!==Fe?(Re=s.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=s.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=s.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 Ge=x.isPending;let be;e[107]!==t?(be=t("mainPanelTabs.hostingTab.cancel"),e[107]=t,e[108]=be):be=e[108];let Te;e[109]!==x.isPending||e[110]!==be?(Te=s.jsx(ce,{variant:"outline",type:"button",onClick:De,disabled:Ge,children:be}),e[109]=x.isPending,e[110]=be,e[111]=Te):Te=e[111];let pe;e[112]!==m||e[113]!==g||e[114]!==x.isPending?(pe=x.isPending||!m.trim()||!g,e[112]=m,e[113]=g,e[114]=x.isPending,e[115]=pe):pe=e[115];let Ae;e[116]!==x.isPending||e[117]!==t?(Ae=x.isPending?t("mainPanelTabs.hostingTab.saving"):t("mainPanelTabs.hostingTab.add"),e[116]=x.isPending,e[117]=t,e[118]=Ae):Ae=e[118];let je;e[119]!==A||e[120]!==pe||e[121]!==Ae?(je=s.jsx(ce,{type:"button",onClick:A,disabled:pe,children:Ae}),e[119]=A,e[120]=pe,e[121]=Ae,e[122]=je):je=e[122];let we;e[123]!==Te||e[124]!==je?(we=s.jsxs(Ws,{children:[Te,je]}),e[123]=Te,e[124]=je,e[125]=we):we=e[125];let Ve;e[126]!==M||e[127]!==xe||e[128]!==we?(Ve=s.jsxs(Ks,{className:"sm:max-w-md",children:[M,xe,we]}),e[126]=M,e[127]=xe,e[128]=we,e[129]=Ve):Ve=e[129];let Pe;e[130]!==u||e[131]!==Ve?(Pe=s.jsx(Qs,{open:u,onOpenChange:v,children:Ve}),e[130]=u,e[131]=Ve,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]!==t?(R=t("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[134]=t,e[135]=R):R=e[135];let $e;e[136]!==R?($e=s.jsx(Cs,{children:R}),e[136]=R,e[137]=$e):$e=e[137];const Xe=j?.name??"";let qe;e[138]!==t||e[139]!==Xe?(qe=t("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Xe}),e[138]=t,e[139]=Xe,e[140]=qe):qe=e[140];let Be;e[141]!==qe?(Be=s.jsx(Ds,{children:qe}),e[141]=qe,e[142]=Be):Be=e[142];let Ze;e[143]!==$e||e[144]!==Be?(Ze=s.jsxs(ws,{children:[$e,Be]}),e[143]=$e,e[144]=Be,e[145]=Ze):Ze=e[145];const us=b.isPending;let Oe;e[146]!==t?(Oe=t("mainPanelTabs.hostingTab.cancel"),e[146]=t,e[147]=Oe):Oe=e[147];let He;e[148]!==b.isPending||e[149]!==Oe?(He=s.jsx($s,{disabled:us,children:Oe}),e[148]=b.isPending,e[149]=Oe,e[150]=He):He=e[150];let es;e[151]!==b||e[152]!==j?(es=oe=>{oe.preventDefault(),j&&b.mutate(j)},e[151]=b,e[152]=j,e[153]=es):es=e[153];const ns=b.isPending;let Me;e[154]!==t?(Me=t("mainPanelTabs.hostingTab.deleteSecret"),e[154]=t,e[155]=Me):Me=e[155];let Ke;e[156]!==b.isPending||e[157]!==es||e[158]!==Me?(Ke=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:es,disabled:ns,children:Me}),e[156]=b.isPending,e[157]=es,e[158]=Me,e[159]=Ke):Ke=e[159];let is;e[160]!==He||e[161]!==Ke?(is=s.jsxs(Ls,{children:[He,Ke]}),e[160]=He,e[161]=Ke,e[162]=is):is=e[162];let Qe;e[163]!==Ze||e[164]!==is?(Qe=s.jsxs(_s,{children:[Ze,is]}),e[163]=Ze,e[164]=is,e[165]=Qe):Qe=e[165];let Ie;e[166]!==_e||e[167]!==Qe?(Ie=s.jsx(ks,{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]!==te||e[173]!==Pe||e[174]!==Ie?(Je=s.jsxs(ys,{title:ae,count:ve,action:le,children:[te,Pe,Ie]}),e[169]=le,e[170]=a.length,e[171]=ae,e[172]=te,e[173]=Pe,e[174]=Ie,e[175]=Je):Je=e[175],Je}function Ft(r){return de.error(ds(r))}function Rt(r){return de.error(ds(r))}const At=["16.148.147.194","52.32.122.94","52.35.156.199"];function Vt(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function qt(r){return Vt(r)?"@":r}function lt(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),de.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=s.jsx(gt,{className:"size-3.5"}),e[5]=c):c=e[5];let d;return e[6]!==i||e[7]!==a?(d=s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":i,onClick:a,children:c}),e[6]=i,e[7]=a,e[8]=d):d=e[8],d}function tt(r){const e=Ee.c(64),{from:o,source:l,t:i}=r;let a,c,d,t,n,u,v;if(e[0]!==o||e[1]!==l||e[2]!==i){const L=o.trim().replace(/\.$/,"");c=L?qt(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")?(_=s.jsx(Ns,{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=s.jsx("span",{className:"text-xs font-medium",children:b}),e[13]=b,e[14]=B):B=e[14];const A=a?"secondary":"outline";let V;e[15]!==a||e[16]!==i?(V=i(a?"mainPanelTabs.hostingTab.dnsActive":"mainPanelTabs.hostingTab.dnsAwaiting"),e[15]=a,e[16]=i,e[17]=V):V=e[17];let f;e[18]!==V||e[19]!==A?(f=s.jsx(me,{variant:A,className:"ml-auto",children:V}),e[18]=V,e[19]=A,e[20]=f):f=e[20],e[21]!==f||e[22]!==B?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[_,B,f]}),e[21]=f,e[22]=B,e[23]=u):u=e[23],v=s.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:L||"—"})}),d="text-xs text-muted-foreground",t=i("mainPanelTabs.hostingTab.dnsSetupDescription",{host:L||"—"}),e[0]=o,e[1]=l,e[2]=i,e[3]=a,e[4]=c,e[5]=d,e[6]=t,e[7]=n,e[8]=u,e[9]=v}else a=e[3],c=e[4],d=e[5],t=e[6],n=e[7],u=e[8],v=e[9];let m;e[24]!==d||e[25]!==t?(m=s.jsx("p",{className:d,children:t}),e[24]=d,e[25]=t,e[26]=m):m=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=s.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[30]=N,e[31]=g):g=e[31];let p;e[32]!==i?(p=i("mainPanelTabs.hostingTab.dnsColType"),e[32]=i,e[33]=p):p=e[33];let h;e[34]!==p?(h=s.jsx(I,{children:p}),e[34]=p,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=s.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 T;e[42]!==w?(T=s.jsx(I,{children:w}),e[42]=w,e[43]=T):T=e[43];let S;e[44]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(I,{className:"w-[1%]"}),e[44]=S):S=e[44];let $;e[45]!==h||e[46]!==j||e[47]!==T?($=s.jsx(os,{children:s.jsxs(ye,{children:[h,j,T,S]})}),e[45]=h,e[46]=j,e[47]=T,e[48]=$):$=e[48];let z;e[49]!==c||e[50]!==i?(z=At.map(L=>s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:"A"}),s.jsx(q,{className:"font-mono text-xs align-middle",children:c}),s.jsx(q,{className:"font-mono text-xs align-middle",children:L}),s.jsx(q,{className:"text-right align-middle",children:s.jsx(lt,{value:L,t:i})})]},L)),e[49]=c,e[50]=i,e[51]=z):z=e[51];let C;e[52]!==z?(C=s.jsx(ts,{children:z}),e[52]=z,e[53]=C):C=e[53];let x;e[54]!==$||e[55]!==C?(x=s.jsxs(ss,{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]!==m||e[62]!==g?(P=s.jsxs("div",{className:n,children:[u,v,m,g,x]}),e[57]=x,e[58]=n,e[59]=u,e[60]=v,e[61]=m,e[62]=g,e[63]=P):P=e[63],P}function Bt(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=s.jsx(me,{variant:i,children:a}),e[3]=i,e[4]=a,e[5]=c):c=e[5],c}function Ot(r){const e=Ee.c(180),{base:o,orgSlug:l,site:i,redirects:a,isLoading:c,error:d}=r,t=cs(),n=Ss(),[u,v]=ne.useState(!1),[m,N]=ne.useState(null),[g,p]=ne.useState(""),[h,y]=ne.useState(""),[j,w]=ne.useState("permanent"),[T,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=>rs(`${o}/redirects`,"PUT",H),e[4]=o,e[5]=P):P=e[5];let L;e[6]!==x||e[7]!==t?(L=()=>{x(),de.success(t("mainPanelTabs.hostingTab.toastRedirectSaved")),v(!1)},e[6]=x,e[7]=t,e[8]=L):L=e[8];let _;e[9]!==P||e[10]!==L?(_={mutationFn:P,onSuccess:L,onError:Mt},e[9]=P,e[10]=L,e[11]=_):_=e[11];const b=as(_);let B;e[12]!==o?(B=H=>rs(`${o}/redirects/${encodeURIComponent(H)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==x||e[15]!==t?(A=()=>{x(),de.success(t("mainPanelTabs.hostingTab.toastRedirectDeleted")),S(null)},e[14]=x,e[15]=t,e[16]=A):A=e[16];let V;e[17]!==B||e[18]!==A?(V={mutationFn:B,onSuccess:A,onError:Ht},e[17]=B,e[18]=A,e[19]=V):V=e[19];const f=as(V);let G;e[20]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{N(null),p(""),y(""),w("permanent"),v(!0)},e[20]=G):G=e[20];const Z=G;let le;e[21]===Symbol.for("react.memo_cache_sentinel")?(le=H=>{N(H.from),p(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]!==t?(ve=()=>{const H=g.trim(),Fs=h.trim();if(!H||!Fs){de.error(t("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}b.mutate({from:H,to:Fs,type:j})},e[22]=g,e[23]=h,e[24]=j,e[25]=b,e[26]=t,e[27]=ve):ve=e[27];const te=ve;let re;e[28]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(qs,{className:"size-4"}),e[28]=re):re=e[28];let M;e[29]!==t?(M=t("mainPanelTabs.hostingTab.addRedirect"),e[29]=t,e[30]=M):M=e[30];let U;e[31]!==M?(U=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:Z,children:[re,M]}),e[31]=M,e[32]=U):U=e[32];const X=U;let ee;e[33]!==t?(ee=t("mainPanelTabs.hostingTab.redirects"),e[33]=t,e[34]=ee):ee=e[34];const ie=a.length;let K;e[35]!==f.isPending||e[36]!==$||e[37]!==d||e[38]!==c||e[39]!==b.isPending||e[40]!==a||e[41]!==t?(K=c?s.jsx(vs,{cols:3}):d?s.jsx(Ye,{children:t("mainPanelTabs.hostingTab.redirectsError")}):a.length===0?s.jsx(Ps,{icon:s.jsx(mt,{className:"size-5"}),title:t("mainPanelTabs.hostingTab.noRedirects")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:t("mainPanelTabs.hostingTab.colFrom")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colTo")}),s.jsx(I,{children:t("mainPanelTabs.hostingTab.colType")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map((H,Fs)=>s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-middle",children:H.from}),s.jsx(q,{className:"font-mono text-xs text-muted-foreground max-w-[280px] truncate align-middle",children:H.to}),s.jsx(q,{className:"align-middle",children:s.jsx(Bt,{type:H.type,t})}),s.jsxs(q,{className:"text-right align-middle whitespace-nowrap",children:[s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>z($===H.from?null:H.from),children:s.jsx(Ns,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>ae(H),disabled:b.isPending,children:s.jsx(ft,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":t("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>S(H.from),disabled:f.isPending,children:s.jsx(Os,{className:"size-4"})})]})]}),$===H.from&&s.jsx(ye,{children:s.jsx(q,{colSpan:4,className:"bg-muted/10",children:s.jsx(tt,{from:H.from,source:H.source,t})})})]},H.id??`${H.from}-${Fs}`))})]}),e[35]=f.isPending,e[36]=$,e[37]=d,e[38]=c,e[39]=b.isPending,e[40]=a,e[41]=t,e[42]=K):K=e[42];let J;e[43]!==m||e[44]!==t?(J=m!=null?t("mainPanelTabs.hostingTab.editRedirectTitle"):t("mainPanelTabs.hostingTab.addRedirectTitle"),e[43]=m,e[44]=t,e[45]=J):J=e[45];let se;e[46]!==J?(se=s.jsx(Hs,{children:s.jsx(Ms,{children:J})}),e[46]=J,e[47]=se):se=e[47];let W;e[48]!==t?(W=t("mainPanelTabs.hostingTab.colFrom"),e[48]=t,e[49]=W):W=e[49];let E;e[50]!==W?(E=s.jsx(hs,{htmlFor:"redirect-from",children:W}),e[50]=W,e[51]=E):E=e[51];let k;e[52]!==t?(k=t("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[52]=t,e[53]=k):k=e[53];let F;e[54]===Symbol.for("react.memo_cache_sentinel")?(F=H=>p(H.target.value),e[54]=F):F=e[54];const Q=m!=null||b.isPending;let Y;e[55]!==g||e[56]!==k||e[57]!==Q?(Y=s.jsx(ls,{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=s.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]!==t?(O=t("mainPanelTabs.hostingTab.colTo"),e[62]=t,e[63]=O):O=e[63];let ze;e[64]!==O?(ze=s.jsx(hs,{htmlFor:"redirect-to",children:O}),e[64]=O,e[65]=ze):ze=e[65];let fe;e[66]!==t?(fe=t("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[66]=t,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=s.jsx(ls,{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=s.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]!==t?(Le=t("mainPanelTabs.hostingTab.colType"),e[76]=t,e[77]=Le):Le=e[77];let Se;e[78]!==Le?(Se=s.jsx(hs,{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=s.jsx(Gs,{className:"w-full",children:s.jsx(Xs,{})}),e[81]=Re):Re=e[81];let ge;e[82]!==t?(ge=t("mainPanelTabs.hostingTab.permanent"),e[82]=t,e[83]=ge):ge=e[83];let xe;e[84]!==ge?(xe=s.jsx(js,{value:"permanent",children:ge}),e[84]=ge,e[85]=xe):xe=e[85];let De;e[86]!==t?(De=t("mainPanelTabs.hostingTab.temporary"),e[86]=t,e[87]=De):De=e[87];let Ge;e[88]!==De?(Ge=s.jsx(js,{value:"temporary",children:De}),e[88]=De,e[89]=Ge):Ge=e[89];let be;e[90]!==xe||e[91]!==Ge?(be=s.jsxs(Zs,{children:[xe,Ge]}),e[90]=xe,e[91]=Ge,e[92]=be):be=e[92];let Te;e[93]!==j||e[94]!==b.isPending||e[95]!==be?(Te=s.jsxs(Ys,{value:j,onValueChange:Ce,disabled:Fe,children:[Re,be]}),e[93]=j,e[94]=b.isPending,e[95]=be,e[96]=Te):Te=e[96];let pe;e[97]!==Se||e[98]!==Te?(pe=s.jsxs("div",{className:"flex flex-col gap-2",children:[Se,Te]}),e[97]=Se,e[98]=Te,e[99]=pe):pe=e[99];let Ae;e[100]!==m||e[101]!==g||e[102]!==a||e[103]!==t?(Ae=g.trim()&&s.jsx(tt,{from:g,source:a.find(H=>H.from===m)?.source,t}),e[100]=m,e[101]=g,e[102]=a,e[103]=t,e[104]=Ae):Ae=e[104];let je;e[105]!==D||e[106]!==ue||e[107]!==pe||e[108]!==Ae?(je=s.jsxs("div",{className:"flex flex-col gap-4",children:[D,ue,pe,Ae]}),e[105]=D,e[106]=ue,e[107]=pe,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 Ve=b.isPending;let Pe;e[111]!==t?(Pe=t("mainPanelTabs.hostingTab.cancel"),e[111]=t,e[112]=Pe):Pe=e[112];let _e;e[113]!==b.isPending||e[114]!==Pe?(_e=s.jsx(ce,{variant:"outline",type:"button",onClick:we,disabled:Ve,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]!==t?(R=b.isPending?t("mainPanelTabs.hostingTab.saving"):t("mainPanelTabs.hostingTab.save"),e[120]=b.isPending,e[121]=t,e[122]=R):R=e[122];let $e;e[123]!==te||e[124]!==ke||e[125]!==R?($e=s.jsx(ce,{type:"button",onClick:te,disabled:ke,children:R}),e[123]=te,e[124]=ke,e[125]=R,e[126]=$e):$e=e[126];let Xe;e[127]!==_e||e[128]!==$e?(Xe=s.jsxs(Ws,{children:[_e,$e]}),e[127]=_e,e[128]=$e,e[129]=Xe):Xe=e[129];let qe;e[130]!==se||e[131]!==je||e[132]!==Xe?(qe=s.jsxs(Ks,{className:"sm:max-w-md",children:[se,je,Xe]}),e[130]=se,e[131]=je,e[132]=Xe,e[133]=qe):qe=e[133];let Be;e[134]!==u||e[135]!==qe?(Be=s.jsx(Qs,{open:u,onOpenChange:v,children:qe}),e[134]=u,e[135]=qe,e[136]=Be):Be=e[136];const Ze=T!=null;let us;e[137]===Symbol.for("react.memo_cache_sentinel")?(us=H=>{H||S(null)},e[137]=us):us=e[137];let Oe;e[138]!==t?(Oe=t("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[138]=t,e[139]=Oe):Oe=e[139];let He;e[140]!==Oe?(He=s.jsx(Cs,{children:Oe}),e[140]=Oe,e[141]=He):He=e[141];const es=T??"";let ns;e[142]!==t||e[143]!==es?(ns=t("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:es}),e[142]=t,e[143]=es,e[144]=ns):ns=e[144];let Me;e[145]!==ns?(Me=s.jsx(Ds,{children:ns}),e[145]=ns,e[146]=Me):Me=e[146];let Ke;e[147]!==He||e[148]!==Me?(Ke=s.jsxs(ws,{children:[He,Me]}),e[147]=He,e[148]=Me,e[149]=Ke):Ke=e[149];const is=f.isPending;let Qe;e[150]!==t?(Qe=t("mainPanelTabs.hostingTab.cancel"),e[150]=t,e[151]=Qe):Qe=e[151];let Ie;e[152]!==f.isPending||e[153]!==Qe?(Ie=s.jsx($s,{disabled:is,children:Qe}),e[152]=f.isPending,e[153]=Qe,e[154]=Ie):Ie=e[154];let Je;e[155]!==f||e[156]!==T?(Je=H=>{H.preventDefault(),T&&f.mutate(T)},e[155]=f,e[156]=T,e[157]=Je):Je=e[157];const oe=f.isPending;let We;e[158]!==t?(We=t("mainPanelTabs.hostingTab.deleteRedirect"),e[158]=t,e[159]=We):We=e[159];let gs;e[160]!==f.isPending||e[161]!==Je||e[162]!==We?(gs=s.jsx(zs,{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]=gs):gs=e[163];let xs;e[164]!==Ie||e[165]!==gs?(xs=s.jsxs(Ls,{children:[Ie,gs]}),e[164]=Ie,e[165]=gs,e[166]=xs):xs=e[166];let bs;e[167]!==Ke||e[168]!==xs?(bs=s.jsxs(_s,{children:[Ke,xs]}),e[167]=Ke,e[168]=xs,e[169]=bs):bs=e[169];let Ts;e[170]!==Ze||e[171]!==bs?(Ts=s.jsx(ks,{open:Ze,onOpenChange:us,children:bs}),e[170]=Ze,e[171]=bs,e[172]=Ts):Ts=e[172];let Es;return e[173]!==X||e[174]!==a.length||e[175]!==ee||e[176]!==K||e[177]!==Be||e[178]!==Ts?(Es=s.jsxs(ys,{title:ee,count:ie,action:X,children:[K,Be,Ts]}),e[173]=X,e[174]=a.length,e[175]=ee,e[176]=K,e[177]=Be,e[178]=Ts,e[179]=Es):Es=e[179],Es}function Ht(r){return de.error(ds(r))}function Mt(r){return de.error(ds(r))}function nt(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=s.jsx(Ns,{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=s.jsxs("div",{className:"flex items-center gap-2",children:[i,s.jsx("span",{className:"text-xs font-medium",children:a})]}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==l?(d=l("mainPanelTabs.hostingTab.dnsColType"),e[5]=l,e[6]=d):d=e[6];let t;e[7]!==d?(t=s.jsx(I,{className:"w-14",children:d}),e[7]=d,e[8]=t):t=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=s.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 m;e[15]!==v?(m=s.jsx(I,{children:v}),e[15]=v,e[16]=m):m=e[16];let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(I,{className:"w-8"}),e[17]=N):N=e[17];let g;e[18]!==t||e[19]!==u||e[20]!==m?(g=s.jsx(os,{children:s.jsxs(ye,{children:[t,u,m,N]})}),e[18]=t,e[19]=u,e[20]=m,e[21]=g):g=e[21];let p;if(e[22]!==o||e[23]!==l){let w;e[25]!==l?(w=T=>s.jsxs(ye,{children:[s.jsx(q,{className:"font-mono text-xs align-top",children:T.type}),s.jsx(q,{className:"break-all font-mono text-xs align-top",children:T.name}),s.jsx(q,{className:"break-all font-mono text-xs align-top",children:T.value}),s.jsx(q,{className:"text-right align-top",children:s.jsx(lt,{value:T.value,t:l})})]},`${T.type}-${T.name}-${T.value}`),e[25]=l,e[26]=w):w=e[26],p=o.map(w),e[22]=o,e[23]=l,e[24]=p}else p=e[24];let h;e[27]!==p?(h=s.jsx(ts,{children:p}),e[27]=p,e[28]=h):h=e[28];let y;e[29]!==g||e[30]!==h?(y=s.jsxs(ss,{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=s.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 Kt(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 d;e[3]!==o.detail||e[4]!==l?(d=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=d):d=e[5];const t=d,n=i==="active"?"secondary":"outline";let u;return e[6]!==t||e[7]!==c||e[8]!==n?(u=s.jsx(me,{variant:n,title:t,children:c}),e[6]=t,e[7]=c,e[8]=n,e[9]=u):u=e[9],u}function Qt(r){const e=Ee.c(138),{base:o,orgSlug:l,site:i,domains:a,dnsTemplate:c,isLoading:d,error:t}=r,n=cs(),u=Ss(),[v,m]=ne.useState(!1),[N,g]=ne.useState(""),[p,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 T=w;let S;e[4]!==o?(S=R=>rs(`${o}/domains`,"PUT",R),e[4]=o,e[5]=S):S=e[5];let $;e[6]!==T||e[7]!==n?($=()=>{T(),de.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),m(!1)},e[6]=T,e[7]=n,e[8]=$):$=e[8];let z;e[9]!==S||e[10]!==$?(z={mutationFn:S,onSuccess:$,onError:Ut},e[9]=S,e[10]=$,e[11]=z):z=e[11];const C=as(z);let x;e[12]!==o?(x=R=>rs(`${o}/domains/${encodeURIComponent(R)}`,"DELETE"),e[12]=o,e[13]=x):x=e[13];let P;e[14]!==T||e[15]!==n?(P=()=>{T(),de.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),h(null)},e[14]=T,e[15]=n,e[16]=P):P=e[16];let L;e[17]!==x||e[18]!==P?(L={mutationFn:x,onSuccess:P,onError:It},e[17]=x,e[18]=P,e[19]=L):L=e[19];const _=as(L);let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{g(""),m(!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){de.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 V=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 G=f;let Z;e[30]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(qs,{className:"size-4"}),e[30]=Z):Z=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=s.jsxs(ce,{size:"sm",variant:"secondary",onClick:B,children:[Z,le]}),e[33]=le,e[34]=ae):ae=e[34];const ve=ae;let te;e[35]!==n?(te=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=te):te=e[36];const re=a.length;let M;e[37]!==_.isPending||e[38]!==y||e[39]!==a||e[40]!==t||e[41]!==d||e[42]!==n?(M=d?s.jsx(vs,{cols:3}):t?s.jsx(Ye,{children:n("mainPanelTabs.hostingTab.domainsError")}):a.length===0?s.jsx(Ps,{icon:s.jsx(Ns,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains")}):s.jsxs(ss,{children:[s.jsx(os,{children:s.jsxs(ye,{children:[s.jsx(I,{children:n("mainPanelTabs.hostingTab.colHost")}),s.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),s.jsx(I,{className:"w-[1%]"})]})}),s.jsx(ts,{children:a.map((R,$e)=>s.jsxs(ne.Fragment,{children:[s.jsxs(ye,{children:[s.jsxs(q,{className:"font-mono text-xs align-middle",children:[R.host,R.canonical&&s.jsx(me,{variant:"outline",className:"ml-2",children:n("mainPanelTabs.hostingTab.canonical")})]}),s.jsx(q,{className:"align-middle",children:s.jsx(Kt,{domain:R,t:n})}),s.jsx(q,{className:"text-right align-middle whitespace-nowrap",children:!R.canonical&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>j(y===R.host?null:R.host),children:s.jsx(Ns,{className:"size-4"})}),s.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>h(R.host),disabled:_.isPending,children:s.jsx(Os,{className:"size-4"})})]})})]}),y===R.host&&s.jsx(ye,{children:s.jsx(q,{colSpan:3,className:"bg-muted/10",children:s.jsx(nt,{records:R.dns??[],t:n})})})]},`${R.host}-${$e}`))})]}),e[37]=_.isPending,e[38]=y,e[39]=a,e[40]=t,e[41]=d,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 X;e[46]!==U?(X=s.jsx(Hs,{children:s.jsx(Ms,{children:U})}),e[46]=U,e[47]=X):X=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=s.jsx(hs,{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 se;e[55]!==N||e[56]!==C.isPending||e[57]!==K?(se=s.jsx(ls,{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]=se):se=e[58];let W;e[59]!==ie||e[60]!==se?(W=s.jsxs("div",{className:"flex flex-col gap-2",children:[ie,se]}),e[59]=ie,e[60]=se,e[61]=W):W=e[61];let E;e[62]!==N||e[63]!==G||e[64]!==n?(E=N.trim()&&s.jsx(nt,{records:G,t:n}),e[62]=N,e[63]=G,e[64]=n,e[65]=E):E=e[65];let k;e[66]!==W||e[67]!==E?(k=s.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=()=>m(!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=s.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]!==V||e[82]!==O||e[83]!==ze?(fe=s.jsx(ce,{type:"button",onClick:V,disabled:O,children:ze}),e[81]=V,e[82]=O,e[83]=ze,e[84]=fe):fe=e[84];let Ne;e[85]!==D||e[86]!==fe?(Ne=s.jsxs(Ws,{children:[D,fe]}),e[85]=D,e[86]=fe,e[87]=Ne):Ne=e[87];let he;e[88]!==X||e[89]!==k||e[90]!==Ne?(he=s.jsxs(Ks,{className:"sm:max-w-md",children:[X,k,Ne]}),e[88]=X,e[89]=k,e[90]=Ne,e[91]=he):he=e[91];let ue;e[92]!==v||e[93]!==he?(ue=s.jsx(Qs,{open:v,onOpenChange:m,children:he}),e[92]=v,e[93]=he,e[94]=ue):ue=e[94];const Le=p!=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=s.jsx(Cs,{children:Ce}),e[98]=Ce,e[99]=Fe):Fe=e[99];const Re=p??"";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=s.jsx(Ds,{children:ge}),e[103]=ge,e[104]=xe):xe=e[104];let De;e[105]!==Fe||e[106]!==xe?(De=s.jsxs(ws,{children:[Fe,xe]}),e[105]=Fe,e[106]=xe,e[107]=De):De=e[107];const Ge=_.isPending;let be;e[108]!==n?(be=n("mainPanelTabs.hostingTab.cancel"),e[108]=n,e[109]=be):be=e[109];let Te;e[110]!==_.isPending||e[111]!==be?(Te=s.jsx($s,{disabled:Ge,children:be}),e[110]=_.isPending,e[111]=be,e[112]=Te):Te=e[112];let pe;e[113]!==_||e[114]!==p?(pe=R=>{R.preventDefault(),p&&_.mutate(p)},e[113]=_,e[114]=p,e[115]=pe):pe=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]!==pe||e[120]!==je?(we=s.jsx(zs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:pe,disabled:Ae,children:je}),e[118]=_.isPending,e[119]=pe,e[120]=je,e[121]=we):we=e[121];let Ve;e[122]!==Te||e[123]!==we?(Ve=s.jsxs(Ls,{children:[Te,we]}),e[122]=Te,e[123]=we,e[124]=Ve):Ve=e[124];let Pe;e[125]!==De||e[126]!==Ve?(Pe=s.jsxs(_s,{children:[De,Ve]}),e[125]=De,e[126]=Ve,e[127]=Pe):Pe=e[127];let _e;e[128]!==Le||e[129]!==Pe?(_e=s.jsx(ks,{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]!==te||e[134]!==M||e[135]!==ue||e[136]!==_e?(ke=s.jsxs(ys,{title:te,count:re,action:ve,children:[M,ue,_e]}),e[131]=ve,e[132]=a.length,e[133]=te,e[134]=M,e[135]=ue,e[136]=_e,e[137]=ke):ke=e[137],ke}function It(r){return de.error(ds(r))}function Ut(r){return de.error(ds(r))}function ti(r){const e=Ee.c(118),{virtualMcpId:o}=r,l=cs(),{org:i}=at(),a=bt(o),c=Tt(a),d=!!c,t=c?`/api/${i.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==t?(n=()=>fs(`${t}/deployments`),e[0]=t,e[1]=n):n=e[1];const u=ms({queryKey:Ue.hostingDeployments(i.slug,c??""),queryFn:n,enabled:d,retry:!1,staleTime:3e4});let v;e[2]!==t?(v=()=>fs(`${t}/env`),e[2]=t,e[3]=v):v=e[3];const m=ms({queryKey:Ue.hostingEnv(i.slug,c??""),queryFn:v,enabled:d,retry:!1,staleTime:3e4});let N;e[4]!==t?(N=()=>fs(`${t}/secrets`),e[4]=t,e[5]=N):N=e[5];const g=ms({queryKey:Ue.hostingSecrets(i.slug,c??""),queryFn:N,enabled:d,retry:!1,staleTime:3e4});let p;e[6]!==t?(p=()=>fs(`${t}/redirects`),e[6]=t,e[7]=p):p=e[7];const h=ms({queryKey:Ue.hostingRedirects(i.slug,c??""),queryFn:p,enabled:d,retry:!1,staleTime:3e4});let y;e[8]!==t?(y=()=>fs(`${t}/domains`),e[8]=t,e[9]=y):y=e[9];const j=ms({queryKey:Ue.hostingDomains(i.slug,c??""),queryFn:y,enabled:d,retry:!1,staleTime:3e4});if(!c){let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(As,{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=s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(Ps,{icon:E,title:k,description:F})}),e[15]=k,e[16]=F,e[17]=Q):Q=e[17],Q}if(Vs(u.error)&&Vs(m.error)&&Vs(h.error)){let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(As,{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=s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(Ps,{icon:E,title:k,description:F})}),e[23]=k,e[24]=F,e[25]=Q):Q=e[25],Q}let T,S,$,z,C,x,P,L;if(e[26]!==u.data||e[27]!==j.data||e[28]!==m.data||e[29]!==h.data||e[30]!==g.data){S=ps(u.data,"items");let E;e[39]!==m.data?(E=ps(m.data,"vars"),e[39]=m.data,e[40]=E):E=e[40],C=E;let k;e[41]!==m.data?(k=ps(m.data,"codeVars"),e[41]=m.data,e[42]=k):k=e[42],T=k;let F;e[43]!==g.data?(F=ps(g.data,"secrets"),e[43]=g.data,e[44]=F):F=e[44],P=F;let Q;e[45]!==h.data?(Q=ps(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=Js(S.find(Jt)?.framework),e[26]=u.data,e[27]=j.data,e[28]=m.data,e[29]=h.data,e[30]=g.data,e[31]=T,e[32]=S,e[33]=$,e[34]=z,e[35]=C,e[36]=x,e[37]=P,e[38]=L}else T=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",V="flex flex-col gap-1";let f;e[51]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(As,{className:"size-[18px] text-muted-foreground"}),e[51]=f):f=e[51];let G;e[52]!==l?(G=l("mainPanelTabs.hostingTab.title"),e[52]=l,e[53]=G):G=e[53];let Z;e[54]!==G?(Z=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:G}),e[54]=G,e[55]=Z):Z=e[55];let le;e[56]!==_?(le=_&&s.jsx(me,{variant:"secondary",children:_}),e[56]=_,e[57]=le):le=e[57];let ae;e[58]!==Z||e[59]!==le?(ae=s.jsxs("div",{className:"flex items-center gap-2",children:[f,Z,le]}),e[58]=Z,e[59]=le,e[60]=ae):ae=e[60];const ve="text-sm text-muted-foreground",te=l("mainPanelTabs.hostingTab.subtitle",{site:c});let re;e[61]!==te?(re=s.jsx("p",{className:ve,children:te}),e[61]=te,e[62]=re):re=e[62];let M;e[63]!==ae||e[64]!==re?(M=s.jsxs("div",{className:V,children:[ae,re]}),e[63]=ae,e[64]=re,e[65]=M):M=e[65];let U;e[66]!==t||e[67]!==i.slug||e[68]!==c?(U=s.jsx(yt,{base:t,orgSlug:i.slug,site:c}),e[66]=t,e[67]=i.slug,e[68]=c,e[69]=U):U=e[69];let X;e[70]!==M||e[71]!==U?(X=s.jsxs("div",{className:A,children:[M,U]}),e[70]=M,e[71]=U,e[72]=X):X=e[72];let ee;e[73]!==t||e[74]!==S||e[75]!==u.error||e[76]!==u.isLoading||e[77]!==d||e[78]!==i.slug||e[79]!==c?(ee=s.jsx(wt,{base:t,orgSlug:i.slug,site:c,enabled:d,deployments:S,isLoading:u.isLoading,error:u.error}),e[73]=t,e[74]=S,e[75]=u.error,e[76]=u.isLoading,e[77]=d,e[78]=i.slug,e[79]=c,e[80]=ee):ee=e[80];let ie;e[81]!==t||e[82]!==T||e[83]!==m.error||e[84]!==m.isLoading||e[85]!==C||e[86]!==i.slug||e[87]!==c?(ie=s.jsx(Lt,{base:t,orgSlug:i.slug,site:c,envVars:C,codeVars:T,isLoading:m.isLoading,error:m.error}),e[81]=t,e[82]=T,e[83]=m.error,e[84]=m.isLoading,e[85]=C,e[86]=i.slug,e[87]=c,e[88]=ie):ie=e[88];let K;e[89]!==t||e[90]!==i.slug||e[91]!==P||e[92]!==g.error||e[93]!==g.isLoading||e[94]!==c?(K=s.jsx(Et,{base:t,orgSlug:i.slug,site:c,secrets:P,isLoading:g.isLoading,error:g.error}),e[89]=t,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]!==t||e[97]!==$||e[98]!==z||e[99]!==j.error||e[100]!==j.isLoading||e[101]!==i.slug||e[102]!==c?(J=s.jsx(Qt,{base:t,orgSlug:i.slug,site:c,domains:z,dnsTemplate:$,isLoading:j.isLoading,error:j.error}),e[96]=t,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 se;e[104]!==t||e[105]!==i.slug||e[106]!==x||e[107]!==h.error||e[108]!==h.isLoading||e[109]!==c?(se=s.jsx(Ot,{base:t,orgSlug:i.slug,site:c,redirects:x,isLoading:h.isLoading,error:h.error}),e[104]=t,e[105]=i.slug,e[106]=x,e[107]=h.error,e[108]=h.isLoading,e[109]=c,e[110]=se):se=e[110];let W;return e[111]!==X||e[112]!==ee||e[113]!==ie||e[114]!==K||e[115]!==J||e[116]!==se?(W=s.jsx("div",{className:b,children:s.jsxs("div",{className:B,children:[X,ee,ie,K,J,se]})}),e[111]=X,e[112]=ee,e[113]=ie,e[114]=K,e[115]=J,e[116]=se,e[117]=W):W=e[117],W}function Jt(r){return r.framework}export{ti as HostingTab};