decocms 4.239.2 → 4.241.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/client/assets/{AlertCircle-CeleFBrs.js → AlertCircle-BSGNUx7V.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Cr68R9KD.js → AreaChart-qGMzdkmk.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CwsJ1Sfc.js → ArrowLeft-DHRINKlz.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-PM43ttWN.js → ArrowUp-ntTpD-To.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-C0hTvHTE.js → ArrowUpRight-BG4SvGJv.js} +1 -1
  6. package/dist/client/assets/{Check-BdzjeMXF.js → Check-DhNjrmaj.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-D-nlOrXB.js → CheckCircle-B_sdSbJU.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-BOc1-i9L.js → ChevronDown-CaUFgq06.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-wqbYwiLF.js → ChevronRight-jZWdrf9f.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-IHCmvX3E.js → ChevronUp-BRjHRWFg.js} +1 -1
  11. package/dist/client/assets/{Copy01-DIJvVGQk.js → Copy01-C3CSvCmh.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-W4m_wy49.js → CreditCard01-5rNLMrBA.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-Bohq38Q1.js → DotsVertical-Dp5Cm_iP.js} +1 -1
  14. package/dist/client/assets/Download01-DIiuseU_.js +1 -0
  15. package/dist/client/assets/{Eye-C5vDWwaK.js → Eye-CVDf_kH4.js} +1 -1
  16. package/dist/client/assets/{FilterLines-C9pmu5SZ.js → FilterLines-DV7AkyjC.js} +1 -1
  17. package/dist/client/assets/Globe01-Bak8Df7R.js +1 -0
  18. package/dist/client/assets/{Globe04-CDJqKwdP.js → Globe04-21nMtmZT.js} +1 -1
  19. package/dist/client/assets/{HardDrive-BicURFt0.js → HardDrive-yKF5zKg2.js} +1 -1
  20. package/dist/client/assets/{Key01-CRQOB5O_.js → Key01-C-HagbU9.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-DZwVeKk1.js → LayoutLeft-DTt2h_gY.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-Do6tmctI.js → LinkExternal01-BAXCjJ3W.js} +1 -1
  23. package/dist/client/assets/{LockUnlocked01-BxK9l3CJ.js → LockUnlocked01-CTGb9BVB.js} +1 -1
  24. package/dist/client/assets/{LogOut01-DhAdDNkV.js → LogOut01-CI181NEF.js} +1 -1
  25. package/dist/client/assets/{Monitor01-BKGGKBRj.js → Monitor01-Be5N7TRy.js} +1 -1
  26. package/dist/client/assets/{Palette-5WrpEUaC.js → Palette-BNNCPeK0.js} +1 -1
  27. package/dist/client/assets/{Play-Yhg2bDxR.js → Play-BsRzOgzp.js} +1 -1
  28. package/dist/client/assets/{Plus-CgXuzVCT.js → Plus-9luEKPZw.js} +1 -1
  29. package/dist/client/assets/{SearchLg-CYNvKytJ.js → SearchLg-F6MPrrZo.js} +1 -1
  30. package/dist/client/assets/{SearchMd-BOeEZKFu.js → SearchMd-7UCVFr92.js} +1 -1
  31. package/dist/client/assets/{Settings02-CpRid7rG.js → Settings02-DWTUyGYI.js} +1 -1
  32. package/dist/client/assets/{Share07-B14EYmF_.js → Share07-BBwkuMmH.js} +1 -1
  33. package/dist/client/assets/{Shield01-DS1CkOm5.js → Shield01-DwaMx4Kj.js} +1 -1
  34. package/dist/client/assets/{Stars01-CPDNiFNQ.js → Stars01-gwxykcEQ.js} +1 -1
  35. package/dist/client/assets/{Stars02-CH68Qhm_.js → Stars02-B6JXDKru.js} +1 -1
  36. package/dist/client/assets/{Sun-CjcZKPaq.js → Sun-BJxBIAjy.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-DOmwqeXB.js → SwitchHorizontal01-CdQluNjW.js} +1 -1
  38. package/dist/client/assets/{Tool01-BLxK-7k7.js → Tool01-B3cfX7QW.js} +1 -1
  39. package/dist/client/assets/{Tool02-B8GwG_SX.js → Tool02-Dz1T3Rmg.js} +1 -1
  40. package/dist/client/assets/{Trash01-COMthlp3.js → Trash01-Dx-L9twD.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-Pa_0KlRB.js → TrendUp01-jt7vyfmI.js} +1 -1
  42. package/dist/client/assets/{Upload01-DO7DRGUd.js → Upload01-BxhthB2p.js} +1 -1
  43. package/dist/client/assets/{User01-C2rVZTl-.js → User01-CFSl83nB.js} +1 -1
  44. package/dist/client/assets/{Users01-ClsBMo4K.js → Users01-BijcXXI3.js} +1 -1
  45. package/dist/client/assets/{Users03-DP3zwt6-.js → Users03-D4EG206O.js} +1 -1
  46. package/dist/client/assets/{X-Bfx6rO6W.js → X-CSYXCnV9.js} +1 -1
  47. package/dist/client/assets/{XCircle-jlAhwcDu.js → XCircle-Cu0-8nUy.js} +1 -1
  48. package/dist/client/assets/{XClose-DdXn46Em.js → XClose-DSHM2tuZ.js} +1 -1
  49. package/dist/client/assets/{YAxis-C5lX8CaJ.js → YAxis-DaCLoj6F.js} +1 -1
  50. package/dist/client/assets/{Zap-li0rR-RI.js → Zap-BJ7aktKA.js} +1 -1
  51. package/dist/client/assets/{ZapSquare-Gxca0Ylc.js → ZapSquare-DsGT7WIC.js} +1 -1
  52. package/dist/client/assets/{access-gate-C8o_OE1N.js → access-gate-rP_MjwR7.js} +1 -1
  53. package/dist/client/assets/agent-icon-eH38g2HT.js +1 -0
  54. package/dist/client/assets/agents-list-DCLtFhhx.js +1 -0
  55. package/dist/client/assets/ai-providers-BVZMQNKu.js +1 -0
  56. package/dist/client/assets/{alert-1MxwzRCP.js → alert-BMVQGRt6.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-Cqq7FgQj.js → alert-dialog-CMLgUtLr.js} +1 -1
  58. package/dist/client/assets/{api-keys-BmVwKDo4.js → api-keys-KMpkqWx8.js} +1 -1
  59. package/dist/client/assets/app-editor-DePidg7R.js +1 -0
  60. package/dist/client/assets/{auth-tEJ4bybR.js → auth-C0RxM0MV.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-CYO83hyU.js → auth-catchall-DKTY___X.js} +1 -1
  62. package/dist/client/assets/{auth-entry-Dc1zlPtG.js → auth-entry-BpqowsP8.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-C945ZTK3.js → auth-split-layout-CjAUeNRJ.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-CqRX86RU.js → authenticate-and-persist-oauth-iw6ouFr9.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-BN46j3bE.js → automation-list-row-Bkk5b-Xu.js} +1 -1
  66. package/dist/client/assets/{automation-runs-nfuxnSim.js → automation-runs-7BxhYAN0.js} +16 -16
  67. package/dist/client/assets/automations-g01DiXGR.js +1 -0
  68. package/dist/client/assets/{avatar-BqAz0FLa.js → avatar-CzJUVoDs.js} +1 -1
  69. package/dist/client/assets/{badge-D24p8Xxi.js → badge-DbSQDjS0.js} +1 -1
  70. package/dist/client/assets/{billing-DSz5ucLf.js → billing-4Wr63XfR.js} +1 -1
  71. package/dist/client/assets/{block-document-ChYHEJUH.js → block-document-c_ItM0iq.js} +1 -1
  72. package/dist/client/assets/{buckets-DyBjeMFW.js → buckets-BEGiPCkc.js} +1 -1
  73. package/dist/client/assets/bulk-category-panel-DhM1EGbP.js +1 -0
  74. package/dist/client/assets/{capability-load-error-CPQoG_lp.js → capability-load-error-CRpB249h.js} +1 -1
  75. package/dist/client/assets/{card-CooN3E-v.js → card-FCEwqon6.js} +1 -1
  76. package/dist/client/assets/cards-CIZK-4zJ.js +9 -0
  77. package/dist/client/assets/category-editor-CVaNQqlc.js +1 -0
  78. package/dist/client/assets/{chart-Dtka3CXu.js → chart-BVs8Wshz.js} +1 -1
  79. package/dist/client/assets/{chat-context--S2eGI2t.js → chat-context-Qk-9IhfU.js} +1 -1
  80. package/dist/client/assets/{checkbox-BqtDvsR1.js → checkbox-Badqx0C2.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-B6EGxQbP.js → cli-auth-success-BBdGAncX.js} +1 -1
  82. package/dist/client/assets/collection-detail-C13FmfjI.js +1 -0
  83. package/dist/client/assets/{collection-display-button-B1OCDGvC.js → collection-display-button-DBcRwNMI.js} +1 -1
  84. package/dist/client/assets/{collection-search-H6c7ia6t.js → collection-search-DcQsyJxv.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-CksgkvG8.js → collection-table-wrapper-DKCmgLGf.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-BqnoVI6Y.js → collection-tabs-TNXMy8gA.js} +1 -1
  87. package/dist/client/assets/{command-DhvOaMnH.js → command-DWBbdLBX.js} +1 -1
  88. package/dist/client/assets/commerce-onboarding-4x4UgCdX.js +1 -0
  89. package/dist/client/assets/{connect-C-NmOGr7.js → connect-Dtqc1nsL.js} +1 -1
  90. package/dist/client/assets/{connection-DJ2785KU.js → connection-DyYsm8dV.js} +1 -1
  91. package/dist/client/assets/{connection-card-DSX5zHxO.js → connection-card-BsbMWXtq.js} +1 -1
  92. package/dist/client/assets/connection-detail-CusJoVJI.js +1 -0
  93. package/dist/client/assets/{connection-form-helpers-B07wLptq.js → connection-form-helpers-hjpjGHOP.js} +1 -1
  94. package/dist/client/assets/connections-C3g87Fyq.js +1 -0
  95. package/dist/client/assets/{decopilot-sse-pool-U92pbu07.js → decopilot-sse-pool-BNW6JWpR.js} +1 -1
  96. package/dist/client/assets/{dialog-C2XtKj4W.js → dialog-0fNUeR9R.js} +1 -1
  97. package/dist/client/assets/{domain-settings-D2fweBMx.js → domain-settings-B4x9P8HV.js} +1 -1
  98. package/dist/client/assets/{drawer-HtUPoolZ.js → drawer-HRJ32EbE.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-Buaqq-Fn.js → dropdown-menu-Gs5UGB4h.js} +1 -1
  100. package/dist/client/assets/{empty-state-Bd3g-2FH.js → empty-state-LcWMvkBG.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-V948FMyj.js → extract-connection-data-BYxfOuH_.js} +1 -1
  102. package/dist/client/assets/file-explorer-B7clljfW.js +2 -0
  103. package/dist/client/assets/{file-type-icon-BSAnhEu5.js → file-type-icon-CTX2jq9G.js} +1 -1
  104. package/dist/client/assets/{form-CMuk1nXb.js → form-DGhZtrNx.js} +1 -1
  105. package/dist/client/assets/general-B8n1QEr5.js +1 -0
  106. package/dist/client/assets/{github-repo-picker-DjVb6-0i.js → github-repo-picker-DOf_JZk2.js} +1 -1
  107. package/dist/client/assets/{hooks-Cd2G3711.js → hooks-Cj6NKwbB.js} +1 -1
  108. package/dist/client/assets/{index-Dwrgaiv3.js → index-2ZeZ7XA1.js} +1 -1
  109. package/dist/client/assets/{index-DNa-ZV66.js → index-Bqi-j8tu.js} +1 -1
  110. package/dist/client/assets/{index-BKOwC_zz.js → index-CElD4z4O.js} +1 -1
  111. package/dist/client/assets/{index-BflbKT0u.js → index-CiuQrzO7.js} +2 -2
  112. package/dist/client/assets/{index-BaWtU9eb.js → index-CnpdnndP.js} +58 -61
  113. package/dist/client/assets/{index-BoSySxnu.js → index-D87JktxF.js} +1 -1
  114. package/dist/client/assets/{index-CPCOiQxX.js → index-DZl62lg2.js} +1 -1
  115. package/dist/client/assets/{index-BRjr3L_N.js → index-DporvBqC.js} +1 -1
  116. package/dist/client/assets/{index-BphIXXOp.js → index-QSWmOkVC.js} +37 -37
  117. package/dist/client/assets/index-mmj8d1OZ.js +1 -0
  118. package/dist/client/assets/{index-redirect-CyqcxiJb.js → index-redirect-CLI7ZZ-t.js} +1 -1
  119. package/dist/client/assets/{infra-billing-B1fwJNOz.js → infra-billing-BEXhDVVj.js} +1 -1
  120. package/dist/client/assets/{input-9TNY2G6W.js → input-CjD4VhOq.js} +1 -1
  121. package/dist/client/assets/{integration-icon-CGwCrGIc.js → integration-icon-CPM2Wy4S.js} +1 -1
  122. package/dist/client/assets/{invite-member-dialog-BIJfPXUf.js → invite-member-dialog-uqixWqH7.js} +1 -1
  123. package/dist/client/assets/{label-DhJo3WjY.js → label-BM_KNax6.js} +1 -1
  124. package/dist/client/assets/{layout-CeWP0gEY.js → layout-Cyxx23a5.js} +1 -1
  125. package/dist/client/assets/{login-DxZTpOpk.js → login-DTcPenfD.js} +1 -1
  126. package/dist/client/assets/{mcp-oauth--A5K-xL8.js → mcp-oauth-CXtITOci.js} +1 -1
  127. package/dist/client/assets/{members-B5PzIuUU.js → members-BngJJI1k.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-BMLOnDLJ.js → monaco-editor-BhG2pRsy.js} +1 -1
  129. package/dist/client/assets/{monitoring-stats-row-Rpla78Nn.js → monitoring-stats-row-V0REizP2.js} +1 -1
  130. package/dist/client/assets/{multi-select-Duz2hJ29.js → multi-select-DVmJ8N16.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-Cn0wl-wL.js → oauth-callback-QWZ-1Ao_.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-ai-provider-CvoqVCiX.js → oauth-callback-ai-provider-DNiT_-tQ.js} +1 -1
  133. package/dist/client/assets/{onboarding-CTQgNbX8.js → onboarding-4kFhDwBC.js} +1 -1
  134. package/dist/client/assets/{org-layout-tUX-e_rZ.js → org-layout-D1UQZWSN.js} +1 -1
  135. package/dist/client/assets/{organization-choice-T8a5zIBy.js → organization-choice-CguXU_qj.js} +1 -1
  136. package/dist/client/assets/{orgs-CGkwFzZ6.js → orgs-C0r08Wz9.js} +1 -1
  137. package/dist/client/assets/{page-seo-form-C0yVvfZn.js → page-seo-form-BYQ_C966.js} +1 -1
  138. package/dist/client/assets/{popover-BV2Ziop4.js → popover-Cdk4wGDs.js} +1 -1
  139. package/dist/client/assets/post-editor-CBRsERKT.js +1 -0
  140. package/dist/client/assets/{primitives-QfIbZaez.js → primitives-oSbSlJdK.js} +1 -1
  141. package/dist/client/assets/{profile-Bp26cqE6.js → profile-DT6piyAB.js} +1 -1
  142. package/dist/client/assets/project-app-view-ODxcuXJo.js +1 -0
  143. package/dist/client/assets/record-editor-DVIXyY1q.js +1 -0
  144. package/dist/client/assets/redirect-editor-CXtmXnNZ.js +1 -0
  145. package/dist/client/assets/registry-C7n-7FhE.js +2 -0
  146. package/dist/client/assets/{registry-layout-DdRmZw6K.js → registry-layout-DoD0R5_E.js} +3 -3
  147. package/dist/client/assets/{reports-DMvf7MMo.js → reports-CxxatuXV.js} +1 -1
  148. package/dist/client/assets/{require-capability-ChdE_Nc5.js → require-capability-BujVC6Iv.js} +1 -1
  149. package/dist/client/assets/{required-auth-layout-DYO8_0ig.js → required-auth-layout-Bc5Jqmw0.js} +1 -1
  150. package/dist/client/assets/{reset-password-C661myht.js → reset-password-CRp5Vxzw.js} +1 -1
  151. package/dist/client/assets/roles-Bg6Wpwtz.js +1 -0
  152. package/dist/client/assets/{search-input-ChJAF9CO.js → search-input-DPH-j2ty.js} +1 -1
  153. package/dist/client/assets/{secrets-CwgPWaoJ.js → secrets-BS8SMJ5_.js} +1 -1
  154. package/dist/client/assets/{sections-editor-D8xoci4G.js → sections-editor-Cm60dl8s.js} +2 -2
  155. package/dist/client/assets/{select-COjQ5V-V.js → select-BY-TTUaX.js} +1 -1
  156. package/dist/client/assets/select-model-CKrLO7E8.js +4 -0
  157. package/dist/client/assets/{self-tool-result-DA97K7F2.js → self-tool-result-CQmRuOJJ.js} +1 -1
  158. package/dist/client/assets/seo-editor-qcHpiGxs.js +1 -0
  159. package/dist/client/assets/{settings-layout-C23Ga1Si.js → settings-layout-CkkEfluT.js} +1 -1
  160. package/dist/client/assets/{settings-section-BN0IrtYX.js → settings-section-KNTU5IvO.js} +1 -1
  161. package/dist/client/assets/{settings-subnav-DlbWpD1A.js → settings-subnav-Cd0l_6Ey.js} +1 -1
  162. package/dist/client/assets/{shell-controls-BBRNaPXa.js → shell-controls-yGJ3B9DE.js} +1 -1
  163. package/dist/client/assets/{shell-layout-DIvwZhUJ.js → shell-layout-BJ43I-fM.js} +1 -1
  164. package/dist/client/assets/{sidebar-Dckv7Gxe.js → sidebar-B9FCz4Mq.js} +1 -1
  165. package/dist/client/assets/{skeleton-C_J-aMdg.js → skeleton-B9r2TOyq.js} +1 -1
  166. package/dist/client/assets/{spinner-Cbrhyipt.js → spinner-DzAXz-ak.js} +1 -1
  167. package/dist/client/assets/{sso-DC7cMRPW.js → sso-CktB1aVG.js} +1 -1
  168. package/dist/client/assets/{store-rWTYBa0y.js → store-DVzGhYCb.js} +1 -1
  169. package/dist/client/assets/store-registry-BsmH8UbB.js +2 -0
  170. package/dist/client/assets/{studio-tools-BoD8kcA1.js → studio-tools-D6IcfTHF.js} +1 -1
  171. package/dist/client/assets/{switch-b-8BZDWJ.js → switch-B8JKQssM.js} +1 -1
  172. package/dist/client/assets/synced-repos-R0AkTDG5.js +1 -0
  173. package/dist/client/assets/tab-id-CPIceFUq.js +1 -0
  174. package/dist/client/assets/{table-CfpVPCrj.js → table-DjnLlp3Y.js} +1 -1
  175. package/dist/client/assets/{tabs-D-7lRbur.js → tabs-BVCZRpzY.js} +1 -1
  176. package/dist/client/assets/tasks-bT0G2AAJ.js +1 -0
  177. package/dist/client/assets/{textarea-CosQp1Ex.js → textarea-DUhzY-49.js} +1 -1
  178. package/dist/client/assets/{toggle-group-5LW11eFN.js → toggle-group-C2GRyClc.js} +1 -1
  179. package/dist/client/assets/{toolbar-Q0b8veSU.js → toolbar-CRquLcIr.js} +1 -1
  180. package/dist/client/assets/{tooltip-BfkRKScU.js → tooltip-C8WdZoAs.js} +1 -1
  181. package/dist/client/assets/{track-CG8KgfQd.js → track-DlQssvS7.js} +1 -1
  182. package/dist/client/assets/{types-BGHf5GHQ.js → types-CPa8SGGQ.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-BezO2qdd.js → use-ai-providers-hG0NJmyg.js} +1 -1
  184. package/dist/client/assets/{use-api-keys-BELfjQ6X.js → use-api-keys-D8jDupAP.js} +1 -1
  185. package/dist/client/assets/{use-automations-BB8THpxC.js → use-automations-B_w6lxQU.js} +1 -1
  186. package/dist/client/assets/{use-autosave-C7alUjY0.js → use-autosave-g4einljo.js} +1 -1
  187. package/dist/client/assets/{use-capability-mz-0XBoJ.js → use-capability-B23RInvZ.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-BlWbr6nY.js → use-clock-tick-BDuDvLsc.js} +1 -1
  189. package/dist/client/assets/{use-commerce-diagnostic-B54oYyoh.js → use-commerce-diagnostic-C2s_wvEf.js} +1 -1
  190. package/dist/client/assets/{use-connection-B5TzA1Ut.js → use-connection-Dg56f5Vt.js} +1 -1
  191. package/dist/client/assets/{use-copy-BEi_L0rW.js → use-copy-DGVAP1M7.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-BfQJXcoA.js → use-create-virtual-mcp-Cv6u_vQj.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-BHPvlnZn.js → use-debounced-autosave-CTkEMRHe.js} +1 -1
  194. package/dist/client/assets/{use-debounced-value-D880nDlC.js → use-debounced-value-qVTGK2NR.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-D7YXko6B.js → use-decopilot-events-_lZ6Xk3T.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-urOdWe-_.js → use-delete-connection-9Bgp-HfT.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-D_5KLYHI.js → use-deployment-admin-Dsr6f3P7.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-C4oqeXep.js → use-file-configs-BZ18LlNu.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-A-tTatQb.js → use-infinite-scroll-CWnPk8zt.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-Cvq2Nlxy.js → use-join-requests-Bo2pV8IS.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-DKcZ7v-W.js → use-mcp-client-BsAnTcHa.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-B4aUfPof.js → use-mcp-tools-kK8zHPYS.js} +1 -1
  203. package/dist/client/assets/{use-members-Dypq7HzL.js → use-members-B9vphmDn.js} +1 -1
  204. package/dist/client/assets/{use-mobile-C0XoguQx.js → use-mobile-D3ZpQ04i.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-Cxg9_mL_.js → use-navigate-to-agent-BhiQJGHm.js} +1 -1
  206. package/dist/client/assets/{use-open-billing-url-BwHZpmU9.js → use-open-billing-url-FgqegUnw.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-CEm0cNyU.js → use-org-auth-client-tPvCf1dF.js} +1 -1
  208. package/dist/client/assets/{use-org-repo-syncs-DCxfKVxi.js → use-org-repo-syncs-Dn3ug8I0.js} +1 -1
  209. package/dist/client/assets/{use-org-sso-8p_mXDai.js → use-org-sso-DdtLWeHC.js} +1 -1
  210. package/dist/client/assets/{use-organization-roles-EKX73RmE.js → use-organization-roles-BYyGmBMK.js} +1 -1
  211. package/dist/client/assets/{use-organization-settings-C62jhu_V.js → use-organization-settings-DbHsJaaW.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-C82adOhA.js → use-registry-connections-CI0z613-.js} +1 -1
  213. package/dist/client/assets/{use-secrets-CXv4Or8y.js → use-secrets-dYdxMugZ.js} +1 -1
  214. package/dist/client/assets/{use-section-preview-base-uursozx3.js → use-section-preview-base-B46aIuGF.js} +1 -1
  215. package/dist/client/assets/{use-settings-tabs-BO1uyGPC.js → use-settings-tabs-B_hY1mlT.js} +1 -1
  216. package/dist/client/assets/{use-status-sounds-Df1zE4-g.js → use-status-sounds-DnGWueq0.js} +1 -1
  217. package/dist/client/assets/{use-tags-DBhn0x6Q.js → use-tags-BIZOfShH.js} +1 -1
  218. package/dist/client/assets/{use-view-mode-B8mZlQkB.js → use-view-mode-DQUSR-GN.js} +1 -1
  219. package/dist/client/assets/{use-virtual-mcp-IokMTZJW.js → use-virtual-mcp-CJYABS2i.js} +1 -1
  220. package/dist/client/assets/useInfiniteQuery-3soE5ZtR.js +1 -0
  221. package/dist/client/assets/{useRouterState-BHrQRzTY.js → useRouterState-CFKKaLoi.js} +1 -1
  222. package/dist/client/assets/useSuspenseInfiniteQuery-Cean782d.js +1 -0
  223. package/dist/client/assets/{users-B6MzMck4.js → users-CAizcdlt.js} +1 -1
  224. package/dist/client/assets/variant-calendar-CpdX720c.js +1 -0
  225. package/dist/client/assets/{view-mode-toggle-waWn0PEd.js → view-mode-toggle-DMaq2N-u.js} +1 -1
  226. package/dist/client/index.html +1 -1
  227. package/dist/client/install.sh +443 -45
  228. package/dist/server/cli.js +1 -1
  229. package/dist/server/server.js +1 -1
  230. package/package.json +1 -1
  231. package/dist/client/assets/Globe01-DEX4B2yM.js +0 -1
  232. package/dist/client/assets/agent-icon-BnyLUh_P.js +0 -1
  233. package/dist/client/assets/agents-list-WqvM4PBU.js +0 -1
  234. package/dist/client/assets/ai-providers-Cm0Rm1KR.js +0 -1
  235. package/dist/client/assets/app-editor-BDtjnvii.js +0 -1
  236. package/dist/client/assets/automations-C9iJneF6.js +0 -1
  237. package/dist/client/assets/bulk-category-panel-tfM9zSbQ.js +0 -1
  238. package/dist/client/assets/cards-CxCBBMfu.js +0 -9
  239. package/dist/client/assets/category-editor-CIZoMWm2.js +0 -1
  240. package/dist/client/assets/collection-detail-DGbcByEY.js +0 -1
  241. package/dist/client/assets/commerce-onboarding-DO7FMttC.js +0 -1
  242. package/dist/client/assets/connection-detail-m014gzNI.js +0 -1
  243. package/dist/client/assets/connections-BNQ0Y0h7.js +0 -1
  244. package/dist/client/assets/file-explorer-DKHfXuC4.js +0 -2
  245. package/dist/client/assets/general-BTyXC0VC.js +0 -1
  246. package/dist/client/assets/index-Di0wCO9r.js +0 -1
  247. package/dist/client/assets/post-editor-DnamQd0I.js +0 -1
  248. package/dist/client/assets/project-app-view-C-J9cu-l.js +0 -1
  249. package/dist/client/assets/record-editor-CoztL6I2.js +0 -1
  250. package/dist/client/assets/redirect-editor-Bz1AUCqF.js +0 -1
  251. package/dist/client/assets/registry-DQjw_3WH.js +0 -2
  252. package/dist/client/assets/roles-CYg93TjU.js +0 -1
  253. package/dist/client/assets/select-model-B5IdH_n6.js +0 -4
  254. package/dist/client/assets/seo-editor-Do7jjKRP.js +0 -1
  255. package/dist/client/assets/store-registry-Dz8WBmEa.js +0 -2
  256. package/dist/client/assets/synced-repos-Cuzl6scP.js +0 -1
  257. package/dist/client/assets/tab-id-BJUTVZdl.js +0 -1
  258. package/dist/client/assets/tasks-EwwXPqCM.js +0 -1
  259. package/dist/client/assets/useInfiniteQuery-ewuCizNF.js +0 -1
  260. package/dist/client/assets/useSuspenseInfiniteQuery-BvX-6eAF.js +0 -1
  261. package/dist/client/assets/variant-calendar-DrArrrSO.js +0 -1
@@ -1 +0,0 @@
1
- import{c as ge,b as me,j as o,v as Ae,t as le,B as ne,F as De,o as Ie,a as Le,r as X,n as Te,K as de,e as Ee,p as V,G as Fe,m as ke}from"./index-BphIXXOp.js";import{a as re,b as ye,D as ue,c as pe}from"./dropdown-menu-Buaqq-Fn.js";import{a as Ge}from"./Users03-DP3zwt6-.js";import{G as we,b as Me,a as Pe}from"./github-repo-picker-DjVb6-0i.js";import{u as Oe,b as ze,c as Be}from"./use-virtual-mcp-IokMTZJW.js";import{P as ce}from"./index-BKOwC_zz.js";import{a as Ue}from"./DotsVertical-Bohq38Q1.js";import{A as Re,g as fe,b3 as $e}from"./agent-icon-BnyLUh_P.js";import{a as He}from"./Settings02-CpRid7rG.js";import{s as Ve}from"./Trash01-COMthlp3.js";import{p as Ke,f as he}from"./pt-BR-CLy76QW2.js";import{c as Se}from"./use-navigate-to-agent-Cxg9_mL_.js";import{f as qe,i as Qe}from"./use-organization-settings-C62jhu_V.js";import{u as _e}from"./use-capability-mz-0XBoJ.js";import{C as Je}from"./card-CooN3E-v.js";import{E as Ye}from"./empty-state-Bd3g-2FH.js";import{u as We}from"./use-create-virtual-mcp-BfQJXcoA.js";import{u as Xe}from"./use-connection-B5TzA1Ut.js";import{u as xe,S as Ze}from"./use-mcp-client-DKcZ7v-W.js";import{p as et,a as je}from"./deco-site-production-url-BjY4ZYd-.js";import{g as tt,f as ot,b as st,G as it,p as nt}from"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import{e as rt,d as lt,a as at,b as ct,c as mt}from"./dialog-C2XtKj4W.js";import{i as dt}from"./ArrowLeft-CwsJ1Sfc.js";import{C as ut}from"./collection-search-H6c7ia6t.js";import{c as pt,d as gt,b as ft,f as ht,g as xt,e as jt,a as Ct,A as bt}from"./alert-dialog-Cqq7FgQj.js";import{S as Dt}from"./search-input-ChJAF9CO.js";import{s as Ce}from"./Plus-CgXuzVCT.js";import"./Check-BdzjeMXF.js";import"./ChevronRight-wqbYwiLF.js";import"./use-debounced-value-D880nDlC.js";import"./authenticate-and-persist-oauth-CqRX86RU.js";import"./mcp-oauth--A5K-xL8.js";import"./auth-tEJ4bybR.js";import"./LinkExternal01-Do6tmctI.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./use-mcp-tools-B4aUfPof.js";import"./extract-connection-data-V948FMyj.js";import"./metadata-dUsYcpuu.js";import"./sidebar-Dckv7Gxe.js";import"./LayoutLeft-DZwVeKk1.js";import"./use-mobile-C0XoguQx.js";import"./X-Bfx6rO6W.js";import"./tooltip-BfkRKScU.js";import"./AlertCircle-CeleFBrs.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./Tool02-B8GwG_SX.js";import"./XCircle-jlAhwcDu.js";import"./ArrowUpRight-C0hTvHTE.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./CheckCircle-D-nlOrXB.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronUp-IHCmvX3E.js";import"./Stars02-CH68Qhm_.js";import"./Copy01-DIJvVGQk.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./Key01-CRQOB5O_.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./Play-Yhg2bDxR.js";import"./SearchLg-CYNvKytJ.js";import"./SearchMd-BOeEZKFu.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./Zap-li0rR-RI.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./hooks-Cd2G3711.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./studio-tools-BoD8kcA1.js";function be(t){const e=ge.c(28),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:r,isCreating:f,align:c,side:G,showBetaBadge:x}=t,M=c===void 0?"end":c,d=me();let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(Ge,{size:14}),e[0]=T):T=e[0];let m;e[1]!==d?(m=d("common.createAgentDropdown.createFromScratch"),e[1]=d,e[2]=m):m=e[2];let D;e[3]!==f||e[4]!==i||e[5]!==m?(D=o.jsxs(re,{disabled:f,onClick:i,children:[T,m]}),e[3]=f,e[4]=i,e[5]=m,e[6]=D):D=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(we,{className:"size-3.5"}),e[7]=j):j=e[7];let y;e[8]!==d?(y=d("common.createAgentDropdown.importFromGitHub"),e[8]=d,e[9]=y):y=e[9];let a;e[10]!==x?(a=x&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=x,e[11]=a):a=e[11];let l;e[12]!==n||e[13]!==y||e[14]!==a?(l=o.jsxs(re,{onClick:n,children:[j,y,a]}),e[12]=n,e[13]=y,e[14]=a,e[15]=l):l=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[16]=h):h=e[16];let C;e[17]!==d?(C=d("common.createAgentDropdown.importFromDeco"),e[17]=d,e[18]=C):C=e[18];let w;e[19]!==r||e[20]!==C?(w=o.jsxs(re,{onClick:r,children:[h,C]}),e[19]=r,e[20]=C,e[21]=w):w=e[21];let u;return e[22]!==M||e[23]!==G||e[24]!==w||e[25]!==D||e[26]!==l?(u=o.jsxs(ye,{side:G,align:M,className:"w-48",children:[D,l,w]}),e[22]=M,e[23]=G,e[24]=w,e[25]=D,e[26]=l,e[27]=u):u=e[27],u}function yt(t){const e=ge.c(65),{project:i,lastUsedAt:n,onDeleteClick:r}=t,f=Se(),c=me(),[G]=Ae(),x=G.language==="pt-BR"?Ke:void 0,{mainAgentId:M}=qe(),d=Qe(),{granted:T}=_e("org:manage"),m=M===i.id;let D;e[0]!==m||e[1]!==i.id||e[2]!==i.title||e[3]!==d||e[4]!==c?(D=()=>{const I=m?null:i.id;d.mutate(I,{onSuccess:()=>le.success(m?c("home.projectCard.mainAgentUnset",{title:i.title}):c("home.projectCard.mainAgentSet",{title:i.title})),onError:()=>le.error(c("home.projectCard.mainAgentError"))})},e[0]=m,e[1]=i.id,e[2]=i.title,e[3]=d,e[4]=c,e[5]=D):D=e[5];const j=D;let y;e[6]!==f||e[7]!==i.id?(y=()=>f(i.id),e[6]=f,e[7]=i.id,e[8]=y):y=e[8];let a;e[9]!==i.title||e[10]!==y?(a=o.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[9]=i.title,e[10]=y,e[11]=a):a=e[11];let l;e[12]!==i.icon||e[13]!==i.title?(l=o.jsx(Re,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[12]=i.icon,e[13]=i.title,e[14]=l):l=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ue,{asChild:!0,children:o.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Ue,{size:20})})}),e[15]=h):h=e[15];let C;e[16]!==f||e[17]!==i.id?(C=()=>f(i.id,{search:{main:"settings"}}),e[16]=f,e[17]=i.id,e[18]=C):C=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(He,{size:16}),e[19]=w):w=e[19];let u;e[20]!==C?(u=o.jsxs(re,{onClick:C,children:[w,"Settings"]}),e[20]=C,e[21]=u):u=e[21];let O;e[22]!==T||e[23]!==m||e[24]!==c||e[25]!==j?(O=T&&o.jsxs(re,{onClick:I=>{I.stopPropagation(),j()},children:[o.jsx(fe,{size:16}),c(m?"home.projectCard.unsetMainAgent":"home.projectCard.setAsMainAgent")]}),e[22]=T,e[23]=m,e[24]=c,e[25]=j,e[26]=O):O=e[26];let E;e[27]!==r?(E=r&&o.jsxs(re,{variant:"destructive",onClick:I=>{I.stopPropagation(),r(I)},children:[o.jsx(Ve,{size:16}),"Delete"]}),e[27]=r,e[28]=E):E=e[28];let z;e[29]!==E||e[30]!==u||e[31]!==O?(z=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(pe,{children:[h,o.jsxs(ye,{align:"end",children:[u,O,E]})]})}),e[29]=E,e[30]=u,e[31]=O,e[32]=z):z=e[32];let S;e[33]!==z||e[34]!==l?(S=o.jsxs("div",{className:"flex items-start justify-between",children:[l,z]}),e[33]=z,e[34]=l,e[35]=S):S=e[35];let v;e[36]!==i.title?(v=o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[36]=i.title,e[37]=v):v=e[37];let N;e[38]!==m||e[39]!==c?(N=m&&o.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:[o.jsx(fe,{size:12}),c("home.projectCard.mainAgentBadge")]}),e[38]=m,e[39]=c,e[40]=N):N=e[40];let P;e[41]!==v||e[42]!==N?(P=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,N]}),e[41]=v,e[42]=N,e[43]=P):P=e[43];const F=i.description||"No description";let s;e[44]!==F?(s=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:F}),e[44]=F,e[45]=s):s=e[45];let p;e[46]!==P||e[47]!==s?(p=o.jsxs("div",{className:"flex flex-col gap-1",children:[P,s]}),e[46]=P,e[47]=s,e[48]=p):p=e[48];let g;e[49]!==S||e[50]!==p?(g=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[S,p]}),e[49]=S,e[50]=p,e[51]=g):g=e[51];let b;e[52]!==n||e[53]!==x||e[54]!==i.updated_at||e[55]!==c?(b=n?c("home.projectCard.lastUsed",{time:he(new Date(n),{addSuffix:!0,locale:x})}):c("home.projectCard.updated",{time:he(new Date(i.updated_at),{addSuffix:!0,locale:x})}),e[52]=n,e[53]=x,e[54]=i.updated_at,e[55]=c,e[56]=b):b=e[56];let _;e[57]!==b?(_=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),e[57]=b,e[58]=_):_=e[58];let A;e[59]!==g||e[60]!==_?(A=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[g,_]}),e[59]=g,e[60]=_,e[61]=A):A=e[61];let k;return e[62]!==A||e[63]!==a?(k=o.jsxs(Je,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[a,A]}),e[62]=A,e[63]=a,e[64]=k):k=e[64],k}const wt="deco-sites";function St(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function _t(t,e){const i=e?St(e):null,n=i?.owner??wt,r=i?.repo??t;return{owner:n,name:r,url:`https://github.com/${n}/${r}`}}function vt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function ve(t,e,i){const n=await fetch(t,e),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`${i} (${n.status})`);return r}function Nt(t){return ve(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function At({open:t,onOpenChange:e,onBack:i}){const n=me(),{org:r}=De(),f=Se(),c=Ie(),{data:G}=Le.useSession(),[x,M]=X.useState(null),[d,T]=X.useState(null),[m,D]=X.useState(""),j=xe({connectionId:Ze,orgId:r.id,orgSlug:r.slug}),y=Xe({slug:"mcp-github"}),a=tt(y),l=Me({enabled:t&&a.length===0}),h=a.length===1?a[0]??null:d,C=a.length>1&&!h,w=xe({connectionId:h?.id??"",orgId:r.id,orgSlug:r.slug}),u=t&&a.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:O,isLoading:E,error:z}=Te({queryKey:de.decoSites(G?.user?.email),queryFn:()=>Nt(r.slug),enabled:t&&!!G?.user?.email,staleTime:6e4,retry:!1}),S=O?.sites??[],v=s=>{s||(M(null),T(null),D("")),e(s)},N=S.filter(s=>s.name.toLowerCase().includes(m.toLowerCase())||(s.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),P=!x||N.some(s=>s.name===x),F=Ee({mutationFn:async s=>{if(!h)throw new Error(n("common.importFromDecoDialog.githubNotConnected"));V("deco_site_import_started",{site_name:s});const{installations:p}=await ot(B=>j.callTool(B),h.id),g=S.find(B=>B.name===s);if(!g)throw new Error(n("common.importFromDecoDialog.siteNoLongerAvailable"));const b=_t(s,g.metadata),_=st(p,b.owner);if(!_)throw new Error(n("common.importFromDecoDialog.installGithubApp",{owner:b.owner,installUrl:it}));let A=null,k=null,I=null;const J=async()=>{I&&await j.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:I}}).catch(()=>{}),k&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:k,force:!0}}).catch(()=>{}),A&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{})};try{const B=await ve(`/api/${r.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:s})},n("common.importFromDecoDialog.failedToCreateConnection")),R=B.connId;if(!R)throw new Error(n("common.importFromDecoDialog.noConnectionId"));A=R;const{childConnectionId:$,reused:Y}=await nt({orgSlug:r.slug,sourceConnection:h,installationId:_.installationId,owner:b.owner,repo:b.name,githubCallTool:H=>w.callTool(H),selfCallTool:H=>j.callTool(H)});k=Y?null:$;const K=B.icon??null,Z=vt(s),W=s.toLowerCase(),q=et(je(g.domains)),Q=await j.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s,description:"Imported from deco.cx",pinned:!1,icon:K??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:W,previewServerUrl:q,productionUrl:q,githubRepo:{owner:b.owner,name:b.name,url:b.url,installationId:_.installationId,connectionId:$},ui:{banner:null,bannerColor:"#22C55E",icon:K,themeColor:"#22C55E",slug:Z,pinnedViews:[{connectionId:R,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:R},{connection_id:$}]}}}),U=Q.structuredContent??Q;if(!U.item?.id)throw new Error(n("common.importFromDecoDialog.failedToCreateAgent"));return I=U.item.id,{slug:Z,virtualMcpId:U.item.id,connId:R,item:U.item}}catch(B){throw await J(),B}},onSuccess:({slug:s,virtualMcpId:p,item:g})=>{V("deco_site_import_succeeded",{site_name:g.title,virtual_mcp_id:p,slug:s}),c.setQueryData(de.collectionItem(j,r.id,"","VIRTUAL_MCP",p),{item:g}),c.invalidateQueries({predicate:b=>{const _=b.queryKey;return _[1]===r.id&&_[3]==="collection"&&_[4]==="VIRTUAL_MCP"}}),c.invalidateQueries({queryKey:de.projects(r.id)}),le.success(n("common.importFromDecoDialog.importSuccess",{slug:s})),v(!1),localStorage.setItem(Fe.sidebarOpen(),JSON.stringify(!1)),f(p)},onError:s=>{V("deco_site_import_failed",{error:s instanceof Error?s.message:"Unknown error"}),le.error(n("common.importFromDecoDialog.importFailed",{error:(s instanceof Error?s.message:n("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(rt,{open:t,onOpenChange:v,children:o.jsxs(lt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(at,{className:"sr-only",children:o.jsx(ct,{children:n("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&o.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":n("common.importFromDecoDialog.goBack"),children:o.jsx(dt,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:n("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(ut,{value:m,onChange:D,placeholder:n("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:s=>{s.key==="Escape"&&D("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??n("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(ne,{variant:"outline",size:"sm",onClick:l.retry,children:n("common.importFromDecoDialog.retryGithubSetup")})]}),u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.settingUpGithub")}),C&&!u&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n("common.importFromDecoDialog.selectGithubConnection")})}),a.map(s=>o.jsxs("button",{type:"button",onClick:()=>T(s),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(we,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}),E&&!u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.loadingSites")}),!E&&!u&&!C&&l.status!=="error"&&!z&&S.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.noSitesFound")}),!E&&!u&&!C&&l.status!=="error"&&S.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[N.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:n("common.importFromDecoDialog.noSitesMatch",{search:m})}),N.map(s=>{const p=je(s.domains),g=x===s.name;return o.jsxs("button",{type:"button",onClick:()=>M(s.name),className:ke("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",g?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:s.thumb_url?o.jsx("img",{src:s.thumb_url,alt:s.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.name}),p&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p})]})]},s.name)})]})]}),o.jsxs(mt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(ne,{variant:"outline",onClick:()=>v(!1),disabled:F.isPending,children:n("common.importFromDecoDialog.cancel")}),o.jsx(ne,{disabled:!x||!P||F.isPending||E||u||C||!h||l.status==="error",onClick:()=>x&&F.mutate(x),children:F.isPending?n("common.importFromDecoDialog.importing"):n("common.importFromDecoDialog.import")})]})]})})}function cs(){const t=ge.c(77),e=me(),{org:i}=De(),n=Oe(),r=ze(),[f,c]=X.useState("");let G;t[0]===Symbol.for("react.memo_cache_sentinel")?(G={navigateOnCreate:!0},t[0]=G):G=t[0];const{createVirtualMCP:x,isCreating:M}=We(G),[d,T]=X.useState(null),[m,D]=X.useState(!1),[j,y]=X.useState(!1),{granted:a}=_e("agents:manage"),l=f.toLowerCase(),h=n.filter(L=>L.id!==i.id&&(L.title.toLowerCase().includes(l)||L.description?.toLowerCase().includes(l))),{data:C}=Be(h.map(It));let w;t[1]!==r||t[2]!==d||t[3]!==e?(w=async()=>{if(!d)return;const{id:L,title:Ne}=d;T(null);try{await r.delete.mutateAsync(L),V("agent_deleted",{agent_id:L,source:"agents_list"}),le.success(e("routes.agentsList.deletedAgent",{title:Ne}))}catch{}},t[1]=r,t[2]=d,t[3]=e,t[4]=w):w=t[4];const u=w,O=ce,E=ce,z=ce;let S;t[5]!==e?(S=e("routes.agentsList.title"),t[5]=e,t[6]=S):S=t[6];let v;t[7]!==S?(v=o.jsx(ce.Title,{children:S}),t[7]=S,t[8]=v):v=t[8];let N;t[9]!==e?(N=e("routes.agentsList.searchPlaceholder"),t[9]=e,t[10]=N):N=t[10];let P;t[11]===Symbol.for("react.memo_cache_sentinel")?(P=L=>{L.key==="Escape"&&(c(""),L.target.blur())},t[11]=P):P=t[11];let F;t[12]!==f||t[13]!==N?(F=o.jsx(Dt,{value:f,onChange:c,placeholder:N,className:"w-full md:w-[375px]",onKeyDown:P}),t[12]=f,t[13]=N,t[14]=F):F=t[14];let s;t[15]!==a||t[16]!==x||t[17]!==M||t[18]!==e?(s=a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ne,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list",method:"deco"}),D(!0)},isCreating:M,align:"end"})]}),t[15]=a,t[16]=x,t[17]=M,t[18]=e,t[19]=s):s=t[19];let p;t[20]!==F||t[21]!==s?(p=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[F,s]}),t[20]=F,t[21]=s,t[22]=p):p=t[22];let g;t[23]!==p||t[24]!==v?(g=o.jsxs("div",{className:"flex flex-col gap-6",children:[v,p]}),t[23]=p,t[24]=v,t[25]=g):g=t[25];const b=h.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(Ye,{image:o.jsx($e,{size:48,className:"text-muted-foreground"}),title:e(f?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:f?e("routes.agentsList.noAgentsMatchSearch",{search:f}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!f&&a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ne,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),D(!0)},isCreating:M,align:"center",showBetaBadge:!0})]})})}),_=h.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:h.map(L=>o.jsx(yt,{project:L,lastUsedAt:C?.get(L.id)?.last_used_at,onDeleteClick:a?()=>T({id:L.id,title:L.title}):void 0},L.id))})]});let A;t[26]!==g||t[27]!==b||t[28]!==_||t[29]!==z.Body?(A=o.jsxs(z.Body,{children:[g,b,_]}),t[26]=g,t[27]=b,t[28]=_,t[29]=z.Body,t[30]=A):A=t[30];let k;t[31]!==A||t[32]!==E.Content?(k=o.jsx(E.Content,{children:A}),t[31]=A,t[32]=E.Content,t[33]=k):k=t[33];let I;t[34]!==j?(I=o.jsx(Pe,{open:j,onOpenChange:y}),t[34]=j,t[35]=I):I=t[35];let J;t[36]!==m?(J=o.jsx(At,{open:m,onOpenChange:D}),t[36]=m,t[37]=J):J=t[37];const B=!!d;let R;t[38]===Symbol.for("react.memo_cache_sentinel")?(R=L=>!L&&T(null),t[38]=R):R=t[38];let $;t[39]!==e?($=e("routes.agentsList.deleteAgentTitle"),t[39]=e,t[40]=$):$=t[40];let Y;t[41]!==$?(Y=o.jsx(pt,{children:$}),t[41]=$,t[42]=Y):Y=t[42];let K;t[43]!==e?(K=e("routes.agentsList.deleteAgentDescription"),t[43]=e,t[44]=K):K=t[44];const Z=d?.title;let W;t[45]!==Z?(W=o.jsx("span",{className:"font-medium text-foreground",children:Z}),t[45]=Z,t[46]=W):W=t[46];let q;t[47]!==K||t[48]!==W?(q=o.jsxs(gt,{children:[K," ",W,"."]}),t[47]=K,t[48]=W,t[49]=q):q=t[49];let Q;t[50]!==Y||t[51]!==q?(Q=o.jsxs(ft,{children:[Y,q]}),t[50]=Y,t[51]=q,t[52]=Q):Q=t[52];let U;t[53]!==e?(U=e("routes.agentsList.cancelButton"),t[53]=e,t[54]=U):U=t[54];let H;t[55]!==U?(H=o.jsx(ht,{children:U}),t[55]=U,t[56]=H):H=t[56];let ee;t[57]!==e?(ee=e("routes.agentsList.deleteButton"),t[57]=e,t[58]=ee):ee=t[58];let te;t[59]!==u||t[60]!==ee?(te=o.jsx(xt,{onClick:u,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:ee}),t[59]=u,t[60]=ee,t[61]=te):te=t[61];let oe;t[62]!==H||t[63]!==te?(oe=o.jsxs(jt,{children:[H,te]}),t[62]=H,t[63]=te,t[64]=oe):oe=t[64];let se;t[65]!==Q||t[66]!==oe?(se=o.jsxs(Ct,{children:[Q,oe]}),t[65]=Q,t[66]=oe,t[67]=se):se=t[67];let ie;t[68]!==B||t[69]!==se?(ie=o.jsx(bt,{open:B,onOpenChange:R,children:se}),t[68]=B,t[69]=se,t[70]=ie):ie=t[70];let ae;return t[71]!==O||t[72]!==k||t[73]!==I||t[74]!==J||t[75]!==ie?(ae=o.jsxs(O,{children:[k,I,J,ie]}),t[71]=O,t[72]=k,t[73]=I,t[74]=J,t[75]=ie,t[76]=ae):ae=t[76],ae}function It(t){return t.id}export{cs as default};
@@ -1 +0,0 @@
1
- import{c as J,b as se,a0 as Fe,$ as $e,r as G,j as s,a3 as tt,t as X,at as Ue,F as be,o as je,e as le,K as te,n as ke,m as Ee,B as ee,v as He,p as Re,X as st,Z as Pe,E as it}from"./index-BphIXXOp.js";import{i as lt}from"./AlertCircle-CeleFBrs.js";import{P as Ie}from"./index-BKOwC_zz.js";import{S as Ke}from"./skeleton-C_J-aMdg.js";import{b as qe,a as De,S as we,c as rt}from"./settings-section-BN0IrtYX.js";import{S as ot}from"./settings-subnav-DlbWpD1A.js";import{u as Be,b as _e,i as nt,c as at,p as ct,d as Ae,e as dt,f as ze}from"./use-ai-providers-BezO2qdd.js";import{i as mt}from"./CheckCircle-D-nlOrXB.js";import{c as ut,S as ft,k as pt}from"./use-organization-settings-C62jhu_V.js";import{c as gt,d as Ve,P as xt,C as Me}from"./select-model-B5IdH_n6.js";import{u as ht}from"./use-debounced-autosave-BHPvlnZn.js";import{I as ye}from"./input-9TNY2G6W.js";import{a as Te,T as vt}from"./toggle-group-5LW11eFN.js";import{c as Le,d as Qe,b as Ge,f as Ye,g as We,e as Je,a as Xe,A as Ze}from"./alert-dialog-Cqq7FgQj.js";import{u as re}from"./studio-tools-BoD8kcA1.js";import{s as yt}from"./Plus-CgXuzVCT.js";import{p as bt,f as jt}from"./pt-BR-CLy76QW2.js";import{c as St}from"./Tool01-BLxK-7k7.js";import{s as Ct}from"./Trash01-COMthlp3.js";import{A as _t}from"./avatar-BqAz0FLa.js";import{P as Nt}from"./ai-providers-logos-DD3qZ33J.js";import{i as Pt}from"./Settings02-CpRid7rG.js";import{s as It}from"./Eye-C5vDWwaK.js";import{b as kt,a as Kt,d as Dt,e as wt,c as At}from"./dialog-C2XtKj4W.js";import{S as Et}from"./spinner-Cbrhyipt.js";import{R as Rt}from"./require-capability-ChdE_Nc5.js";import"./sidebar-Dckv7Gxe.js";import"./LayoutLeft-DZwVeKk1.js";import"./use-mobile-C0XoguQx.js";import"./X-Bfx6rO6W.js";import"./tooltip-BfkRKScU.js";import"./card-CooN3E-v.js";import"./ArrowUpRight-C0hTvHTE.js";import"./useRouterState-BHrQRzTY.js";import"./use-settings-tabs-BO1uyGPC.js";import"./use-capability-mz-0XBoJ.js";import"./use-mcp-client-DKcZ7v-W.js";import"./auth-tEJ4bybR.js";import"./drawer-HtUPoolZ.js";import"./chat-context--S2eGI2t.js";import"./tab-id-BJUTVZdl.js";import"./Check-BdzjeMXF.js";import"./Copy01-DIJvVGQk.js";import"./hooks-Cd2G3711.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-IokMTZJW.js";import"./use-decopilot-events-D7YXko6B.js";import"./checkbox-BqtDvsR1.js";import"./select-COjQ5V-V.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronUp-IHCmvX3E.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./Key01-CRQOB5O_.js";import"./SearchMd-BOeEZKFu.js";import"./Monitor01-BKGGKBRj.js";import"./ChevronRight-wqbYwiLF.js";import"./Stars01-CPDNiFNQ.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-C2rVZTl-.js";import"./access-gate-C8o_OE1N.js";import"./capability-load-error-CPQoG_lp.js";const Mt=e=>e.capabilities?.includes("image")===!0,Tt=e=>nt(e),Ot=e=>at(e),Ft=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:Mt},{key:"web_search",filter:Tt},{key:"deep_research",filter:Ot}];function $t(e){const t=J.c(30),{slot:i,onSlotChange:o,filterModels:n,defaultKeyId:c}=e,a=Be(),l=a.some(C=>C.id===i?.keyId)?i?.keyId:null,[u,_]=G.useState(l??c);let b,r;t[0]!==l?(b=()=>{l&&_(l)},r=[l],t[0]=l,t[1]=b,t[2]=r):(b=t[1],r=t[2]),G.useEffect(b,r);let p;t[3]!==a||t[4]!==c||t[5]!==u?(p=a.some(C=>C.id===u)?u:c,t[3]=a,t[4]=c,t[5]=u,t[6]=p):p=t[6];const m=p;let f;t[7]!==m||t[8]!==a?(f=m?a.find(C=>C.id===m):null,t[7]=m,t[8]=a,t[9]=f):f=t[9];const P=f,{models:h,isLoading:v}=_e(n?m??void 0:void 0),g=n?v||h.some(n):!0;let N;t[10]!==i||t[11]!==P?.providerId||t[12]!==l?(N=i&&l?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:P?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[10]=i,t[11]=P?.providerId,t[12]=l,t[13]=N):N=t[13];const k=N,x=se();if(n&&!g){let C;t[14]!==x?(C=x("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[14]=x,t[15]=C):C=t[15];let K;return t[16]!==C?(K=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:C}),t[16]=C,t[17]=K):K=t[17],K}let j;t[18]!==x?(j=x("settings.simpleModeSection.pickModel"),t[18]=x,t[19]=j):j=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=C=>_(C),t[20]=S):S=t[20];let d;t[21]!==m||t[22]!==o?(d=C=>{const K=C.keyId??m??"";_(K),o({keyId:K,modelId:C.modelId,title:C.title})},t[21]=m,t[22]=o,t[23]=d):d=t[23];let y;return t[24]!==m||t[25]!==n||t[26]!==k||t[27]!==j||t[28]!==d?(y=s.jsx(gt,{variant:"bordered",placeholder:j,model:k,credentialId:m,filterModels:n,onCredentialChange:S,onModelChange:d}),t[24]=m,t[25]=n,t[26]=k,t[27]=j,t[28]=d,t[29]=y):y=t[29],y}function Ut(e){const t=J.c(10),{isPending:i,showSaved:o}=e,n=se();if(i){let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ue,{size:12,className:"animate-spin"}),t[0]=c):c=t[0];let a;t[1]!==n?(a=n("settings.simpleModeSection.saving"),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==a?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[c,a]}),t[3]=a,t[4]=l):l=t[4],l}if(o){let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(mt,{size:12}),t[5]=c):c=t[5];let a;t[6]!==n?(a=n("settings.simpleModeSection.saved"),t[6]=n,t[7]=a):a=t[7];let l;return t[8]!==a?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[c,a]}),t[8]=a,t[9]=l):l=t[9],l}return null}function Ht(){const e=J.c(58),t=se(),i=Be(),o=ut(),n=i.length>0;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Fe(ft),e[0]=c):c=e[0];let a;e[1]!==o?(a={resolver:c,values:o,mode:"onChange"},e[1]=o,e[2]=a):a=e[2];const l=$e(a),{mutate:u,isPending:_,isSuccess:b}=pt(),r=l.formState.isDirty;let p;e[3]!==l||e[4]!==o||e[5]!==t||e[6]!==u?(p={delayMs:250,save:async()=>{const I=l.getValues();u(I,{onSuccess:()=>l.reset(I,{keepValues:!0}),onError:T=>{l.reset(o),X.error(t("settings.simpleModeSection.failedToSave",{error:T.message}))}})}},e[3]=l,e[4]=o,e[5]=t,e[6]=u,e[7]=p):p=e[7];const{schedule:m}=ht(p),f=i[0],P=i[1],h=i[2],{models:v}=_e(f?.id),{models:g}=_e(P?.id),{models:N}=_e(h?.id);let k,x;e[8]!==l||e[9]!==n?(k=()=>{n||l.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},x=[n,l],e[8]=l,e[9]=n,e[10]=k,e[11]=x):(k=e[10],x=e[11]),G.useEffect(k,x);let j;e[12]!==i||e[13]!==l||e[14]!==f||e[15]!==P||e[16]!==h||e[17]!==v||e[18]!==g||e[19]!==N?(j=()=>{const I=l.getValues(),T=new Set(i.map(qt)),O={};f?.id&&(O[f.id]=v),P?.id&&(O[P.id]=g),h?.id&&(O[h.id]=N);const M=Q=>Q!=null&&!T.has(Q.keyId),D={fast:M(I.tiers.fast)?null:I.tiers.fast,smart:M(I.tiers.smart)?null:I.tiers.smart,thinking:M(I.tiers.thinking)?null:I.tiers.thinking,image:M(I.tiers.image)?null:I.tiers.image,web_search:M(I.tiers.web_search)?null:I.tiers.web_search,deep_research:M(I.tiers.deep_research)?null:I.tiers.deep_research},Y=!D.fast||!D.smart||!D.thinking||!D.image||!D.web_search||!D.deep_research,W=D.fast===I.tiers.fast&&D.smart===I.tiers.smart&&D.thinking===I.tiers.thinking&&D.image===I.tiers.image&&D.web_search===I.tiers.web_search&&D.deep_research===I.tiers.deep_research;if(!Y&&W)return;const B=ct(i,O);l.reset({tiers:{fast:D.fast??B.chat.fast,smart:D.smart??B.chat.smart,thinking:D.thinking??B.chat.thinking,image:D.image??B.image,web_search:D.web_search??B.webSearch,deep_research:D.deep_research??B.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=l,e[14]=f,e[15]=P,e[16]=h,e[17]=v,e[18]=g,e[19]=N,e[20]=j):j=e[20];const S=f?.id,d=P?.id,y=h?.id;let C;e[21]!==i||e[22]!==l||e[23]!==v||e[24]!==g||e[25]!==N||e[26]!==S||e[27]!==d||e[28]!==y?(C=[l,i,v,g,N,S,d,y],e[21]=i,e[22]=l,e[23]=v,e[24]=g,e[25]=N,e[26]=S,e[27]=d,e[28]=y,e[29]=C):C=e[29],G.useEffect(j,C);let K;e[30]!==t?(K=I=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[I]||I,e[30]=t,e[31]=K):K=e[31];const A=K;let w;e[32]!==t?(w=I=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[I]||"",e[32]=t,e[33]=w):w=e[33];const E=w;let R;e[34]!==t?(R=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=R):R=e[35];let F;e[36]!==t?(F=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=F):F=e[37];let z;e[38]!==F?(z=s.jsx("p",{className:"text-sm text-muted-foreground",children:F}),e[38]=F,e[39]=z):z=e[39];const L=b&&!r;let $;e[40]!==_||e[41]!==L?($=s.jsx(Ut,{isPending:_,showSaved:L}),e[40]=_,e[41]=L,e[42]=$):$=e[42];let U;e[43]!==z||e[44]!==$?(U=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[z,$]}),e[43]=z,e[44]=$,e[45]=U):U=e[45];let H;e[46]!==i[0]?.id||e[47]!==l.control||e[48]!==E||e[49]!==A||e[50]!==m?(H=Ft.map(I=>s.jsx(tt,{control:l.control,name:`tiers.${I.key}`,render:T=>{const{field:O}=T;return s.jsx(qe,{title:A(I.key),description:E(I.key),action:s.jsx($t,{slot:O.value,defaultKeyId:i[0]?.id??null,filterModels:I.filter,onSlotChange:M=>{O.onChange(M),m()}})})}},I.key)),e[46]=i[0]?.id,e[47]=l.control,e[48]=E,e[49]=A,e[50]=m,e[51]=H):H=e[51];let q;e[52]!==H?(q=s.jsx(De,{children:H}),e[52]=H,e[53]=q):q=e[53];let V;return e[54]!==R||e[55]!==U||e[56]!==q?(V=s.jsxs(we,{title:R,headerClassName:"pl-0",children:[U,q]}),e[54]=R,e[55]=U,e[56]=q,e[57]=V):V=e[57],V}function qt(e){return e.id}const Bt={usd:[10,20,100],brl:[50,100,500]};function zt(){const e=J.c(30),t=se(),i=re(),[o]=He(),[n,c]=G.useState(!1);let a;e[0]!==t?(a=d=>{X.error(t("settings.decoCreditsHero.topUpFailed",{message:d.message}))},e[0]=t,e[1]=a):a=e[1];const{mutate:l,isPending:u}=le({mutationFn:async d=>{const{url:y}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:d,currency:m});return y},onSuccess:Vt,onError:a}),[_,b]=G.useState(""),[r,p]=G.useState(o.language==="pt-BR"?"brl":"usd"),m=r,f=parseFloat(_),P=!isNaN(f)&&f>=1,h=m==="brl"?"R$":"$";let v;e[2]!==p?(v=d=>{d&&p(d)},e[2]=p,e[3]=v):v=e[3];let g,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Te,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),N=s.jsx(Te,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[4]=g,e[5]=N):(g=e[4],N=e[5]);let k;e[6]!==m||e[7]!==v?(k=s.jsxs(vt,{type:"single",variant:"outline",size:"default",value:m,onValueChange:v,children:[g,N]}),e[6]=m,e[7]=v,e[8]=k):k=e[8];let x;e[9]!==m||e[10]!==h||e[11]!==n||e[12]!==u||e[13]!==t||e[14]!==l?(x=!n&&s.jsxs(s.Fragment,{children:[Bt[m].map(d=>s.jsxs(ee,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:u,onClick:()=>l(d*100),children:[h,d]},d)),s.jsx(ee,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>c(!0),disabled:u,children:t("settings.decoCreditsHero.custom")})]}),e[9]=m,e[10]=h,e[11]=n,e[12]=u,e[13]=t,e[14]=l,e[15]=x):x=e[15];let j;e[16]!==h||e[17]!==_||e[18]!==f||e[19]!==n||e[20]!==P||e[21]!==u||e[22]!==b||e[23]!==t||e[24]!==l?(j=n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:h}),s.jsx(ye,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:_,onChange:d=>b(d.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(ee,{className:"h-10",disabled:!P||u,onClick:()=>l(Math.round(f*100)),children:u?"...":t("settings.decoCreditsHero.add")}),s.jsx(ee,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{c(!1),b("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=h,e[17]=_,e[18]=f,e[19]=n,e[20]=P,e[21]=u,e[22]=b,e[23]=t,e[24]=l,e[25]=j):j=e[25];let S;return e[26]!==k||e[27]!==x||e[28]!==j?(S=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[k,x,j]})}),e[26]=k,e[27]=x,e[28]=j,e[29]=S):S=e[29],S}function Vt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function Lt(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function Qt(){const e=J.c(121),t=se(),{org:i}=be(),o=re(),n=je(),c=Ae();let a;e[0]!==c?(a=c.find(Gt),e[0]=c,e[1]=a):a=e[1];const l=a,[u,_]=G.useState(!1);let b;e[2]!==l||e[3]!==o?(b=async()=>{l&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:l.id})},e[2]=l,e[3]=o,e[4]=b):b=e[4];let r;e[5]!==i.id||e[6]!==n||e[7]!==t?(r=()=>{n.invalidateQueries({queryKey:te.aiProviderKeys(i.id)}),n.invalidateQueries({queryKey:te.aiProviders(i.id)}),X.success(t("settings.decoCreditsHero.disconnectSuccess")),_(!1)},e[5]=i.id,e[6]=n,e[7]=t,e[8]=r):r=e[8];let p;e[9]!==t?(p=et=>{X.error(t("settings.decoCreditsHero.disconnectError",{message:et.message}))},e[9]=t,e[10]=p):p=e[10];let m;e[11]!==b||e[12]!==r||e[13]!==p?(m={mutationFn:b,onSuccess:r,onError:p},e[11]=b,e[12]=r,e[13]=p,e[14]=m):m=e[14];const{mutate:f,isPending:P}=le(m);let h;e[15]!==i.id?(h=te.aiProviderCredits(i.id,"deco"),e[15]=i.id,e[16]=h):h=e[16];const v=!!l;let g;e[17]!==o?(g=async()=>{try{return await o.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[17]=o,e[18]=g):g=e[18];let N;e[19]!==h||e[20]!==v||e[21]!==g?(N={queryKey:h,enabled:v,staleTime:6e4,queryFn:g},e[19]=h,e[20]=v,e[21]=g,e[22]=N):N=e[22];const{data:k,isLoading:x,refetch:j,isFetching:S}=ke(N);if(!l)return null;const d=k?.balanceCents!=null?k.balanceCents/100:null;let y;e[23]!==d?(y=d!=null?`$${d.toFixed(2)}`:"—",e[23]=d,e[24]=y):y=e[24];const C=y;let K;e[25]!==t?(K=t("settings.decoCreditsHero.title"),e[25]=t,e[26]=K):K=e[26];let A;e[27]!==t?(A=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[27]=t,e[28]=A):A=e[28];let w;e[29]!==A?(w=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:A,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[29]=A,e[30]=w):w=e[30];let E;e[31]!==t?(E=t("settings.decoCreditsHero.accessModels"),e[31]=t,e[32]=E):E=e[32];let R;e[33]!==E?(R=s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:E})}),e[33]=E,e[34]=R):R=e[34];let F;e[35]!==w||e[36]!==R?(F=s.jsxs("div",{className:"flex items-center gap-3",children:[w,R]}),e[35]=w,e[36]=R,e[37]=F):F=e[37];let z;e[38]===Symbol.for("react.memo_cache_sentinel")?(z=()=>_(!0),e[38]=z):z=e[38];let L;e[39]!==t?(L=t("settings.decoCreditsHero.disconnect"),e[39]=t,e[40]=L):L=e[40];let $;e[41]!==P||e[42]!==L?($=s.jsx(ee,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:z,disabled:P,children:L}),e[41]=P,e[42]=L,e[43]=$):$=e[43];let U;e[44]!==F||e[45]!==$?(U=s.jsxs("div",{className:"flex items-center justify-between",children:[F,$]}),e[44]=F,e[45]=$,e[46]=U):U=e[46];let H;e[47]!==t?(H=t("settings.decoCreditsHero.disconnectTitle"),e[47]=t,e[48]=H):H=e[48];let q;e[49]!==H?(q=s.jsx(Le,{children:H}),e[49]=H,e[50]=q):q=e[50];let V;e[51]!==t?(V=t("settings.decoCreditsHero.disconnectDescription"),e[51]=t,e[52]=V):V=e[52];let I;e[53]!==V?(I=s.jsx(Qe,{children:V}),e[53]=V,e[54]=I):I=e[54];let T;e[55]!==q||e[56]!==I?(T=s.jsxs(Ge,{children:[q,I]}),e[55]=q,e[56]=I,e[57]=T):T=e[57];let O;e[58]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[58]=t,e[59]=O):O=e[59];let M;e[60]!==O?(M=s.jsx(Ye,{children:O}),e[60]=O,e[61]=M):M=e[61];let D;e[62]!==f?(D=()=>f(),e[62]=f,e[63]=D):D=e[63];let Y;e[64]!==t?(Y=t("settings.decoCreditsHero.disconnectButton"),e[64]=t,e[65]=Y):Y=e[65];let W;e[66]!==D||e[67]!==Y?(W=s.jsx(We,{onClick:D,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Y}),e[66]=D,e[67]=Y,e[68]=W):W=e[68];let B;e[69]!==M||e[70]!==W?(B=s.jsxs(Je,{children:[M,W]}),e[69]=M,e[70]=W,e[71]=B):B=e[71];let Q;e[72]!==T||e[73]!==B?(Q=s.jsxs(Xe,{children:[T,B]}),e[72]=T,e[73]=B,e[74]=Q):Q=e[74];let ie;e[75]!==u||e[76]!==Q?(ie=s.jsx(Ze,{open:u,onOpenChange:_,children:Q}),e[75]=u,e[76]=Q,e[77]=ie):ie=e[77];let Z;e[78]!==d||e[79]!==C||e[80]!==S||e[81]!==x?(Z=x||S?s.jsx(Ke,{className:"h-9 w-24"}):s.jsx("span",{className:Ee("text-3xl font-semibold tabular-nums tracking-tight",d!=null&&Lt(d)),children:C}),e[78]=d,e[79]=C,e[80]=S,e[81]=x,e[82]=Z):Z=e[82];let oe;e[83]!==j?(oe=()=>j(),e[83]=j,e[84]=oe):oe=e[84];let ne;e[85]!==t?(ne=t("settings.decoCreditsHero.refreshBalance"),e[85]=t,e[86]=ne):ne=e[86];const Ne=S&&"animate-spin";let ae;e[87]!==Ne?(ae=Ee(Ne),e[87]=Ne,e[88]=ae):ae=e[88];let ce;e[89]!==ae?(ce=s.jsx(Ue,{size:14,className:ae}),e[89]=ae,e[90]=ce):ce=e[90];let de;e[91]!==S||e[92]!==oe||e[93]!==ne||e[94]!==ce?(de=s.jsx("button",{type:"button",onClick:oe,disabled:S,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":ne,children:ce}),e[91]=S,e[92]=oe,e[93]=ne,e[94]=ce,e[95]=de):de=e[95];let me;e[96]!==Z||e[97]!==de?(me=s.jsxs("div",{className:"flex items-baseline gap-2",children:[Z,de]}),e[96]=Z,e[97]=de,e[98]=me):me=e[98];let ue;e[99]!==t?(ue=t("settings.decoCreditsHero.availableBalance"),e[99]=t,e[100]=ue):ue=e[100];let fe;e[101]!==ue?(fe=s.jsx("p",{className:"text-xs text-muted-foreground",children:ue}),e[101]=ue,e[102]=fe):fe=e[102];let pe;e[103]!==me||e[104]!==fe?(pe=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[me,fe]}),e[103]=me,e[104]=fe,e[105]=pe):pe=e[105];let ge;e[106]!==t?(ge=t("settings.decoCreditsHero.addCredits"),e[106]=t,e[107]=ge):ge=e[107];let xe;e[108]!==ge?(xe=s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:ge}),e[108]=ge,e[109]=xe):xe=e[109];let Se;e[110]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(zt,{}),e[110]=Se):Se=e[110];let he;e[111]!==xe?(he=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[xe,Se]}),e[111]=xe,e[112]=he):he=e[112];let ve;e[113]!==U||e[114]!==ie||e[115]!==pe||e[116]!==he?(ve=s.jsx(De,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[U,ie,pe,he]})}),e[113]=U,e[114]=ie,e[115]=pe,e[116]=he,e[117]=ve):ve=e[117];let Ce;return e[118]!==K||e[119]!==ve?(Ce=s.jsx(we,{title:K,children:ve}),e[118]=K,e[119]=ve,e[120]=Ce):Ce=e[120],Ce}function Gt(e){return e.providerId==="deco"}function Yt(){const e=J.c(12),{org:t}=be(),i=re(),o=je(),n=se();let c;e[0]!==i?(c=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==o||e[4]!==n?(a=()=>{Re("ai_provider_provision_succeeded",{provider_id:"deco"}),o.invalidateQueries({queryKey:te.aiProviderKeys(t.id)}),o.invalidateQueries({queryKey:te.aiProviders(t.id)}),X.success(n("settings.aiProviders.decoConnectSuccess"))},e[2]=t,e[3]=o,e[4]=n,e[5]=a):a=e[5];let l;e[6]!==n?(l=_=>{Re("ai_provider_provision_failed",{provider_id:"deco",error:_.message}),X.error(n("settings.aiProviders.decoConnectError",{error:_.message}))},e[6]=n,e[7]=l):l=e[7];let u;return e[8]!==c||e[9]!==a||e[10]!==l?(u={mutationFn:c,onSuccess:a,onError:l},e[8]=c,e[9]=a,e[10]=l,e[11]=u):u=e[11],le(u)}function Wt(){const e=J.c(37),t=se(),{mutate:i,isPending:o}=Yt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=c):c=e[1];let a;e[2]!==t?(a=t("settings.decoNudgeCard.decoAiGateway"),e[2]=t,e[3]=a):a=e[3];let l;e[4]!==a?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:a,className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[4]=a,e[5]=l):l=e[5];let u;e[6]!==t?(u=t("settings.decoNudgeCard.decoAiGateway"),e[6]=t,e[7]=u):u=e[7];let _;e[8]!==u?(_=s.jsx("p",{className:"text-base font-semibold",children:u}),e[8]=u,e[9]=_):_=e[9];let b;e[10]!==t?(b=t("settings.decoNudgeCard.recommended"),e[10]=t,e[11]=b):b=e[11];let r;e[12]!==b?(r=s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:b}),e[12]=b,e[13]=r):r=e[13];let p;e[14]!==_||e[15]!==r?(p=s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[_,r]}),e[14]=_,e[15]=r,e[16]=p):p=e[16];let m;e[17]!==t?(m=t("settings.decoNudgeCard.description"),e[17]=t,e[18]=m):m=e[18];let f;e[19]!==m?(f=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[19]=m,e[20]=f):f=e[20];let P;e[21]!==f||e[22]!==p?(P=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,f]}),e[21]=f,e[22]=p,e[23]=P):P=e[23];let h;e[24]!==i?(h=()=>i(),e[24]=i,e[25]=h):h=e[25];let v;e[26]!==o||e[27]!==t?(v=t(o?"settings.decoNudgeCard.connecting":"settings.decoNudgeCard.connectDeco"),e[26]=o,e[27]=t,e[28]=v):v=e[28];let g;e[29]!==o||e[30]!==h||e[31]!==v?(g=s.jsx(ee,{variant:"outline",disabled:o,onClick:h,children:v}),e[29]=o,e[30]=h,e[31]=v,e[32]=g):g=e[32];let N;return e[33]!==P||e[34]!==g||e[35]!==l?(N=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[c,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,P,g]})]}),e[33]=P,e[34]=g,e[35]=l,e[36]=N):N=e[36],N}const Jt=e=>st({label:Pe().min(1,e("settings.editProviderDialog.labelRequired")).max(100),apiKey:Pe().optional(),baseUrl:Pe().optional()});function Xt({isOpenAICompatible:e,baseUrl:t,currentBaseUrl:i,apiKey:o}){return e&&!!t&&t!==i&&!o}function Zt({providerKey:e,provider:t,preset:i,maskedKey:o,currentLabel:n,currentBaseUrl:c,onCancel:a,onSuccess:l}){const{org:u}=be(),_=re(),b=je(),r=se(),[p,m]=G.useState(!1),f=t.id==="openai-compatible",P=t.supportedMethods.includes("api-key"),h=Jt(r),{register:v,handleSubmit:g,watch:N,setError:k,formState:{errors:x}}=$e({resolver:Fe(h),defaultValues:{label:n,apiKey:"",baseUrl:c??""}}),j=N("apiKey")??"",{mutate:S,isPending:d}=le({mutationFn:async y=>{let C;y.apiKey&&(f?C=JSON.stringify({baseUrl:y.baseUrl||c||"",apiKey:y.apiKey}):C=y.apiKey),await _.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:y.label,...C!==void 0?{apiKey:C}:{}})},onSuccess:()=>{b.invalidateQueries({queryKey:te.aiProviderKeys(u.id)}),b.invalidateQueries({queryKey:te.aiProviders(u.id)}),X.success(r("settings.editProviderDialog.providerUpdated")),l()},onError:y=>X.error(r("settings.editProviderDialog.failedToUpdate",{error:y.message}))});return s.jsxs("form",{onSubmit:g(y=>{if(Xt({isOpenAICompatible:f,baseUrl:y.baseUrl,currentBaseUrl:c,apiKey:y.apiKey})){k("apiKey",{message:r("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}S(y)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:r("settings.editProviderDialog.label")}),s.jsx(ye,{placeholder:r("settings.editProviderDialog.labelPlaceholder"),...v("label"),className:"h-8 text-sm"}),x.label&&s.jsx("p",{className:"text-xs text-destructive",children:x.label.message})]}),f&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:r("settings.editProviderDialog.baseUrl")}),s.jsx(ye,{type:"url",placeholder:i?.baseUrlPlaceholder??r("settings.editProviderDialog.baseUrlPlaceholder"),...v("baseUrl"),className:"h-8 text-sm"})]}),P&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[r("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",r("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ye,{type:p&&j?"text":"password",placeholder:o,...v("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),j&&s.jsx("button",{type:"button",onClick:()=>m(!p),"aria-label":r(p?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:p?s.jsx(Pt,{size:14}):s.jsx(It,{size:14})})]}),x.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:x.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(At,{children:[s.jsx(ee,{type:"button",variant:"ghost",size:"sm",onClick:a,disabled:d,children:r("settings.editProviderDialog.cancel")}),s.jsx(ee,{type:"submit",size:"sm",disabled:d,children:r(d?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function es(e){const t=J.c(31),{providerKey:i,provider:o,open:n,onOpenChange:c}=e,a=se(),l=re(),u=o.id==="openai-compatible"&&i.presetId?Ve(i.presetId):void 0,_=u?.name??o.name;let b;t[0]!==i.id?(b=te.aiProviderKeyPreview(i.id),t[0]=i.id,t[1]=b):b=t[1];let r;t[2]!==i.id||t[3]!==l?(r=()=>l.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[2]=i.id,t[3]=l,t[4]=r):r=t[4];let p;t[5]!==n||t[6]!==b||t[7]!==r?(p={queryKey:b,queryFn:r,enabled:n,staleTime:0},t[5]=n,t[6]=b,t[7]=r,t[8]=p):p=t[8];const{data:m,isLoading:f}=ke(p),P=wt,h=Dt,v="sm:max-w-md",g=Kt,N=kt,k=a("settings.editProviderDialog.editTitle",{name:_});let x;t[9]!==N||t[10]!==k?(x=s.jsx(N,{children:k}),t[9]=N,t[10]=k,t[11]=x):x=t[11];let j;t[12]!==g||t[13]!==x?(j=s.jsx(g,{children:x}),t[12]=g,t[13]=x,t[14]=j):j=t[14];let S;t[15]!==f||t[16]!==c||t[17]!==u||t[18]!==m||t[19]!==o||t[20]!==i?(S=f||!m?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Et,{})}):s.jsx(Zt,{providerKey:i,provider:o,preset:u,maskedKey:m.maskedKey,currentLabel:m.label,currentBaseUrl:m.baseUrl,onCancel:()=>c(!1),onSuccess:()=>c(!1)}),t[15]=f,t[16]=c,t[17]=u,t[18]=m,t[19]=o,t[20]=i,t[21]=S):S=t[21];let d;t[22]!==h||t[23]!==j||t[24]!==S?(d=s.jsxs(h,{className:v,children:[j,S]}),t[22]=h,t[23]=j,t[24]=S,t[25]=d):d=t[25];let y;return t[26]!==P||t[27]!==c||t[28]!==n||t[29]!==d?(y=s.jsx(P,{open:n,onOpenChange:c,children:d}),t[26]=P,t[27]=c,t[28]=n,t[29]=d,t[30]=y):y=t[30],y}function ts(e){const t=J.c(86),{providerKey:i,provider:o}=e,{org:n}=be(),c=re(),a=je(),[l,u]=G.useState(!1),[_,b]=G.useState(!1),r=se(),[p]=He(),m=p.language==="pt-BR"?bt:void 0,f=o?.id==="openai-compatible";let P;t[0]!==f||t[1]!==i.presetId?(P=f&&i.presetId?Ve(i.presetId):void 0,t[0]=f,t[1]=i.presetId,t[2]=P):P=t[2];const h=P;let v;t[3]!==f||t[4]!==h||t[5]!==o?.name||t[6]!==i.providerId||t[7]!==r?(v=h?h.name:f?r("settings.aiProviders.customOpenAiCompatible"):o?.name??(i.providerId==="claude-code"?r("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?r("settings.providerKeyRow.codex"):i.providerId),t[3]=f,t[4]=h,t[5]=o?.name,t[6]=i.providerId,t[7]=r,t[8]=v):v=t[8];const g=v,N=h?.logo??o?.logo??Nt[i.providerId];let k;e:{if(f){k=i.label;break e}let Z;t[9]!==m||t[10]!==i.createdAt||t[11]!==i.label||t[12]!==r?(Z=r("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:jt(new Date(i.createdAt),{locale:m})}),t[9]=m,t[10]=i.createdAt,t[11]=i.label,t[12]=r,t[13]=Z):Z=t[13],k=Z}const x=k;let j;t[14]!==i.id||t[15]!==c?(j=async()=>{await c.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[14]=i.id,t[15]=c,t[16]=j):j=t[16];let S;t[17]!==n||t[18]!==i.id||t[19]!==a||t[20]!==r?(S=()=>{a.invalidateQueries({queryKey:te.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:te.aiProviders(n.id)}),a.invalidateQueries({queryKey:te.aiProviderModels(n.id,i.id)}),X.success(r("settings.providerKeyRow.keyDeleted")),u(!1)},t[17]=n,t[18]=i.id,t[19]=a,t[20]=r,t[21]=S):S=t[21];let d;t[22]!==r?(d=Z=>X.error(r("settings.providerKeyRow.failedToDeleteKey",{error:Z.message})),t[22]=r,t[23]=d):d=t[23];let y;t[24]!==j||t[25]!==S||t[26]!==d?(y={mutationFn:j,onSuccess:S,onError:d},t[24]=j,t[25]=S,t[26]=d,t[27]=y):y=t[27];const{mutate:C,isPending:K}=le(y);let A;t[28]!==g||t[29]!==N?(A=N?s.jsx("img",{src:N,alt:g,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(_t,{fallback:g.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[28]=g,t[29]=N,t[30]=A):A=t[30];let w;t[31]!==o||t[32]!==r?(w=o?s.jsx(ee,{variant:"ghost",size:"icon","aria-label":r("settings.providerKeyRow.editProviderKey"),className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>b(!0),children:s.jsx(St,{size:14})}):null,t[31]=o,t[32]=r,t[33]=w):w=t[33];let E;t[34]!==r?(E=r("settings.providerKeyRow.deleteProviderKey"),t[34]=r,t[35]=E):E=t[35];let R,F;t[36]===Symbol.for("react.memo_cache_sentinel")?(R=()=>u(!0),F=s.jsx(Ct,{size:14}),t[36]=R,t[37]=F):(R=t[36],F=t[37]);let z;t[38]!==K||t[39]!==E?(z=s.jsx(ee,{variant:"ghost",size:"icon","aria-label":E,className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:K,onClick:R,children:F}),t[38]=K,t[39]=E,t[40]=z):z=t[40];let L;t[41]!==z||t[42]!==w?(L=s.jsxs("div",{className:"flex items-center gap-0.5",children:[w,z]}),t[41]=z,t[42]=w,t[43]=L):L=t[43];let $;t[44]!==x||t[45]!==g||t[46]!==L||t[47]!==A?($=s.jsx(qe,{icon:A,title:g,description:x,action:L}),t[44]=x,t[45]=g,t[46]=L,t[47]=A,t[48]=$):$=t[48];let U;t[49]!==_||t[50]!==o||t[51]!==i?(U=o?s.jsx(es,{providerKey:i,provider:o,open:_,onOpenChange:b}):null,t[49]=_,t[50]=o,t[51]=i,t[52]=U):U=t[52];let H;t[53]!==r?(H=r("settings.providerKeyRow.deleteApiKey"),t[53]=r,t[54]=H):H=t[54];let q;t[55]!==H?(q=s.jsx(Le,{children:H}),t[55]=H,t[56]=q):q=t[56];let V;t[57]!==i.label?(V=s.jsxs(Qe,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),t[57]=i.label,t[58]=V):V=t[58];let I;t[59]!==q||t[60]!==V?(I=s.jsxs(Ge,{children:[q,V]}),t[59]=q,t[60]=V,t[61]=I):I=t[61];let T;t[62]!==r?(T=r("settings.providerKeyRow.cancel"),t[62]=r,t[63]=T):T=t[63];let O;t[64]!==T?(O=s.jsx(Ye,{children:T}),t[64]=T,t[65]=O):O=t[65];let M;t[66]!==C?(M=()=>C(),t[66]=C,t[67]=M):M=t[67];let D;t[68]!==r?(D=r("settings.providerKeyRow.delete"),t[68]=r,t[69]=D):D=t[69];let Y;t[70]!==M||t[71]!==D?(Y=s.jsx(We,{onClick:M,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:D}),t[70]=M,t[71]=D,t[72]=Y):Y=t[72];let W;t[73]!==O||t[74]!==Y?(W=s.jsxs(Je,{children:[O,Y]}),t[73]=O,t[74]=Y,t[75]=W):W=t[75];let B;t[76]!==I||t[77]!==W?(B=s.jsxs(Xe,{children:[I,W]}),t[76]=I,t[77]=W,t[78]=B):B=t[78];let Q;t[79]!==l||t[80]!==B?(Q=s.jsx(Ze,{open:l,onOpenChange:u,children:B}),t[79]=l,t[80]=B,t[81]=Q):Q=t[81];let ie;return t[82]!==$||t[83]!==U||t[84]!==Q?(ie=s.jsxs(s.Fragment,{children:[$,U,Q]}),t[82]=$,t[83]=U,t[84]=Q,t[85]=ie):ie=t[85],ie}function ss(e){const t=e.filter(i=>dt(i.providerId));return{hasInventory:e.length>0,hasHostedProvider:t.length>0,hasDeco:t.some(i=>i.providerId==="deco")}}function is(e,t){return e.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:t.find(o=>o.id===i.providerId)??null}))}function Oe(e){const t=J.c(13),{onConnectClick:i}=e,o=se(),n=Ae(),c=ze();let a;if(t[0]!==c?.providers||t[1]!==n||t[2]!==i||t[3]!==o){const l=c?.providers??[],u=is(n,l);let _;t[5]!==o?(_=o("settings.connectedProvidersSection.sectionTitle"),t[5]=o,t[6]=_):_=t[6];let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(yt,{size:14}),t[7]=b):b=t[7];let r;t[8]!==o?(r=o("settings.connectedProvidersSection.connectButton"),t[8]=o,t[9]=r):r=t[9];let p;t[10]!==i||t[11]!==r?(p=s.jsxs(ee,{size:"sm",onClick:i,children:[b,r]}),t[10]=i,t[11]=r,t[12]=p):p=t[12],a=s.jsx(we,{title:_,headerClassName:"px-0",actions:p,children:u.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:o("settings.connectedProvidersSection.emptyState")}):s.jsx(De,{children:u.map(ls)})}),t[0]=c?.providers,t[1]=n,t[2]=i,t[3]=o,t[4]=a}else a=t[4];return a}function ls(e){const{key:t,provider:i}=e;return s.jsx(ts,{providerKey:t,provider:i},t.id)}function rs(){const e=J.c(55),t=se(),{org:i}=be(),o=re(),n=je(),[c,a]=G.useState("");let l;e[0]!==i.id?(l=te.claudeSubscription(i.id),e[0]=i.id,e[1]=l):l=e[1];let u;e[2]!==o?(u=()=>o.call("CLAUDE_SUBSCRIPTION_STATUS",{}),e[2]=o,e[3]=u):u=e[3];let _;e[4]!==l||e[5]!==u?(_={queryKey:l,queryFn:u},e[4]=l,e[5]=u,e[6]=_):_=e[6];const b=ke(_);let r;e[7]!==i.id||e[8]!==n?(r=()=>n.invalidateQueries({queryKey:te.claudeSubscription(i.id)}),e[7]=i.id,e[8]=n,e[9]=r):r=e[9];const p=r;let m;e[10]!==o||e[11]!==c?(m=()=>o.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:c}),e[10]=o,e[11]=c,e[12]=m):m=e[12];let f;e[13]!==p||e[14]!==t?(f=async()=>{a(""),await p(),X.success(t("settings.claudeSubscription.connected"))},e[13]=p,e[14]=t,e[15]=f):f=e[15];let P;e[16]!==m||e[17]!==f?(P={mutationFn:m,onSuccess:f,onError:ns},e[16]=m,e[17]=f,e[18]=P):P=e[18];const h=le(P);let v;e[19]!==o?(v=()=>o.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),e[19]=o,e[20]=v):v=e[20];let g;e[21]!==p||e[22]!==t?(g=async()=>{await p(),X.success(t("settings.claudeSubscription.disconnected"))},e[21]=p,e[22]=t,e[23]=g):g=e[23];let N;e[24]!==v||e[25]!==g?(N={mutationFn:v,onSuccess:g,onError:os},e[24]=v,e[25]=g,e[26]=N):N=e[26];const k=le(N),x=b.data?.connected===!0,j=!x&&!!b.data?.linkedAt;let S;e[27]!==t?(S=t("settings.claudeSubscription.title"),e[27]=t,e[28]=S):S=e[28];let d;e[29]!==S?(d=s.jsx("p",{className:"text-base font-semibold",children:S}),e[29]=S,e[30]=d):d=e[30];let y;e[31]!==x||e[32]!==j||e[33]!==t?(y=t(x?"settings.claudeSubscription.active":j?"settings.claudeSubscription.expired":"settings.claudeSubscription.description"),e[31]=x,e[32]=j,e[33]=t,e[34]=y):y=e[34];let C;e[35]!==y?(C=s.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[35]=y,e[36]=C):C=e[36];let K;e[37]!==d||e[38]!==C?(K=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,C]}),e[37]=d,e[38]=C,e[39]=K):K=e[39];let A;e[40]!==x||e[41]!==k||e[42]!==t?(A=x?s.jsx(ee,{variant:"outline",disabled:k.isPending,onClick:()=>k.mutate(),children:t("settings.claudeSubscription.disconnect")}):null,e[40]=x,e[41]=k,e[42]=t,e[43]=A):A=e[43];let w;e[44]!==K||e[45]!==A?(w=s.jsxs("div",{className:"flex items-center gap-4",children:[K,A]}),e[44]=K,e[45]=A,e[46]=w):w=e[46];let E;e[47]!==h||e[48]!==x||e[49]!==t||e[50]!==c?(E=x?null:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:[t("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"claude setup-token"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ye,{type:"password",value:c,onChange:F=>a(F.target.value),placeholder:t("settings.claudeSubscription.tokenPlaceholder")}),s.jsx(ee,{disabled:c.trim().length===0||h.isPending,onClick:()=>h.mutate(),children:t("settings.claudeSubscription.connect")})]})]}),e[47]=h,e[48]=x,e[49]=t,e[50]=c,e[51]=E):E=e[51];let R;return e[52]!==w||e[53]!==E?(R=s.jsxs("div",{className:"rounded-xl border border-border px-6 py-5 flex flex-col gap-4",children:[w,E]}),e[52]=w,e[53]=E,e[54]=R):R=e[54],R}function os(e){return X.error(e.message)}function ns(e){return X.error(e.message)}function as(e){const t=J.c(3),{error:i}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{size:16}),t[0]=o):o=t[0];let n;return t[1]!==i.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[o,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=n):n=t[2],n}function cs(){const e=J.c(27),t=Ae();let i;e[0]!==t?(i=ss(t),e[0]=t,e[1]=i):i=e[1];const{hasInventory:o,hasHostedProvider:n,hasDeco:c}=i,[a,l]=G.useState(!1),[u,_]=G.useState(null),b=ze();let r;e[2]!==b?.providers?(r=b?.providers??[],e[2]=b?.providers,e[3]=r):r=e[3];const p=r;if(!n){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=()=>l(!0),e[4]=N):N=e[4];let k;e[5]!==p?(k=s.jsx(xt,{providers:p,onSelect:_,onShowAll:N}),e[5]=p,e[6]=k):k=e[6];const x=u!==null||a;let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=K=>{K||(_(null),l(!1))},e[7]=j):j=e[7];const S=u??void 0;let d;e[8]!==x||e[9]!==S?(d=s.jsx(Me,{open:x,onOpenChange:j,initialProvider:S}),e[8]=x,e[9]=S,e[10]=d):d=e[10];let y;e[11]!==o?(y=o?s.jsx(Oe,{onConnectClick:()=>l(!0)}):null,e[11]=o,e[12]=y):y=e[12];let C;return e[13]!==k||e[14]!==d||e[15]!==y?(C=s.jsxs(s.Fragment,{children:[k,d,y]}),e[13]=k,e[14]=d,e[15]=y,e[16]=C):C=e[16],C}let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(G.Suspense,{fallback:s.jsx(Ke,{className:"h-16 w-full"}),children:s.jsx(Ht,{})}),e[17]=m):m=e[17];let f;e[18]!==c?(f=c?s.jsx(Qt,{}):s.jsx(Wt,{}),e[18]=c,e[19]=f):f=e[19];let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(rs,{}),e[20]=P):P=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Oe,{onConnectClick:()=>l(!0)}),e[21]=h):h=e[21];let v;e[22]!==a?(v=s.jsx(Me,{open:a,onOpenChange:l}),e[22]=a,e[23]=v):v=e[23];let g;return e[24]!==f||e[25]!==v?(g=s.jsxs(s.Fragment,{children:[m,f,P,h,v]}),e[24]=f,e[25]=v,e[26]=g):g=e[26],g}function ds(){const e=J.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ot,{group:"billing"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{children:s.jsx(Ie.Content,{children:s.jsx(Ie.Body,{children:s.jsxs(rt,{children:[t,s.jsx(it,{fallback:ms,children:s.jsx(G.Suspense,{fallback:s.jsx(Ke,{className:"h-64 w-full"}),children:s.jsx(cs,{})})})]})})})}),e[1]=i):i=e[1],i}function ms(e){const{error:t}=e;return s.jsx(as,{error:t??new Error("Failed to load AI providers")})}function Si(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Rt,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx(ds,{})}),e[0]=t):t=e[0],t}export{Si as default};
@@ -1 +0,0 @@
1
- import{c as Bt,b as kt,r as A,j as o,m as jt,k as _t,t as xt}from"./index-BphIXXOp.js";import{i as wt}from"./ChevronRight-wqbYwiLF.js";import{B as At}from"./automation-runs-nfuxnSim.js";import{u as Et,A as Nt}from"./use-section-preview-base-uursozx3.js";import{A as Rt,B as Ct,C as Kt,D as Tt,F as Ft,G as Pt,H as $t,S as Ut,I as Ot,J as zt}from"./index-BaWtU9eb.js";import"./select-COjQ5V-V.js";import"./tooltip-BfkRKScU.js";import"./Check-BdzjeMXF.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronUp-IHCmvX3E.js";import"./agent-icon-BnyLUh_P.js";import"./AlertCircle-CeleFBrs.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./Tool02-B8GwG_SX.js";import"./XCircle-jlAhwcDu.js";import"./ArrowUpRight-C0hTvHTE.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./Users03-DP3zwt6-.js";import"./CheckCircle-D-nlOrXB.js";import"./DotsVertical-Bohq38Q1.js";import"./Stars02-CH68Qhm_.js";import"./Copy01-DIJvVGQk.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Settings02-CpRid7rG.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./Key01-CRQOB5O_.js";import"./LayoutLeft-DZwVeKk1.js";import"./LinkExternal01-Do6tmctI.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./Play-Yhg2bDxR.js";import"./Plus-CgXuzVCT.js";import"./SearchLg-CYNvKytJ.js";import"./SearchMd-BOeEZKFu.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Trash01-COMthlp3.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./X-Bfx6rO6W.js";import"./Zap-li0rR-RI.js";import"./useInfiniteQuery-ewuCizNF.js";import"./use-infinite-scroll-A-tTatQb.js";import"./use-connection-B5TzA1Ut.js";import"./use-mcp-client-DKcZ7v-W.js";import"./auth-tEJ4bybR.js";import"./use-virtual-mcp-IokMTZJW.js";import"./card-CooN3E-v.js";import"./sidebar-Dckv7Gxe.js";import"./use-mobile-C0XoguQx.js";import"./table-CfpVPCrj.js";import"./empty-state-Bd3g-2FH.js";import"./use-members-Dypq7HzL.js";import"./use-org-auth-client-CEm0cNyU.js";import"./use-clock-tick-BlWbr6nY.js";import"./use-automations-BB8THpxC.js";import"./studio-tools-BoD8kcA1.js";import"./useSuspenseInfiniteQuery-BvX-6eAF.js";import"./avatar-BqAz0FLa.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BEi_L0rW.js";import"./dialog-C2XtKj4W.js";import"./tab-id-BJUTVZdl.js";import"./hooks-Cd2G3711.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context--S2eGI2t.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-BezO2qdd.js";import"./use-decopilot-events-D7YXko6B.js";import"./use-organization-settings-C62jhu_V.js";import"./monaco-editor-BMLOnDLJ.js";import"./spinner-Cbrhyipt.js";import"./types-BGHf5GHQ.js";import"./shell-layout-DIvwZhUJ.js";import"./required-auth-layout-DYO8_0ig.js";import"./use-org-sso-8p_mXDai.js";import"./integration-icon-CGwCrGIc.js";import"./use-navigate-to-agent-Cxg9_mL_.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-Dtka3CXu.js";import"./index-BRjr3L_N.js";import"./form-CMuk1nXb.js";import"./label-DhJo3WjY.js";import"./input-9TNY2G6W.js";import"./file-type-icon-BSAnhEu5.js";import"./drawer-HtUPoolZ.js";import"./collection-search-H6c7ia6t.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-D-7lRbur.js";import"./toggle-group-5LW11eFN.js";import"./use-commerce-diagnostic-B54oYyoh.js";import"./popover-BV2Ziop4.js";import"./self-tool-result-DA97K7F2.js";import"./alert-dialog-Cqq7FgQj.js";import"./extract-connection-data-V948FMyj.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-D880nDlC.js";import"./authenticate-and-persist-oauth-CqRX86RU.js";import"./mcp-oauth--A5K-xL8.js";import"./track-CG8KgfQd.js";import"./toolbar-Q0b8veSU.js";import"./skeleton-C_J-aMdg.js";import"./github-repo-picker-DjVb6-0i.js";import"./use-mcp-tools-B4aUfPof.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-DSX5zHxO.js";import"./use-registry-connections-C82adOhA.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CosQp1Ex.js";import"./connection-form-helpers-B07wLptq.js";import"./collection-tabs-BqnoVI6Y.js";import"./badge-D24p8Xxi.js";import"./command-DhvOaMnH.js";import"./index-Dwrgaiv3.js";import"./use-open-billing-url-BwHZpmU9.js";import"./select-model-B5IdH_n6.js";import"./checkbox-BqtDvsR1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BN0IrtYX.js";import"./cards-CxCBBMfu.js";import"./dropdown-menu-Buaqq-Fn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Df1zE4-g.js";import"./use-capability-mz-0XBoJ.js";import"./use-file-configs-C4oqeXep.js";import"./pt-BR-CLy76QW2.js";import"./switch-b-8BZDWJ.js";import"./use-debounced-autosave-BHPvlnZn.js";import"./index-BKOwC_zz.js";import"./search-input-ChJAF9CO.js";import"./index-DNa-ZV66.js";import"./use-secrets-CXv4Or8y.js";import"./AreaChart-Cr68R9KD.js";import"./use-tags-DBhn0x6Q.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BN46j3bE.js";import"./use-org-repo-syncs-DCxfKVxi.js";function It(n,t){const s=(n.title||n.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),i=/^[A-Za-z]/.test(s)&&s.length>0?s:"Section",m=Rt(t,i);return{blockKey:m,data:{__resolveType:n.resolveType,name:m}}}function Or(n){const t=Bt.c(78),{orgSlug:s,virtualMcpId:i,branch:m,blockKey:p,block:x,meta:a,decofile:l,title:ht,excludeFields:H,schemaPending:nt,previewBaseUrl:lt}=n,M=nt===void 0?!1:nt,Z=lt===void 0?null:lt,c=kt();let N;t[0]!==Z||t[1]!==i?(N={virtualMcpId:i,sandboxUrl:Z},t[0]=Z,t[1]=i,t[2]=N):N=t[2];const h=Et(N),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[3]!==H||t[4]!==a||t[5]!==v?(R=Ct(v,a,H),t[3]=H,t[4]=a,t[5]=v,t[6]=R):R=t[6];const b=R;let C;t[7]!==b?(C=!!b&&Object.keys(b.properties??{}).length>0,t[7]=b,t[8]=C):C=t[8];const G=C,ct=ht??(x?Kt(p,x,a):p);let K;t[9]!==m||t[10]!==s||t[11]!==i?(K={orgSlug:s,virtualMcpId:i,branch:m},t[9]=m,t[10]=s,t[11]=i,t[12]=K):K=t[12];const{save:S,flush:J,isPending:Q}=Tt(K);let T;t[13]!==m||t[14]!==s||t[15]!==i?(T={orgSlug:s,virtualMcpId:i,branch:m},t[13]=m,t[14]=s,t[15]=i,t[16]=T):T=t[16];const W=Ft(T);let F;t[17]!==S?(F=Ot((e,r)=>S(e,r)),t[17]=S,t[18]=F):F=t[18];const X=F,[bt,vt]=A.useState(p),[Y,dt]=A.useState(null),[tt,ut]=A.useState(0);let P;t[19]===Symbol.for("react.memo_cache_sentinel")?(P=[],t[19]=P):P=t[19];const[g,ft]=A.useState(P),[et,d]=A.useState(!1),$=A.useRef(null);bt!==p&&(vt(p),dt(null),ut(Vt),ft([]));let U;t[20]!==x?(U=x??{},t[20]=x,t[21]=U):U=t[21];const ot=U;let y;t[22]!==Y?(y=Y??{},t[22]=Y,t[23]=y):y=t[23];let O;t[24]!==ot||t[25]!==y?(O={...ot,...y},t[24]=ot,t[25]=y,t[26]=O):O=t[26];const rt=O;let z;t[27]!==p||t[28]!==v||t[29]!==S?(z=e=>{const r=e;dt(r),S(p,{...r,__resolveType:v})},t[27]=p,t[28]=v,t[29]=S,t[30]=z):z=t[30];const it=z;let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{ft(e)},t[31]=I):I=t[31];const E=I;let L;t[32]!==l||t[33]!==J||t[34]!==W||t[35]!==c?(L=async(e,r)=>{try{const{blockKey:u,data:f}=It(e,l);await W.mutateAsync({blockKey:u,data:f}),xt.success(c("sandbox.appEditor.createdSection",{name:u})),r({__resolveType:u}),J()}catch(u){const f=u,yt=f instanceof Error?f.message:c("sandbox.appEditor.failedAddSection");throw xt.error(yt),f}},t[32]=l,t[33]=J,t[34]=W,t[35]=c,t[36]=L):L=t[36];const B=L;let V;t[37]!==d?(V=e=>{$.current=e.append,d(!0)},t[37]=d,t[38]=V):V=t[38];const st=V;let q;t[39]!==B||t[40]!==d?(q=async e=>{const r=$.current;if(r)try{await B(e,u=>{r(u),d(!1),$.current=null})}catch{}},t[39]=B,t[40]=d,t[41]=q):q=t[41];const mt=q,pt=g.length>0?[ct,...g]:[],St="flex h-full flex-col",gt="flex h-12 shrink-0 items-center justify-between border-b px-6",at=pt.length>0?o.jsx("nav",{"aria-label":c("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:pt.map((e,r)=>{const u=r===pt.length-1,f=Pt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(wt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{E(r===0?[]:$t(g,r)),ut(Lt)},title:f,className:jt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:ct});let k;t[42]!==Q?(k=o.jsx(zt,{isPending:Q,isError:!1}),t[42]=Q,t[43]=k):k=t[43];let j;t[44]!==at||t[45]!==k?(j=o.jsxs("div",{className:gt,children:[at,k]}),t[44]=at,t[45]=k,t[46]=j):j=t[46];let _;t[47]!==p||t[48]!==m||t[49]!==g||t[50]!==l||t[51]!==rt||t[52]!==tt||t[53]!==B||t[54]!==E||t[55]!==it||t[56]!==st||t[57]!==G||t[58]!==a||t[59]!==s||t[60]!==X||t[61]!==b||t[62]!==M||t[63]!==h||t[64]!==c||t[65]!==i?(_=o.jsx(At,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:G?o.jsx(Ut,{schema:b,value:rt,onChange:it,basePath:"",breadcrumbPath:g,onBreadcrumbChange:E,decofile:l,meta:a,onSaveReferencedBlock:X,previewBaseUrl:h,onAddSectionItem:B,onRequestAddSection:st,sandbox:{orgSlug:s,virtualMcpId:i,branch:m}},`${p}:${tt}`):M?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(_t,{size:16,className:"animate-spin"}),c("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:c("sandbox.appEditor.noEditableSchema")})})})}),t[47]=p,t[48]=m,t[49]=g,t[50]=l,t[51]=rt,t[52]=tt,t[53]=B,t[54]=E,t[55]=it,t[56]=st,t[57]=G,t[58]=a,t[59]=s,t[60]=X,t[61]=b,t[62]=M,t[63]=h,t[64]=c,t[65]=i,t[66]=_):_=t[66];let w;t[67]!==et||t[68]!==l||t[69]!==mt||t[70]!==a||t[71]!==h||t[72]!==d?(w=h&&o.jsx(Nt,{open:et,onOpenChange:e=>{d(e),e||($.current=null)},meta:a,decofile:l,previewBaseUrl:h,onSelect:e=>{mt(e)}}),t[67]=et,t[68]=l,t[69]=mt,t[70]=a,t[71]=h,t[72]=d,t[73]=w):w=t[73];let D;return t[74]!==j||t[75]!==_||t[76]!==w?(D=o.jsxs("div",{className:St,children:[j,_,w]}),t[74]=j,t[75]=_,t[76]=w,t[77]=D):D=t[77],D}function Lt(n){return n+1}function Vt(n){return n+1}export{Or as AppEditor};
@@ -1 +0,0 @@
1
- import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-BphIXXOp.js";import{s as V}from"./Plus-CgXuzVCT.js";import{i as S}from"./Zap-li0rR-RI.js";import{S as G}from"./search-input-ChJAF9CO.js";import{P as d}from"./index-BKOwC_zz.js";import{E as T}from"./empty-state-Bd3g-2FH.js";import{c as H}from"./use-automations-BB8THpxC.js";import{c as J}from"./use-navigate-to-agent-Cxg9_mL_.js";import{A as K}from"./automation-list-row-BN46j3bE.js";import{t as O}from"./use-mcp-client-DKcZ7v-W.js";import{u as Q}from"./use-virtual-mcp-IokMTZJW.js";import{R as U}from"./require-capability-ChdE_Nc5.js";import"./SearchMd-BOeEZKFu.js";import"./sidebar-Dckv7Gxe.js";import"./LayoutLeft-DZwVeKk1.js";import"./use-mobile-C0XoguQx.js";import"./X-Bfx6rO6W.js";import"./tooltip-BfkRKScU.js";import"./studio-tools-BoD8kcA1.js";import"./hooks-Cd2G3711.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-Cqq7FgQj.js";import"./dropdown-menu-Buaqq-Fn.js";import"./Check-BdzjeMXF.js";import"./ChevronRight-wqbYwiLF.js";import"./DotsVertical-Bohq38Q1.js";import"./Stars02-CH68Qhm_.js";import"./Trash01-COMthlp3.js";import"./agent-icon-BnyLUh_P.js";import"./AlertCircle-CeleFBrs.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./Tool02-B8GwG_SX.js";import"./XCircle-jlAhwcDu.js";import"./ArrowUpRight-C0hTvHTE.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./Users03-DP3zwt6-.js";import"./CheckCircle-D-nlOrXB.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronUp-IHCmvX3E.js";import"./Copy01-DIJvVGQk.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Settings02-CpRid7rG.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./Key01-CRQOB5O_.js";import"./LinkExternal01-Do6tmctI.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./Play-Yhg2bDxR.js";import"./SearchLg-CYNvKytJ.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./auth-tEJ4bybR.js";import"./use-capability-mz-0XBoJ.js";import"./access-gate-C8o_OE1N.js";import"./capability-load-error-CPQoG_lp.js";function W(){const t=B.c(20),e=D(),{org:c}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=A.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(i,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+i}})};let l;t[0]!==f||t[1]!==c.slug?(l=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=l):l=t[2];const L=l,j=d,v=d,w=d;let s;t[3]!==e?(s=e("settings.automations.pageTitle"),t[3]=e,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:e("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.emptyTitle"),description:e("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),e("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.noResultsTitle"),description:e("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(i=>o.jsx(K,{automation:i,showAgent:!0,onClick:()=>z(i.id,i.virtual_mcp_id)},i.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function jo(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=e):e=t[0],e}export{jo as default};
@@ -1 +0,0 @@
1
- import{c as he,b as je,r as de,j as t,k as ye,B as ne}from"./index-BphIXXOp.js";import{C as ue}from"./agent-icon-BnyLUh_P.js";import{i as Ne}from"./X-Bfx6rO6W.js";import{L as ce}from"./label-DhJo3WjY.js";import{an as xe,ao as ke}from"./index-BaWtU9eb.js";import{S as Ce,a as Pe,b as Se,c as ve,d as _e}from"./select-COjQ5V-V.js";import{T as Te,a as we,c as Be}from"./tooltip-BfkRKScU.js";import"./AlertCircle-CeleFBrs.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./Tool02-B8GwG_SX.js";import"./XCircle-jlAhwcDu.js";import"./ArrowUpRight-C0hTvHTE.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./Users03-DP3zwt6-.js";import"./CheckCircle-D-nlOrXB.js";import"./Check-BdzjeMXF.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronRight-wqbYwiLF.js";import"./ChevronUp-IHCmvX3E.js";import"./DotsVertical-Bohq38Q1.js";import"./Stars02-CH68Qhm_.js";import"./Copy01-DIJvVGQk.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Settings02-CpRid7rG.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./Key01-CRQOB5O_.js";import"./LayoutLeft-DZwVeKk1.js";import"./LinkExternal01-Do6tmctI.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./Play-Yhg2bDxR.js";import"./Plus-CgXuzVCT.js";import"./SearchLg-CYNvKytJ.js";import"./SearchMd-BOeEZKFu.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Trash01-COMthlp3.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./Zap-li0rR-RI.js";import"./chat-context--S2eGI2t.js";import"./tab-id-BJUTVZdl.js";import"./dialog-C2XtKj4W.js";import"./hooks-Cd2G3711.js";import"./use-mcp-client-DKcZ7v-W.js";import"./auth-tEJ4bybR.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-IokMTZJW.js";import"./use-ai-providers-BezO2qdd.js";import"./studio-tools-BoD8kcA1.js";import"./use-decopilot-events-D7YXko6B.js";import"./use-organization-settings-C62jhu_V.js";import"./automation-runs-nfuxnSim.js";import"./useInfiniteQuery-ewuCizNF.js";import"./use-infinite-scroll-A-tTatQb.js";import"./use-connection-B5TzA1Ut.js";import"./card-CooN3E-v.js";import"./sidebar-Dckv7Gxe.js";import"./use-mobile-C0XoguQx.js";import"./table-CfpVPCrj.js";import"./empty-state-Bd3g-2FH.js";import"./use-members-Dypq7HzL.js";import"./use-org-auth-client-CEm0cNyU.js";import"./use-clock-tick-BlWbr6nY.js";import"./use-automations-BB8THpxC.js";import"./useSuspenseInfiniteQuery-BvX-6eAF.js";import"./avatar-BqAz0FLa.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BEi_L0rW.js";import"./monaco-editor-BMLOnDLJ.js";import"./spinner-Cbrhyipt.js";import"./types-BGHf5GHQ.js";import"./shell-layout-DIvwZhUJ.js";import"./required-auth-layout-DYO8_0ig.js";import"./use-org-sso-8p_mXDai.js";import"./integration-icon-CGwCrGIc.js";import"./use-navigate-to-agent-Cxg9_mL_.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-Dtka3CXu.js";import"./index-BRjr3L_N.js";import"./form-CMuk1nXb.js";import"./input-9TNY2G6W.js";import"./file-type-icon-BSAnhEu5.js";import"./drawer-HtUPoolZ.js";import"./collection-search-H6c7ia6t.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-D-7lRbur.js";import"./toggle-group-5LW11eFN.js";import"./use-commerce-diagnostic-B54oYyoh.js";import"./popover-BV2Ziop4.js";import"./self-tool-result-DA97K7F2.js";import"./alert-dialog-Cqq7FgQj.js";import"./extract-connection-data-V948FMyj.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-D880nDlC.js";import"./authenticate-and-persist-oauth-CqRX86RU.js";import"./mcp-oauth--A5K-xL8.js";import"./track-CG8KgfQd.js";import"./toolbar-Q0b8veSU.js";import"./skeleton-C_J-aMdg.js";import"./github-repo-picker-DjVb6-0i.js";import"./use-mcp-tools-B4aUfPof.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-DSX5zHxO.js";import"./use-registry-connections-C82adOhA.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CosQp1Ex.js";import"./connection-form-helpers-B07wLptq.js";import"./collection-tabs-BqnoVI6Y.js";import"./badge-D24p8Xxi.js";import"./command-DhvOaMnH.js";import"./index-Dwrgaiv3.js";import"./use-open-billing-url-BwHZpmU9.js";import"./select-model-B5IdH_n6.js";import"./checkbox-BqtDvsR1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BN0IrtYX.js";import"./cards-CxCBBMfu.js";import"./dropdown-menu-Buaqq-Fn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Df1zE4-g.js";import"./use-capability-mz-0XBoJ.js";import"./use-file-configs-C4oqeXep.js";import"./pt-BR-CLy76QW2.js";import"./switch-b-8BZDWJ.js";import"./use-debounced-autosave-BHPvlnZn.js";import"./index-BKOwC_zz.js";import"./search-input-ChJAF9CO.js";import"./index-DNa-ZV66.js";import"./use-secrets-CXv4Or8y.js";import"./AreaChart-Cr68R9KD.js";import"./use-tags-DBhn0x6Q.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BN46j3bE.js";import"./use-org-repo-syncs-DCxfKVxi.js";function _i(i){const e=he.c(121),{posts:X,categories:l,initialSlug:re,isPending:s,onApply:le,onClose:p}=i,o=je(),[m,fe]=de.useState(re&&l.some(a=>a.slug===re)?re:l[0]?.slug??""),[n,ge]=de.useState("add");let Y;if(e[0]!==l||e[1]!==m){let a;e[3]!==m?(a=be=>be.slug===m,e[3]=m,e[4]=a):a=e[4],Y=l.find(a),e[0]=l,e[1]=m,e[2]=Y}else Y=e[2];const c=Y,r=X.length,me=String(r);let d;e[5]!==o||e[6]!==me?(d=o("sandbox.bulkCategoryPanel.selectedCount",{count:me}),e[5]=o,e[6]=me,e[7]=d):d=e[7];let x;e[8]!==d?(x=t.jsx("span",{className:"truncate text-sm font-medium",children:d}),e[8]=d,e[9]=x):x=e[9];let u;e[10]!==o?(u=o("sandbox.bulkCategoryPanel.exitSelection"),e[10]=o,e[11]=u):u=e[11];let Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(Ne,{size:14}),e[12]=Z):Z=e[12];let f;e[13]!==s||e[14]!==p||e[15]!==u?(f=t.jsx(Te,{asChild:!0,children:t.jsx(ne,{type:"button",variant:"ghost",size:"icon",disabled:s,onClick:p,"aria-label":u,children:Z})}),e[13]=s,e[14]=p,e[15]=u,e[16]=f):f=e[16];let g;e[17]!==o?(g=o("sandbox.bulkCategoryPanel.exitSelection"),e[17]=o,e[18]=g):g=e[18];let b;e[19]!==g?(b=t.jsx(we,{side:"bottom",children:g}),e[19]=g,e[20]=b):b=e[20];let h;e[21]!==f||e[22]!==b?(h=t.jsxs(Be,{children:[f,b]}),e[21]=f,e[22]=b,e[23]=h):h=e[23];let j;e[24]!==h||e[25]!==x?(j=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[x,h]}),e[24]=h,e[25]=x,e[26]=j):j=e[26];let y;e[27]!==o?(y=o("sandbox.bulkCategoryPanel.title"),e[27]=o,e[28]=y):y=e[28];let N;e[29]!==y?(N=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:y}),e[29]=y,e[30]=N):N=e[30];let k;e[31]!==r||e[32]!==o?(k=r===0?o("sandbox.bulkCategoryPanel.descriptionEmpty"):o("sandbox.bulkCategoryPanel.descriptionWithCount",{count:String(r)}),e[31]=r,e[32]=o,e[33]=k):k=e[33];let C;e[34]!==k?(C=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:k}),e[34]=k,e[35]=C):C=e[35];let P;e[36]!==o?(P=o("sandbox.bulkCategoryPanel.categoryLabel"),e[36]=o,e[37]=P):P=e[37];let S;e[38]!==P?(S=t.jsx(ce,{children:P}),e[38]=P,e[39]=S):S=e[39];let v;e[40]!==l||e[41]!==m||e[42]!==o?(v=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noCategoriesMessage")}):t.jsxs(Ce,{value:m,onValueChange:fe,children:[t.jsx(Pe,{className:"w-full",children:t.jsx(Se,{placeholder:o("sandbox.bulkCategoryPanel.selectCategoryPlaceholder")})}),t.jsx(ve,{children:l.map(ze)})]}),e[40]=l,e[41]=m,e[42]=o,e[43]=v):v=e[43];let _;e[44]!==S||e[45]!==v?(_=t.jsxs("div",{className:"space-y-2",children:[S,v]}),e[44]=S,e[45]=v,e[46]=_):_=e[46];let ee;e[47]===Symbol.for("react.memo_cache_sentinel")?(ee=a=>ge(a),e[47]=ee):ee=e[47];let te;e[48]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(xe,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[48]=te):te=e[48];let T;e[49]!==o?(T=o("sandbox.bulkCategoryPanel.modeAddTitle"),e[49]=o,e[50]=T):T=e[50];let w;e[51]!==T?(w=t.jsx("span",{className:"block text-sm font-medium",children:T}),e[51]=T,e[52]=w):w=e[52];let B;e[53]!==o?(B=o("sandbox.bulkCategoryPanel.modeAddDescription"),e[53]=o,e[54]=B):B=e[54];let R;e[55]!==B?(R=t.jsx("span",{className:"block text-xs text-muted-foreground",children:B}),e[55]=B,e[56]=R):R=e[56];let z;e[57]!==w||e[58]!==R?(z=t.jsxs(ce,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[te,t.jsxs("span",{className:"space-y-0.5",children:[w,R]})]}),e[57]=w,e[58]=R,e[59]=z):z=e[59];let oe;e[60]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx(xe,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[60]=oe):oe=e[60];let E;e[61]!==o?(E=o("sandbox.bulkCategoryPanel.modeReplaceTitle"),e[61]=o,e[62]=E):E=e[62];let L;e[63]!==E?(L=t.jsx("span",{className:"block text-sm font-medium",children:E}),e[63]=E,e[64]=L):L=e[64];let A;e[65]!==o?(A=o("sandbox.bulkCategoryPanel.modeReplaceDescription"),e[65]=o,e[66]=A):A=e[66];let F;e[67]!==A?(F=t.jsx("span",{className:"block text-xs text-muted-foreground",children:A}),e[67]=A,e[68]=F):F=e[68];let M;e[69]!==L||e[70]!==F?(M=t.jsxs(ce,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[oe,t.jsxs("span",{className:"space-y-0.5",children:[L,F]})]}),e[69]=L,e[70]=F,e[71]=M):M=e[71];let V;e[72]!==n||e[73]!==z||e[74]!==M?(V=t.jsxs(ke,{value:n,onValueChange:ee,className:"gap-2",children:[z,M]}),e[72]=n,e[73]=z,e[74]=M,e[75]=V):V=e[75];let $;e[76]!==o?($=o("sandbox.bulkCategoryPanel.cancelButton"),e[76]=o,e[77]=$):$=e[77];let D;e[78]!==s||e[79]!==p||e[80]!==$?(D=t.jsx(ne,{type:"button",variant:"outline",onClick:p,disabled:s,children:$}),e[78]=s,e[79]=p,e[80]=$,e[81]=D):D=e[81];const ae=!c||s||r===0;let G;e[82]!==n||e[83]!==le||e[84]!==c?(G=()=>c&&le(n,{name:c.name,slug:c.slug}),e[82]=n,e[83]=le,e[84]=c,e[85]=G):G=e[85];let I;e[86]!==s||e[87]!==o?(I=s?t.jsxs(t.Fragment,{children:[t.jsx(ye,{size:14,className:"animate-spin"}),o("sandbox.bulkCategoryPanel.updatingButton")]}):o("sandbox.bulkCategoryPanel.applyButton"),e[86]=s,e[87]=o,e[88]=I):I=e[88];let W;e[89]!==ae||e[90]!==G||e[91]!==I?(W=t.jsx(ne,{type:"button",disabled:ae,onClick:G,children:I}),e[89]=ae,e[90]=G,e[91]=I,e[92]=W):W=e[92];let q;e[93]!==D||e[94]!==W?(q=t.jsxs("div",{className:"flex justify-end gap-2",children:[D,W]}),e[93]=D,e[94]=W,e[95]=q):q=e[95];let H;e[96]!==_||e[97]!==V||e[98]!==q?(H=t.jsxs("div",{className:"mt-6 space-y-4",children:[_,V,q]}),e[96]=_,e[97]=V,e[98]=q,e[99]=H):H=e[99];let ie;e[100]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ue,{size:16,className:"shrink-0 text-muted-foreground"}),e[100]=ie):ie=e[100];const pe=String(r);let J;e[101]!==o||e[102]!==pe?(J=o("sandbox.bulkCategoryPanel.selectedPostsLabel",{count:pe}),e[101]=o,e[102]=pe,e[103]=J):J=e[103];let K;e[104]!==J?(K=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[ie,t.jsx("span",{className:"text-sm",children:J})]}),e[104]=J,e[105]=K):K=e[105];let O;e[106]!==r||e[107]!==X||e[108]!==o?(O=r===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noPostsSelectedMessage")}):t.jsx("ul",{className:"divide-y border-t bg-background",children:X.map(Re)}),e[106]=r,e[107]=X,e[108]=o,e[109]=O):O=e[109];let Q;e[110]!==K||e[111]!==O?(Q=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[K,O]}),e[110]=K,e[111]=O,e[112]=Q):Q=e[112];let U;e[113]!==N||e[114]!==C||e[115]!==H||e[116]!==Q?(U=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[N,C,H,Q]})}),e[113]=N,e[114]=C,e[115]=H,e[116]=Q,e[117]=U):U=e[117];let se;return e[118]!==j||e[119]!==U?(se=t.jsxs("div",{className:"flex h-full flex-col",children:[j,U]}),e[118]=j,e[119]=U,e[120]=se):se=e[120],se}function Re(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(ue,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function ze(i){return t.jsx(_e,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{_i as BulkCategoryPanel};
@@ -1,9 +0,0 @@
1
- import{c as S,F as N,K as T,n as E,o as V,e as M,r as q,j as f,b as U,m as R,B as G}from"./index-BphIXXOp.js";import{a as Y}from"./DotsVertical-Bohq38Q1.js";import{n as ie,i as le}from"./Globe01-DEX4B2yM.js";import{i as ae,a as oe}from"./Share07-B14EYmF_.js";import{i as ce}from"./Key01-CRQOB5O_.js";import{a as fe}from"./Palette-5WrpEUaC.js";import{s as J}from"./Trash01-COMthlp3.js";import{i as de}from"./Zap-li0rR-RI.js";import{a as L,D as Z,b as ee,c as te}from"./dropdown-menu-Buaqq-Fn.js";import{d as se,F as z}from"./file-type-icon-BSAnhEu5.js";import{s as ue}from"./Eye-C5vDWwaK.js";function mt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function v(s,e,t,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function _(s,e,t){const n=await fetch(s,e);if(n.ok||t?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function gt(s,e){const t=S.c(15),{org:n}=N();let r;t[0]!==n.id||t[1]!==e||t[2]!==s?(r=T.orgFsList(n.id,s,e),t[0]=n.id,t[1]=e,t[2]=s,t[3]=r):r=t[3];let i;t[4]!==n.id||t[5]!==s?(i=(o,c)=>c?.queryKey[1]===n.id&&c.queryKey[2]===s?o:void 0,t[4]=n.id,t[5]=s,t[6]=i):i=t[6];let l;t[7]!==n.slug||t[8]!==e||t[9]!==s?(l=async()=>(await(await _(v(n.slug,s,"list",{path:e}))).json()).entries.toSorted(he),t[7]=n.slug,t[8]=e,t[9]=s,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==i||t[13]!==l?(a={queryKey:r,placeholderData:i,queryFn:l},t[11]=r,t[12]=i,t[13]=l,t[14]=a):a=t[14],E(a)}function he(s,e){return s.kind!==e.kind?s.kind==="dir"?-1:1:s.path.localeCompare(e.path)}function xt(s,e,t){const n=S.c(15),{org:r}=N();let i;n[0]!==r.id||n[1]!==e||n[2]!==s?(i=T.orgFsStat(r.id,s??"",e),n[0]=r.id,n[1]=e,n[2]=s,n[3]=i):i=n[3];const l=s!==null;let a;n[4]!==t?(a=t?.refetchIntervalWhenAbsent?u=>u.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,n[4]=t,n[5]=a):a=n[5];let o;n[6]!==r.slug||n[7]!==e||n[8]!==s?(o=async()=>{const u=await _(v(r.slug,s??"","stat",{path:e}),void 0,{allow404:!0});return u.status===404?null:(await u.json()).entry},n[6]=r.slug,n[7]=e,n[8]=s,n[9]=o):o=n[9];let c;return n[10]!==i||n[11]!==l||n[12]!==a||n[13]!==o?(c={queryKey:i,enabled:l,refetchInterval:a,queryFn:o},n[10]=i,n[11]=l,n[12]=a,n[13]=o,n[14]=c):c=n[14],E(c)}function yt(s){const e=S.c(9),{org:t}=N();let n;e[0]!==t.id||e[1]!==s?(n=T.orgFsUsage(t.id,s),e[0]=t.id,e[1]=s,e[2]=n):n=e[2];let r;e[3]!==t.slug||e[4]!==s?(r=async()=>await(await _(v(t.slug,s,"usage"))).json(),e[3]=t.slug,e[4]=s,e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==r?(i={queryKey:n,queryFn:r},e[6]=n,e[7]=r,e[8]=i):i=e[8],E(i)}function pt(s,e){const t=S.c(9),n=s===void 0?60:s,{org:r}=N();let i;t[0]!==r.id?(i=T.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const l=e?.enabled;let a;t[2]!==n||t[3]!==r.slug?(a=async()=>(await(await _(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,t[2]=n,t[3]=r.slug,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==l||t[7]!==a?(o={queryKey:i,enabled:l,queryFn:a},t[5]=i,t[6]=l,t[7]=a,t[8]=o):o=t[8],E(o)}const me=50;function bt(s,e){const t=S.c(16),{org:n}=N();let r;t[0]!==n.id||t[1]!==s||t[2]!==e?.prefix||t[3]!==e?.volume?(r=T.orgFsSearch(n.id,s,e?.volume??"",e?.prefix??""),t[0]=n.id,t[1]=s,t[2]=e?.prefix,t[3]=e?.volume,t[4]=r):r=t[4];const i=s.length>0;let l;t[5]!==n.id?(l=(c,u)=>u?.queryKey[1]===n.id?c:void 0,t[5]=n.id,t[6]=l):l=t[6];let a;t[7]!==n.slug||t[8]!==s||t[9]!==e?(a=async()=>{const c=new URLSearchParams({q:s,limit:String(me)});return e&&(c.set("volume",e.volume),e.prefix&&c.set("prefix",e.prefix)),(await(await _(`/api/${encodeURIComponent(n.slug)}/fs/search?${c}`)).json()).entries},t[7]=n.slug,t[8]=s,t[9]=e,t[10]=a):a=t[10];let o;return t[11]!==r||t[12]!==i||t[13]!==l||t[14]!==a?(o={queryKey:r,enabled:i,placeholderData:l,queryFn:a},t[11]=r,t[12]=i,t[13]=l,t[14]=a,t[15]=o):o=t[15],E(o)}function wt(s){const e=S.c(8),{org:t}=N();let n;e[0]!==t.id?(n=T.orgFsSkills(t.id),e[0]=t.id,e[1]=n):n=e[1];const r=s?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await _(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:o}=await a.json();return o.map(ge)},e[2]=t.slug,e[3]=i):i=e[3];let l;return e[4]!==n||e[5]!==r||e[6]!==i?(l={queryKey:n,enabled:r,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=l):l=e[7],E(l)}function ge(s){return{volume:s.volume,path:s.path}}async function jt(s){const e=await _(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:t}=await e.json();return t}async function xe(s,e,t){return(await _(v(s,e,"read",{path:t}))).text()}function X(s,e){const t=S.c(8);let n;t[0]!==s?(n=T.fileText(s),t[0]=s,t[1]=n):n=t[1];const r=e?.enabled!==!1&&s!=="";let i;t[2]!==s?(i=async()=>{const a=await fetch(s,{credentials:"include"});return a.ok?await a.text():null},t[2]=s,t[3]=i):i=t[3];let l;return t[4]!==n||t[5]!==r||t[6]!==i?(l={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=l):l=t[7],E(l)}const ye=new Set(["md","mdx","markdown","txt","text"]),pe=25,be=64*1024,we=256*1024,je=4;function Se(s){const e=s.lastIndexOf(".");return e===-1?!1:ye.has(s.slice(e+1).toLowerCase())}async function St(s,e,t){const n=t?`${t}/`:"",r=d=>d.startsWith(n)?d.slice(n.length):d,i=[],l=[],a=[{path:t,depth:0}];for(;a.length>0;){const d=a.shift();if(!d)break;let m;try{m=(await(await _(v(s,e,"list",{path:d.path}))).json()).entries}catch{continue}for(const h of[...m].sort((g,x)=>g.path.localeCompare(x.path))){if(h.kind==="dir"){d.depth<je&&a.push({path:h.path,depth:d.depth+1});continue}Se(h.path)&&h.size<=be&&i.length<pe?i.push(h.path):l.push(r(h.path))}}const o=await Promise.all(i.map(d=>xe(s,e,d).catch(()=>null))),c=[];let u=0;return i.forEach((d,m)=>{const h=o[m];if(h==null||u+h.length>we){l.push(r(d));return}u+=h.length,c.push({relPath:r(d),content:h})}),c.sort((d,m)=>d.relPath==="SKILL.md"?-1:m.relPath==="SKILL.md"?1:d.relPath.localeCompare(m.relPath)),l.sort(),{files:c,omittedPaths:l}}function Ft(){const s=S.c(7),{org:e}=N();let t;s[0]!==e.id?(t=T.orgFsPublicSets(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==e.slug?(n=async()=>(await(await _(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,s[2]=e.slug,s[3]=n):n=s[3];let r;return s[4]!==t||s[5]!==n?(r={queryKey:t,staleTime:3e5,queryFn:n},s[4]=t,s[5]=n,s[6]=r):r=s[6],E(r)}function $t(s){const e=S.c(3),{org:t}=N();let n;return e[0]!==t.slug||e[1]!==s?(n=r=>v(t.slug,s,"read",{path:r}),e[0]=t.slug,e[1]=s,e[2]=n):n=e[2],n}function kt(){const s=S.c(2),{org:e}=N();let t;return s[0]!==e.slug?(t=(n,r)=>v(e.slug,n,"read",{path:r}),s[0]=e.slug,s[1]=t):t=s[1],t}function Ct(s){const e=S.c(3),{org:t}=N();let n;return e[0]!==t||e[1]!==s?(n={mutationFn:async r=>(await(await _(v(t.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=s,e[2]=n):n=e[2],M(n)}function Tt(s){const e=S.c(18),{org:t}=N(),n=V();let r;e[0]!==t||e[1]!==s?(r=async c=>(await(await _(v(t.slug,s,"public",{path:c.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:c.mode,password:c.password})})).json()).entry,e[0]=t,e[1]=s,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==n||e[5]!==s?(i=async c=>{const u=T.orgFsStat(t.id,s,c.path);await n.cancelQueries({queryKey:u});const d=n.getQueryData(u),m=c.mode!=="private";return n.setQueryData(u,h=>h&&{...h,readPublic:m,effectivePublic:m,shareMode:c.mode}),{key:u,previous:d}},e[3]=t,e[4]=n,e[5]=s,e[6]=i):i=e[6];let l;e[7]!==n?(l=(c,u,d)=>{d&&n.setQueryData(d.key,d.previous)},e[7]=n,e[8]=l):l=e[8];let a;e[9]!==t||e[10]!==n||e[11]!==s?(a=(c,u,d)=>{n.invalidateQueries({queryKey:T.orgFsStat(t.id,s,d.path)}),n.invalidateQueries({queryKey:T.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:T.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:T.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=n,e[11]=s,e[12]=a):a=e[12];let o;return e[13]!==r||e[14]!==i||e[15]!==l||e[16]!==a?(o={mutationFn:r,onMutate:i,onError:l,onSettled:a},e[13]=r,e[14]=i,e[15]=l,e[16]=a,e[17]=o):o=e[17],M(o)}function _t(s){const e=S.c(33),{org:t}=N(),n=V();let r;e[0]!==t||e[1]!==n||e[2]!==s?(r=()=>{n.invalidateQueries({queryKey:T.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:T.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:T.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=n,e[2]=s,e[3]=r):r=e[3];const i=r;let l;e[4]!==t||e[5]!==s?(l=async p=>{const F=(await Promise.allSettled(p.files.map($=>{const D=p.dir?`${p.dir}/${$.name}`:$.name;return _(v(t.slug,s,"file",{path:D}),{method:"PUT",headers:{"content-type":$.type||"application/octet-stream"},body:$})}))).find(Fe);if(F)throw F.reason},e[4]=t,e[5]=s,e[6]=l):l=e[6];let a;e[7]!==i||e[8]!==l?(a={mutationFn:l,onSettled:i},e[7]=i,e[8]=l,e[9]=a):a=e[9];const o=M(a);let c;e[10]!==t||e[11]!==s?(c=async p=>{await _(v(t.slug,s,"dir",{path:p}),{method:"POST"})},e[10]=t,e[11]=s,e[12]=c):c=e[12];let u;e[13]!==i||e[14]!==c?(u={mutationFn:c,onSuccess:i},e[13]=i,e[14]=c,e[15]=u):u=e[15];const d=M(u);let m;e[16]!==t||e[17]!==s?(m=async p=>{await _(v(t.slug,s,"file",{path:p}),{method:"DELETE"})},e[16]=t,e[17]=s,e[18]=m):m=e[18];let h;e[19]!==i||e[20]!==m?(h={mutationFn:m,onSuccess:i},e[19]=i,e[20]=m,e[21]=h):h=e[21];const g=M(h);let x;e[22]!==t||e[23]!==s?(x=async p=>{await _(v(t.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},e[22]=t,e[23]=s,e[24]=x):x=e[24];let y;e[25]!==i||e[26]!==x?(y={mutationFn:x,onSuccess:i},e[25]=i,e[26]=x,e[27]=y):y=e[27];const w=M(y);let b;return e[28]!==d||e[29]!==w||e[30]!==g||e[31]!==o?(b={upload:o,mkdir:d,remove:g,move:w},e[28]=d,e[29]=w,e[30]=g,e[31]=o,e[32]=b):b=e[32],b}function Fe(s){return s.status==="rejected"}function $e(s,e,t){return e?"color":t?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const ke=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,Ce=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Te=["svg","png","jpg","jpeg","webp","avif","gif"];function _e(s){return s.split(".").pop()?.toLowerCase()??""}function De(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oe(s){const e=s.trim();return Ce.test(e)||ke.test(e)}function Dt(s){const e=s.trim(),t=e.match(/^#([0-9a-f]{3})$/i);return t?.[1]?`#${[...t[1]].map(n=>n+n).join("")}`:e}function ve(s){const e=[],t=new Map,n=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let r;for(;(r=n.exec(s))!==null;){const i=r[1],l=r[2].trim();t.has(i)||e.push(i),t.set(i,l)}return e.map(i=>{const l=t.get(i),a=Oe(l),o=/^--brand-font/i.test(i);return{name:i,value:l,isColor:a,isFont:o,kind:$e(i,a,o)}})}const Q=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Ne(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function Ot(s){const e=[],t=new Map;for(const r of s){if(r.kind!=="color")continue;const i=Ne(r.name);t.has(i)||(e.push(i),t.set(i,[])),t.get(i).push(r)}return e.map(r=>{const i=t.get(r);return{family:r,tokens:i,isRamp:i.filter(l=>/-\d+$/.test(l.name)).length>=5}}).sort((r,i)=>{const l=Q.indexOf(r.family),a=Q.indexOf(i.family);return l===-1&&a===-1?0:l===-1?1:a===-1?-1:l-a})}function vt(s,e,t){const n=new RegExp(`(${De(e)}\\s*:\\s*)[^;]+(;)`);if(n.test(s))return s.replace(n,(l,a,o)=>`${a}${t}${o}`);const r=s.search(/:root\s*\{/);if(r!==-1){const l=s.indexOf("{",r)+1;return`${s.slice(0,l)}
2
- ${e}: ${t};${s.slice(l)}`}const i=s.length>0&&!s.endsWith(`
3
- `)?`
4
- `:"";return`${s}${i}:root {
5
- ${e}: ${t};
6
- }
7
- `}function Nt(s){const e=s.filter(n=>n.kind==="file"),t=e.find(n=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(n.path));return t?t.path:e.find(n=>Te.includes(_e(n.path)))?.path??null}function Ie(s){const e={};for(const t of s.split(`
8
- `)){const n=t.match(/^([A-Za-z][\w-]*):\s*(.*)$/);n?.[1]&&n[2]!==void 0&&(e[n[1].toLowerCase()]=n[2].trim())}return e}function W(s){for(const e of s.split(/\n\s*\n/)){const t=e.trim();if(!(!t||t.startsWith("#")))return t.replace(/\n/g," ")}return null}function Ee(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:W(s),body:s};const t=Ie(e[1]),n=s.slice(e[0].length);return{name:t.name||null,description:t.description||W(n),body:n}}const Me={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 Le(s){const e=S.c(46);let t,n,r,i;e[0]!==s?({glyph:t,readOnly:r,tone:i,...n}=s,e[0]=s,e[1]=t,e[2]=n,e[3]=r,e[4]=i):(t=e[1],n=e[2],r=e[3],i=e[4]);const a=Me[i===void 0?"default":i],o=q.useId(),c=`${o}-back`,u=`${o}-front`,d=`url(#${c})`;let m;e[5]!==d?(m=f.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:d}),e[5]=d,e[6]=m):m=e[6];const h=`url(#${u})`;let g;e[7]!==h?(g=f.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:h}),e[7]=h,e[8]=g):g=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=f.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),e[9]=x):x=e[9];let y,w;e[10]!==a.stripe?(y=f.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:a.stripe}),w=f.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:a.stripe}),e[10]=a.stripe,e[11]=y,e[12]=w):(y=e[11],w=e[12]);let b;e[13]!==t||e[14]!==a.glyph?(b=t&&f.jsx(t,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:a.glyph,opacity:.55}}),e[13]=t,e[14]=a.glyph,e[15]=b):b=e[15];let p;e[16]!==r?(p=r&&f.jsxs(f.Fragment,{children:[f.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),f.jsx(ue,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[16]=r,e[17]=p):p=e[17];let j;e[18]!==a.backFrom?(j=f.jsx("stop",{offset:"0.3",stopColor:a.backFrom}),e[18]=a.backFrom,e[19]=j):j=e[19];let F;e[20]!==a.backTo?(F=f.jsx("stop",{offset:"1",stopColor:a.backTo}),e[20]=a.backTo,e[21]=F):F=e[21];let $;e[22]!==c||e[23]!==j||e[24]!==F?($=f.jsxs("linearGradient",{id:c,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[j,F]}),e[22]=c,e[23]=j,e[24]=F,e[25]=$):$=e[25];let D;e[26]!==a.frontFrom?(D=f.jsx("stop",{stopColor:a.frontFrom}),e[26]=a.frontFrom,e[27]=D):D=e[27];let k;e[28]!==a.frontTo?(k=f.jsx("stop",{offset:"1",stopColor:a.frontTo}),e[28]=a.frontTo,e[29]=k):k=e[29];let C;e[30]!==u||e[31]!==D||e[32]!==k?(C=f.jsxs("radialGradient",{id:u,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[D,k]}),e[30]=u,e[31]=D,e[32]=k,e[33]=C):C=e[33];let O;e[34]!==$||e[35]!==C?(O=f.jsxs("defs",{children:[$,C]}),e[34]=$,e[35]=C,e[36]=O):O=e[36];let I;return e[37]!==n||e[38]!==p||e[39]!==O||e[40]!==m||e[41]!==g||e[42]!==y||e[43]!==w||e[44]!==b?(I=f.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[m,g,x,y,w,b,p,O]}),e[37]=n,e[38]=p,e[39]=O,e[40]=m,e[41]=g,e[42]=y,e[43]=w,e[44]=b,e[45]=I):I=e[45],I}const Ue=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Ae=new Set(["csv","tsv"]),Ke=new Set(["mp4","webm","mov","m4v"]),qe=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),ze=256*1024;function P(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const t=Date.now()-e.getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const i=Math.floor(r/24);return i<30?`${i}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Pe(s){return s.split(".").pop()?.toLowerCase()??""}async function Be(s,e){const t=await fetch(s,{credentials:"include",...e});if(!t.ok)throw new Error(`fetch failed: ${t.status}`);return t.text()}function ne(s){const e=S.c(6),{onShare:t,t:n}=s;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=f.jsx(oe,{size:14}),e[0]=r):r=e[0];let i;e[1]!==n?(i=n("library.cards.share"),e[1]=n,e[2]=i):i=e[2];let l;return e[3]!==t||e[4]!==i?(l=f.jsxs(L,{onClick:t,children:[r,i]}),e[3]=t,e[4]=i,e[5]=l):l=e[5],l}function Re(s){const e=S.c(12),{state:t,t:n}=s;let r;e[0]!==t||e[1]!==n?(r=n(t==="password"?"library.cards.passwordProtected":t==="inherited"?"library.cards.sharedViaParent":"library.cards.publicBadge"),e[0]=t,e[1]=n,e[2]=r):r=e[2];const i=r,l=t==="password"?ce:le,a=t==="inherited"?"text-muted-foreground/60":"text-primary";let o;e[3]!==a?(o=R(a),e[3]=a,e[4]=o):o=e[4];let c;e[5]!==l||e[6]!==i||e[7]!==o?(c=f.jsx(l,{size:12,className:o,"aria-label":i}),e[5]=l,e[6]=i,e[7]=o,e[8]=c):c=e[8];let u;return e[9]!==i||e[10]!==c?(u=f.jsx("span",{title:i,className:"mt-0.5 flex shrink-0 items-center",children:c}),e[9]=i,e[10]=c,e[11]=u):u=e[11],u}function re(s){const e=S.c(26),{downloadUrl:t,filename:n,onShare:r,onDelete:i,t:l}=s;let a;e[0]!==n||e[1]!==l?(a=l("library.cards.actionsFor",{filename:n}),e[0]=n,e[1]=l,e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=f.jsx(Y,{size:14}),e[3]=o):o=e[3];let c;e[4]!==a?(c=f.jsx(Z,{asChild:!0,children:f.jsx(G,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:He,"aria-label":a,children:o})}),e[4]=a,e[5]=c):c=e[5];let u;e[6]!==r||e[7]!==l?(u=r&&f.jsx(ne,{onShare:r,t:l}),e[6]=r,e[7]=l,e[8]=u):u=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=f.jsx(ie,{size:14}),e[9]=d):d=e[9];let m;e[10]!==l?(m=l("library.cards.download"),e[10]=l,e[11]=m):m=e[11];let h;e[12]!==t||e[13]!==n||e[14]!==m?(h=f.jsx(L,{asChild:!0,children:f.jsxs("a",{href:t,download:n,children:[d,m]})}),e[12]=t,e[13]=n,e[14]=m,e[15]=h):h=e[15];let g;e[16]!==i||e[17]!==l?(g=i&&f.jsxs(L,{variant:"destructive",onClick:i,children:[f.jsx(J,{size:14}),l("library.cards.delete")]}),e[16]=i,e[17]=l,e[18]=g):g=e[18];let x;e[19]!==u||e[20]!==h||e[21]!==g?(x=f.jsxs(ee,{align:"end",onClick:Xe,children:[u,h,g]}),e[19]=u,e[20]=h,e[21]=g,e[22]=x):x=e[22];let y;return e[23]!==c||e[24]!==x?(y=f.jsxs(te,{children:[c,x]}),e[23]=c,e[24]=x,e[25]=y):y=e[25],y}function Xe(s){return s.stopPropagation()}function He(s){return s.stopPropagation()}function H(s){const e=S.c(22),{label:t,onBrowse:n,onShare:r,onDelete:i,t:l}=s;if(!n&&!r&&!i)return;let a;e[0]!==t||e[1]!==l?(a=l("library.cards.actionsFor",{label:t}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=f.jsx(Y,{size:14}),e[3]=o):o=e[3];let c;e[4]!==a?(c=f.jsx(Z,{asChild:!0,children:f.jsx(G,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:We,"aria-label":a,children:o})}),e[4]=a,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==l?(u=n&&f.jsxs(L,{onClick:n,children:[f.jsx(ae,{size:14}),l("library.cards.browseFiles")]}),e[6]=n,e[7]=l,e[8]=u):u=e[8];let d;e[9]!==r||e[10]!==l?(d=r&&f.jsx(ne,{onShare:r,t:l}),e[9]=r,e[10]=l,e[11]=d):d=e[11];let m;e[12]!==i||e[13]!==l?(m=i&&f.jsxs(L,{variant:"destructive",onClick:i,children:[f.jsx(J,{size:14}),l("library.cards.delete")]}),e[12]=i,e[13]=l,e[14]=m):m=e[14];let h;e[15]!==u||e[16]!==d||e[17]!==m?(h=f.jsxs(ee,{align:"end",onClick:Qe,children:[u,d,m]}),e[15]=u,e[16]=d,e[17]=m,e[18]=h):h=e[18];let g;return e[19]!==c||e[20]!==h?(g=f.jsxs(te,{children:[c,h]}),e[19]=c,e[20]=h,e[21]=g):g=e[21],g}function Qe(s){return s.stopPropagation()}function We(s){return s.stopPropagation()}function A(s){const e=S.c(23),{onOpen:t,children:n,className:r,draggable:i,onDragStart:l,onContextMenu:a,onDragOver:o,onDrop:c,onDragLeave:u}=s,[d,m]=q.useState(!1);let h;e[0]!==t?(h=j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),t())},e[0]=t,e[1]=h):h=e[1];let g;e[2]!==o||e[3]!==c?(g=j=>{o?.(j),c&&(j.preventDefault(),m(!0))},e[2]=o,e[3]=c,e[4]=g):g=e[4];let x;e[5]!==u?(x=j=>{u?.(j),m(!1)},e[5]=u,e[6]=x):x=e[6];let y;e[7]!==c?(y=j=>{c?.(j),m(!1)},e[7]=c,e[8]=y):y=e[8];const w=d&&c&&"border-primary bg-primary/5";let b;e[9]!==r||e[10]!==w?(b=R("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",w,r),e[9]=r,e[10]=w,e[11]=b):b=e[11];let p;return e[12]!==n||e[13]!==i||e[14]!==a||e[15]!==l||e[16]!==t||e[17]!==h||e[18]!==g||e[19]!==x||e[20]!==y||e[21]!==b?(p=f.jsx("div",{role:"button",tabIndex:0,draggable:i,onClick:t,onKeyDown:h,onDragStart:l,onContextMenu:a,onDragOver:g,onDragLeave:x,onDrop:y,className:b,children:n}),e[12]=n,e[13]=i,e[14]=a,e[15]=l,e[16]=t,e[17]=h,e[18]=g,e[19]=x,e[20]=y,e[21]=b,e[22]=p):p=e[22],p}function K(s){const e=S.c(20),{icon:t,name:n,meta:r,subtitle:i,publicState:l,actions:a,t:o}=s;let c;e[0]!==n?(c=f.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:n,children:n}),e[0]=n,e[1]=c):c=e[1];let u;e[2]!==l||e[3]!==o?(u=l&&f.jsx(Re,{state:l,t:o}),e[2]=l,e[3]=o,e[4]=u):u=e[4];let d;e[5]!==r?(d=r&&f.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:r}),e[5]=r,e[6]=d):d=e[6];let m;e[7]!==c||e[8]!==u||e[9]!==d?(m=f.jsxs("div",{className:"flex items-start gap-3",children:[c,u,d]}),e[7]=c,e[8]=u,e[9]=d,e[10]=m):m=e[10];let h;e[11]!==i?(h=i&&f.jsx("span",{className:"truncate text-xs text-muted-foreground",title:i,children:i}),e[11]=i,e[12]=h):h=e[12];let g;e[13]!==m||e[14]!==h?(g=f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[m,h]}),e[13]=m,e[14]=h,e[15]=g):g=e[15];let x;return e[16]!==a||e[17]!==t||e[18]!==g?(x=f.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[t,g,a]}),e[16]=a,e[17]=t,e[18]=g,e[19]=x):x=e[19],x}function It(s){const e=S.c(24),{name:t,meta:n,subtitle:r,glyph:i,tone:l,readOnly:a,publicState:o,onOpen:c,onShare:u,onDelete:d,draggable:m,onDragStart:h,onContextMenu:g,onDrop:x}=s,y=U();let w;e[0]!==i||e[1]!==a||e[2]!==l?(w=f.jsx(Le,{glyph:i,tone:l,readOnly:a,className:"size-8 shrink-0"}),e[0]=i,e[1]=a,e[2]=l,e[3]=w):w=e[3];let b;e[4]!==t||e[5]!==d||e[6]!==u||e[7]!==y?(b=f.jsx(H,{label:t,onShare:u,onDelete:d,t:y}),e[4]=t,e[5]=d,e[6]=u,e[7]=y,e[8]=b):b=e[8];let p;e[9]!==n||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==y||e[14]!==w||e[15]!==b?(p=f.jsx(K,{icon:w,name:t,meta:n,subtitle:r,publicState:o,actions:b,t:y}),e[9]=n,e[10]=t,e[11]=o,e[12]=r,e[13]=y,e[14]=w,e[15]=b,e[16]=p):p=e[16];let j;return e[17]!==m||e[18]!==g||e[19]!==h||e[20]!==x||e[21]!==c||e[22]!==p?(j=f.jsx(A,{onOpen:c,draggable:m,onDragStart:h,onContextMenu:g,onDrop:x,children:p}),e[17]=m,e[18]=g,e[19]=h,e[20]=x,e[21]=c,e[22]=p,e[23]=j):j=e[23],j}function Et(s){const e=S.c(27),{filename:t,updatedAt:n,downloadUrl:r,subtitle:i,publicState:l,onOpen:a,onShare:o,onDelete:c,draggable:u,onDragStart:d,onContextMenu:m}=s,h=U();let g;e[0]!==t?(g=f.jsx(z,{filename:t,className:"h-8 w-6.5 shrink-0"}),e[0]=t,e[1]=g):g=e[1];let x;e[2]!==n?(x=P(n),e[2]=n,e[3]=x):x=e[3];let y;e[4]!==t||e[5]!==i?(y=i??se(t),e[4]=t,e[5]=i,e[6]=y):y=e[6];let w;e[7]!==r||e[8]!==t||e[9]!==c||e[10]!==o||e[11]!==h?(w=f.jsx(re,{downloadUrl:r,filename:t,onShare:o,onDelete:c,t:h}),e[7]=r,e[8]=t,e[9]=c,e[10]=o,e[11]=h,e[12]=w):w=e[12];let b;e[13]!==t||e[14]!==l||e[15]!==h||e[16]!==g||e[17]!==x||e[18]!==y||e[19]!==w?(b=f.jsx(K,{icon:g,name:t,meta:x,subtitle:y,publicState:l,actions:w,t:h}),e[13]=t,e[14]=l,e[15]=h,e[16]=g,e[17]=x,e[18]=y,e[19]=w,e[20]=b):b=e[20];let p;return e[21]!==u||e[22]!==m||e[23]!==d||e[24]!==a||e[25]!==b?(p=f.jsx(A,{onOpen:a,draggable:u,onDragStart:d,onContextMenu:m,children:b}),e[21]=u,e[22]=m,e[23]=d,e[24]=a,e[25]=b,e[26]=p):p=e[26],p}function Mt(s){const e=S.c(29),{dirName:t,updatedAt:n,skillMdUrl:r,publicState:i,onOpen:l,onBrowse:a,onShare:o,onDelete:c,draggable:u,onDragStart:d,onContextMenu:m}=s,h=U(),{data:g}=X(r);let x;e[0]!==g?(x=g?Ee(g):null,e[0]=g,e[1]=x):x=e[1];const y=x;let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=f.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:f.jsx(de,{size:16})}),e[2]=w):w=e[2];const b=y?.name??t;let p;e[3]!==n?(p=P(n),e[3]=n,e[4]=p):p=e[4];let j;e[5]!==h?(j=h("library.cards.skill"),e[5]=h,e[6]=j):j=e[6];let F;e[7]!==t||e[8]!==a||e[9]!==c||e[10]!==o||e[11]!==h?(F=f.jsx(H,{label:t,onBrowse:a,onShare:o,onDelete:c,t:h}),e[7]=t,e[8]=a,e[9]=c,e[10]=o,e[11]=h,e[12]=F):F=e[12];let $;e[13]!==i||e[14]!==h||e[15]!==b||e[16]!==p||e[17]!==j||e[18]!==F?($=f.jsx(K,{icon:w,name:b,meta:p,subtitle:j,publicState:i,actions:F,t:h}),e[13]=i,e[14]=h,e[15]=b,e[16]=p,e[17]=j,e[18]=F,e[19]=$):$=e[19];const D=y?.description??"";let k;e[20]!==D?(k=f.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:D}),e[20]=D,e[21]=k):k=e[21];let C;return e[22]!==u||e[23]!==m||e[24]!==d||e[25]!==l||e[26]!==$||e[27]!==k?(C=f.jsxs(A,{onOpen:l,draggable:u,onDragStart:d,onContextMenu:m,children:[$,k]}),e[22]=u,e[23]=m,e[24]=d,e[25]=l,e[26]=$,e[27]=k,e[28]=C):C=e[28],C}function Lt(s){const e=S.c(45),{dirName:t,updatedAt:n,tokensUrl:r,onOpen:i,onBrowse:l,onDelete:a,draggable:o,onDragStart:c,onContextMenu:u}=s,d=U(),{data:m}=X(r);let h,g,x,y,w,b,p,j;if(e[0]!==m||e[1]!==t||e[2]!==o||e[3]!==l||e[4]!==u||e[5]!==a||e[6]!==c||e[7]!==i||e[8]!==d||e[9]!==n){const D=m?ve(m).filter(Ge).slice(0,6):[];h=A,y=i,w=o,b=c,p=u;let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=f.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:f.jsx(fe,{size:16})}),e[18]=k):k=e[18];let C;e[19]!==n?(C=P(n),e[19]=n,e[20]=C):C=e[20];let O;e[21]!==d?(O=d("library.cards.brand"),e[21]=d,e[22]=O):O=e[22];let I;e[23]!==t||e[24]!==l||e[25]!==a||e[26]!==d?(I=f.jsx(H,{label:t,onBrowse:l,onDelete:a,t:d}),e[23]=t,e[24]=l,e[25]=a,e[26]=d,e[27]=I):I=e[27],e[28]!==t||e[29]!==d||e[30]!==O||e[31]!==I||e[32]!==C?(j=f.jsx(K,{icon:k,name:t,meta:C,subtitle:O,actions:I,t:d}),e[28]=t,e[29]=d,e[30]=O,e[31]=I,e[32]=C,e[33]=j):j=e[33],g="flex min-h-5 items-center gap-1.5",x=D.map(Ve),e[0]=m,e[1]=t,e[2]=o,e[3]=l,e[4]=u,e[5]=a,e[6]=c,e[7]=i,e[8]=d,e[9]=n,e[10]=h,e[11]=g,e[12]=x,e[13]=y,e[14]=w,e[15]=b,e[16]=p,e[17]=j}else h=e[10],g=e[11],x=e[12],y=e[13],w=e[14],b=e[15],p=e[16],j=e[17];let F;e[34]!==g||e[35]!==x?(F=f.jsx("div",{className:g,children:x}),e[34]=g,e[35]=x,e[36]=F):F=e[36];let $;return e[37]!==h||e[38]!==y||e[39]!==w||e[40]!==b||e[41]!==p||e[42]!==j||e[43]!==F?($=f.jsxs(h,{onOpen:y,draggable:w,onDragStart:b,onContextMenu:p,children:[j,F]}),e[37]=h,e[38]=y,e[39]=w,e[40]=b,e[41]=p,e[42]=j,e[43]=F,e[44]=$):$=e[44],$}function Ve(s){return f.jsx("span",{className:"size-5 rounded-full border border-border/60",style:{backgroundColor:s.value},title:`${s.name}: ${s.value}`},s.name)}function Ge(s){return s.isColor}function B(s){const e=S.c(4),{children:t}=s,[n,r]=q.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>o=>{if(!o)return;const c=new IntersectionObserver(u=>{const[d]=u;d?.isIntersecting&&(r(!0),c.disconnect())},{rootMargin:"200px"});c.observe(o)},e[0]=i):i=e[0];const[l]=q.useState(i);if(n){let o;return e[1]!==t?(o=f.jsx(f.Fragment,{children:t}),e[1]=t,e[2]=o):o=e[2],o}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=f.jsx("div",{ref:l,className:"h-full w-full"}),e[3]=a):a=e[3],a}function Ye(s){const e=S.c(4),{url:t}=s,{data:n}=X(t);if(!n)return null;let r;e[0]!==n?(r=n.slice(0,2e3),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=f.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Je(s){const e=S.c(23),{url:t,ext:n}=s;let r;e[0]!==t?(r=T.csvThumb(t),e[0]=t,e[1]=r):r=e[1];let i;e[2]!==t?(i=()=>Be(t,{headers:{Range:"bytes=0-8191"}}),e[2]=t,e[3]=i):i=e[3];let l;e[4]!==r||e[5]!==i?(l={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=l):l=e[6];const{data:a}=E(l);if(!a)return null;const o=n==="tsv"?" ":",";let c,u,d,m;if(e[7]!==a||e[8]!==o){m=Symbol.for("react.early_return_sentinel");e:{let y;e[13]!==o?(y=b=>b.split(o).slice(0,6).map(tt),e[13]=o,e[14]=y):y=e[14];const w=a.split(`
9
- `).filter(Boolean).slice(0,7).map(y);if(w.length===0){m=null;break e}d="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",u="w-full border-collapse",c=w.map(Ze)}e[7]=a,e[8]=o,e[9]=c,e[10]=u,e[11]=d,e[12]=m}else c=e[9],u=e[10],d=e[11],m=e[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let h;e[15]!==c?(h=f.jsx("tbody",{children:c}),e[15]=c,e[16]=h):h=e[16];let g;e[17]!==u||e[18]!==h?(g=f.jsx("table",{className:u,children:h}),e[17]=u,e[18]=h,e[19]=g):g=e[19];let x;return e[20]!==d||e[21]!==g?(x=f.jsx("div",{className:d,children:g}),e[20]=d,e[21]=g,e[22]=x):x=e[22],x}function Ze(s,e){return f.jsx("tr",{className:R(e===0&&"bg-muted/50 font-medium"),children:s.map(et)},e)}function et(s,e){return f.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:f.jsx("span",{className:"block truncate",children:s})},e)}function tt(s){return s.trim().replace(/^"|"$/g,"")}function st(s){const e=S.c(14),{filename:t,size:n,downloadUrl:r}=s;let i;if(e[0]!==r||e[1]!==t||e[2]!==n){const l=Pe(t);let a;if(Ue.has(l)){let o;e[4]!==r?(o=f.jsx("img",{src:r,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=r,e[5]=o):o=e[5],a=o}else if(Ke.has(l)){const o=`${r}#t=0.1`;let c;e[6]!==o?(c=f.jsx(B,{children:f.jsx("video",{src:o,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=o,e[7]=c):c=e[7],a=c}else if(l==="pdf"){let o;e[8]!==t?(o=f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(z,{filename:t,className:"h-14 w-11 opacity-60"})}),e[8]=t,e[9]=o):o=e[9],a=o}else if(Ae.has(l))a=f.jsx(B,{children:f.jsx(Je,{url:r,ext:l})});else if(qe.has(l)&&n<=ze){let o;e[10]!==r?(o=f.jsx(B,{children:f.jsx(Ye,{url:r})}),e[10]=r,e[11]=o):o=e[11],a=o}else{let o;e[12]!==t?(o=f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(z,{filename:t,className:"h-14 w-11 opacity-60"})}),e[12]=t,e[13]=o):o=e[13],a=o}i=f.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:a}),e[0]=r,e[1]=t,e[2]=n,e[3]=i}else i=e[3];return i}function Ut(s){const e=S.c(29),t=U(),n=s.onOpen;let r;e[0]!==s.filename?(r=f.jsx(z,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=r):r=e[1];const i=s.filename;let l;e[2]!==s.updatedAt?(l=P(s.updatedAt),e[2]=s.updatedAt,e[3]=l):l=e[3];let a;e[4]!==s.filename||e[5]!==s.subtitle?(a=s.subtitle??se(s.filename),e[4]=s.filename,e[5]=s.subtitle,e[6]=a):a=e[6];let o;e[7]!==s.downloadUrl||e[8]!==s.filename||e[9]!==s.onDelete||e[10]!==s.onShare||e[11]!==t?(o=f.jsx(re,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete,t}),e[7]=s.downloadUrl,e[8]=s.filename,e[9]=s.onDelete,e[10]=s.onShare,e[11]=t,e[12]=o):o=e[12];let c;e[13]!==s.filename||e[14]!==s.publicState||e[15]!==t||e[16]!==r||e[17]!==l||e[18]!==a||e[19]!==o?(c=f.jsx(K,{icon:r,name:i,meta:l,subtitle:a,publicState:s.publicState,actions:o,t}),e[13]=s.filename,e[14]=s.publicState,e[15]=t,e[16]=r,e[17]=l,e[18]=a,e[19]=o,e[20]=c):c=e[20];let u;e[21]!==s.downloadUrl||e[22]!==s.filename||e[23]!==s.size?(u=f.jsx(st,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[21]=s.downloadUrl,e[22]=s.filename,e[23]=s.size,e[24]=u):u=e[24];let d;return e[25]!==s.onOpen||e[26]!==c||e[27]!==u?(d=f.jsxs(A,{onOpen:n,children:[c,u]}),e[25]=s.onOpen,e[26]=c,e[27]=u,e[28]=d):d=e[28],d}export{Lt as B,It as F,Ut as R,Mt as S,jt as a,kt as b,pt as c,wt as d,$t as e,St as f,X as g,Ct as h,mt as i,Tt as j,xt as k,gt as l,Nt as m,Ot as n,vt as o,ve as p,Dt as q,Ee as r,bt as s,P as t,_t as u,Ft as v,Et as w,yt as x};
@@ -1 +0,0 @@
1
- import{c as G,r as k,m as Q,j as t,b as X,B as I,k as Z,t as W}from"./index-BphIXXOp.js";import{i as _}from"./XCircle-jlAhwcDu.js";import{b6 as K,C as U}from"./agent-icon-BnyLUh_P.js";import{n as tt}from"./LinkExternal01-Do6tmctI.js";import{A as ot,a as et,b as rt,c as it,d as st,e as at,f as nt,g as mt}from"./alert-dialog-Cqq7FgQj.js";import{I as H}from"./input-9TNY2G6W.js";import{L as J}from"./label-DhJo3WjY.js";import{F as lt,R as pt,T as ct,al as dt,J as ut,V as A,Y as gt,am as xt,W as ft}from"./index-BaWtU9eb.js";import{c as ht,B as yt,a as bt}from"./block-document-ChYHEJUH.js";import{u as jt}from"./use-autosave-C7alUjY0.js";import{t as vt}from"./ChevronDown-BOc1-i9L.js";import{af as Et,ag as Ct,ae as Nt}from"./automation-runs-nfuxnSim.js";import{s as j,E as St}from"./primitives-QfIbZaez.js";import"./AlertCircle-CeleFBrs.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./Tool02-B8GwG_SX.js";import"./ArrowUpRight-C0hTvHTE.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./Users03-DP3zwt6-.js";import"./CheckCircle-D-nlOrXB.js";import"./Check-BdzjeMXF.js";import"./ChevronRight-wqbYwiLF.js";import"./ChevronUp-IHCmvX3E.js";import"./DotsVertical-Bohq38Q1.js";import"./Stars02-CH68Qhm_.js";import"./Copy01-DIJvVGQk.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Settings02-CpRid7rG.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./Key01-CRQOB5O_.js";import"./LayoutLeft-DZwVeKk1.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./Play-Yhg2bDxR.js";import"./Plus-CgXuzVCT.js";import"./SearchLg-CYNvKytJ.js";import"./SearchMd-BOeEZKFu.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Trash01-COMthlp3.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./X-Bfx6rO6W.js";import"./Zap-li0rR-RI.js";import"./chat-context--S2eGI2t.js";import"./tab-id-BJUTVZdl.js";import"./dialog-C2XtKj4W.js";import"./hooks-Cd2G3711.js";import"./use-mcp-client-DKcZ7v-W.js";import"./auth-tEJ4bybR.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-IokMTZJW.js";import"./use-ai-providers-BezO2qdd.js";import"./studio-tools-BoD8kcA1.js";import"./use-decopilot-events-D7YXko6B.js";import"./use-organization-settings-C62jhu_V.js";import"./spinner-Cbrhyipt.js";import"./tooltip-BfkRKScU.js";import"./drawer-HtUPoolZ.js";import"./collection-search-H6c7ia6t.js";import"./use-mobile-C0XoguQx.js";import"./chart-Dtka3CXu.js";import"./index-BRjr3L_N.js";import"./shell-layout-DIvwZhUJ.js";import"./avatar-BqAz0FLa.js";import"./required-auth-layout-DYO8_0ig.js";import"./use-org-sso-8p_mXDai.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./form-CMuk1nXb.js";import"./select-COjQ5V-V.js";import"./tabs-D-7lRbur.js";import"./toggle-group-5LW11eFN.js";import"./use-commerce-diagnostic-B54oYyoh.js";import"./sidebar-Dckv7Gxe.js";import"./popover-BV2Ziop4.js";import"./self-tool-result-DA97K7F2.js";import"./integration-icon-CGwCrGIc.js";import"./extract-connection-data-V948FMyj.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-D880nDlC.js";import"./authenticate-and-persist-oauth-CqRX86RU.js";import"./mcp-oauth--A5K-xL8.js";import"./track-CG8KgfQd.js";import"./toolbar-Q0b8veSU.js";import"./skeleton-C_J-aMdg.js";import"./github-repo-picker-DjVb6-0i.js";import"./use-connection-B5TzA1Ut.js";import"./use-mcp-tools-B4aUfPof.js";import"./use-navigate-to-agent-Cxg9_mL_.js";import"./reusable-new-chat-CouMjkYR.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-DSX5zHxO.js";import"./use-registry-connections-C82adOhA.js";import"./useInfiniteQuery-ewuCizNF.js";import"./use-infinite-scroll-A-tTatQb.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CooN3E-v.js";import"./textarea-CosQp1Ex.js";import"./connection-form-helpers-B07wLptq.js";import"./collection-tabs-BqnoVI6Y.js";import"./badge-D24p8Xxi.js";import"./useSuspenseInfiniteQuery-BvX-6eAF.js";import"./command-DhvOaMnH.js";import"./index-Dwrgaiv3.js";import"./use-clock-tick-BlWbr6nY.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-open-billing-url-BwHZpmU9.js";import"./select-model-B5IdH_n6.js";import"./checkbox-BqtDvsR1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BN0IrtYX.js";import"./cards-CxCBBMfu.js";import"./dropdown-menu-Buaqq-Fn.js";import"./file-type-icon-BSAnhEu5.js";import"./question-004-sINsf4GQ.js";import"./use-members-Dypq7HzL.js";import"./use-org-auth-client-CEm0cNyU.js";import"./use-status-sounds-Df1zE4-g.js";import"./empty-state-Bd3g-2FH.js";import"./types-BGHf5GHQ.js";import"./use-capability-mz-0XBoJ.js";import"./use-file-configs-C4oqeXep.js";import"./monaco-editor-BMLOnDLJ.js";import"./pt-BR-CLy76QW2.js";import"./switch-b-8BZDWJ.js";import"./use-debounced-autosave-BHPvlnZn.js";import"./index-BKOwC_zz.js";import"./search-input-ChJAF9CO.js";import"./index-DNa-ZV66.js";import"./use-secrets-CXv4Or8y.js";import"./AreaChart-Cr68R9KD.js";import"./use-copy-BEi_L0rW.js";import"./use-tags-DBhn0x6Q.js";import"./get-initials-D-f_fDFw.js";import"./use-automations-BB8THpxC.js";import"./automation-list-row-BN46j3bE.js";import"./use-org-repo-syncs-DCxfKVxi.js";import"./table-CfpVPCrj.js";function wt(y){const o=G.c(18),{icon:u,title:n,defaultOpen:v,children:g}=y,P=v===void 0?!1:v,[x,D]=k.useState(P);let m;o[0]!==u?(m=t.jsx(u,{size:15}),o[0]=u,o[1]=m):m=o[1];let r;o[2]!==n?(r=t.jsx("span",{className:"flex-1 text-left",children:n}),o[2]=n,o[3]=r):r=o[3];const a=x&&"rotate-180";let l;o[4]!==a?(l=Q("transition-transform",a),o[4]=a,o[5]=l):l=o[5];let p;o[6]!==l?(p=t.jsx(vt,{size:15,className:l}),o[6]=l,o[7]=p):p=o[7];let i;o[8]!==m||o[9]!==r||o[10]!==p?(i=t.jsx(Et,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[m,r,p]})}),o[8]=m,o[9]=r,o[10]=p,o[11]=i):i=o[11];let c;o[12]!==g?(c=t.jsx(Ct,{className:"px-2 pt-4",children:g}),o[12]=g,o[13]=c):c=o[13];let f;return o[14]!==x||o[15]!==i||o[16]!==c?(f=t.jsxs(Nt,{open:x,onOpenChange:D,className:"mt-4",children:[i,c]}),o[14]=x,o[15]=i,o[16]=c,o[17]=f):f=o[17],f}function Nr({orgSlug:y,virtualMcpId:o,branch:u,blockKey:n,block:v,decofile:g,meta:P,onManagePosts:x,onOpenPost:D,previewBaseUrl:m}){const r=X(),a=lt({orgSlug:y,virtualMcpId:o,branch:u}),l=pt({orgSlug:y,virtualMcpId:o,branch:u}),p=ct(v,"categories"),[i,c,f]=jt(p,e=>{a.mutate({blockKey:n,data:A(n,"categories",e)})}),E=(e,w)=>c({...i,[e]:w}),T=ht({decofile:g,category:i,previewBaseUrl:m,draftPointer:l}),s=j(i.slug),[B,b]=k.useState(s),[d,C]=k.useState(null),[N,z]=k.useState(!1),F=s?dt(g).filter(e=>e.categorySlugs.includes(s)):[],S=F.length,M=e=>E("slug",e),V=async(e,w)=>{const q=j(i.name);z(!0);try{let h=0;for(const{key:O,payload:L}of gt(g,"posts")){const $=xt(L,e,{name:q,slug:w});$!==L&&(await a.mutateAsync({blockKey:O,data:A(O,"posts",ft($))}),h+=1)}const R={...i,slug:w};await a.mutateAsync({blockKey:n,data:A(n,"categories",R)}),f(R),W.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),C(null)}catch(h){b(e),C(null),W.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},Y=()=>{const e=B.trim();if(e===s){B!==e&&b(e);return}if(!e){b(s);return}if(S===0){M(e);return}C({oldSlug:s,newSlug:e,count:S})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:j(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(ut,{isPending:a.isPending,isError:a.isError}),T&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(T,"_blank","noopener,noreferrer"),children:[t.jsx(tt,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(St,{value:j(i.name),onChange:e=>E("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(J,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(H,{id:"category-slug",value:B,onChange:e=>b(e.target.value),onBlur:Y,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(J,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(H,{id:"category-description",value:j(i.description),onChange:e=>E("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(wt,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(yt,{value:bt(i.sections),onChange:e=>E("sections",e),meta:P,sandboxRef:{orgSlug:y,virtualMcpId:o,branch:u},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(S)})})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>x(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(_,{size:14})]})]}),S>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:F.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(ot,{open:!!d,onOpenChange:e=>{e||N||(b(s),C(null))},children:t.jsxs(et,{children:[t.jsxs(rt,{children:[t.jsx(it,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(st,{children:d?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:d.oldSlug,newSlug:d.newSlug,count:String(d.count)}):null})]}),t.jsxs(at,{children:[t.jsx(nt,{disabled:N,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(mt,{onClick:e=>{e.preventDefault(),d&&V(d.oldSlug,d.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Z,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{Nr as CategoryEditor};
@@ -1 +0,0 @@
1
- import{c as k,j as t,B as K,k as oe,X as Ye,Z as re,b as W,E as Ee,r as E,F as fe,bb as Ze,bc as Re,$ as Ge,m as Q,bd as et,u as tt,L as te,t as st,f as he,be as Oe}from"./index-BphIXXOp.js";import{E as Fe}from"./empty-state-Bd3g-2FH.js";import{u as ge}from"./use-mcp-client-DKcZ7v-W.js";import{d as ae,F as lt,a as ce,b as de}from"./form-CMuk1nXb.js";import{I as pe}from"./input-9TNY2G6W.js";import{T as xe}from"./textarea-CosQp1Ex.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-CPCOiQxX.js";import{aP as at,U as ct,aQ as dt,al as mt,an as ut,aR as pt,u as ye}from"./agent-icon-BnyLUh_P.js";import{g as xt,M as ft,a as we}from"./types-BGHf5GHQ.js";import{A as ht,a as gt,b as jt}from"./alert-1MxwzRCP.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-COjQ5V-V.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-BfkRKScU.js";import{i as Nt}from"./AlertCircle-CeleFBrs.js";import{s as vt}from"./Stars02-CH68Qhm_.js";import{a as St}from"./Copy01-DIJvVGQk.js";import{i as yt}from"./Play-Yhg2bDxR.js";import{i as wt}from"./ChevronRight-wqbYwiLF.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./index-DNa-ZV66.js";import{a as ze,u as Me}from"./use-connection-B5TzA1Ut.js";import{a as Tt}from"./use-mcp-tools-B4aUfPof.js";import{M as Pt,c as kt}from"./monaco-editor-BMLOnDLJ.js";import{I as De}from"./integration-icon-CGwCrGIc.js";import{k as At,D as Dt}from"./chat-context--S2eGI2t.js";import{u as Et}from"./shell-layout-DIvwZhUJ.js";import{n as Rt}from"./Tool02-B8GwG_SX.js";import"./auth-tEJ4bybR.js";import"./label-DhJo3WjY.js";import"./index-BKOwC_zz.js";import"./sidebar-Dckv7Gxe.js";import"./LayoutLeft-DZwVeKk1.js";import"./use-mobile-C0XoguQx.js";import"./X-Bfx6rO6W.js";import"./Key01-CRQOB5O_.js";import"./extract-connection-data-V948FMyj.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-C82adOhA.js";import"./use-organization-settings-C62jhu_V.js";import"./studio-tools-BoD8kcA1.js";import"./Plus-CgXuzVCT.js";import"./index-BRjr3L_N.js";import"./index-Dwrgaiv3.js";import"./popover-BV2Ziop4.js";import"./use-virtual-mcp-IokMTZJW.js";import"./Check-BdzjeMXF.js";import"./SearchMd-BOeEZKFu.js";import"./Users03-DP3zwt6-.js";import"./use-create-virtual-mcp-BfQJXcoA.js";import"./use-navigate-to-agent-Cxg9_mL_.js";import"./hooks-Cd2G3711.js";import"./decopilot-sse-pool-U92pbu07.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./XCircle-jlAhwcDu.js";import"./ArrowUpRight-C0hTvHTE.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./CheckCircle-D-nlOrXB.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronUp-IHCmvX3E.js";import"./DotsVertical-Bohq38Q1.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Settings02-CpRid7rG.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./LinkExternal01-Do6tmctI.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./SearchLg-CYNvKytJ.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Trash01-COMthlp3.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./Zap-li0rR-RI.js";import"./badge-D24p8Xxi.js";import"./mcp-oauth--A5K-xL8.js";import"./spinner-Cbrhyipt.js";import"./tab-id-BJUTVZdl.js";import"./dialog-C2XtKj4W.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-BezO2qdd.js";import"./use-decopilot-events-D7YXko6B.js";import"./avatar-BqAz0FLa.js";import"./required-auth-layout-DYO8_0ig.js";import"./use-org-sso-8p_mXDai.js";function Ot(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=W();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=W(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Re(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Ot,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let R;return e[38]!==A||e[39]!==D||e[40]!==w?(R=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=R):R=e[41],R}function Lt(s){const e=k.c(10),{itemId:n}=s,l=W();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=Q("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=Q("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=W();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=W(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),R=ze(e),C=At(),I=Dt(),{openSidePanel:O}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(O("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,Qe=performance.now(),We=Math.round(Qe-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${We}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=W(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=Q("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:Q(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Oe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=k.c(52),e=Oe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=W(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Re(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Qt(i),s[14]=i,s[15]=D):D=s[15];const R=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(O=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(Y,{children:t.jsx(Ue,{children:R})}),s[24]=R,s[25]=U):U=s[25];let z;s[26]!==O||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Rt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=W();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
@@ -1 +0,0 @@
1
- import{c as N,b as Q,j as o,m as Te,p as ue,B as Ne,u as Xe,r as Y,a as Ae,q as st,d as nt,s as lt,e as Ze,v as Ee,w as Se,Q as at,E as ct,K as He,x as Be,N as mt}from"./index-BphIXXOp.js";import{L as dt,s as Me,S as We,C as qe,i as ut,n as ze,a as et,p as Le}from"./self-tool-result-DA97K7F2.js";import{A as gt}from"./auth-entry-Dc1zlPtG.js";import{A as ft}from"./auth-split-layout-C945ZTK3.js";import{O as Ve}from"./organization-choice-T8a5zIBy.js";import{r as pt}from"./track-CG8KgfQd.js";import{I as ht}from"./input-9TNY2G6W.js";import{D as bt,a as Ke,b as xt,c as yt}from"./dropdown-menu-Buaqq-Fn.js";import{S as Ct,u as jt,W as Ot,g as vt,a as St}from"./use-mcp-client-DKcZ7v-W.js";import{i as _t}from"./XCircle-jlAhwcDu.js";import{i as wt}from"./ArrowUpRight-C0hTvHTE.js";import"./alert-dialog-Cqq7FgQj.js";import"./form-CMuk1nXb.js";import"./label-DhJo3WjY.js";import"./spinner-Cbrhyipt.js";import"./integration-icon-CGwCrGIc.js";import"./Tool02-B8GwG_SX.js";import"./agent-icon-BnyLUh_P.js";import"./AlertCircle-CeleFBrs.js";import"./Tool01-BLxK-7k7.js";import"./ArrowUp-PM43ttWN.js";import"./ArrowLeft-CwsJ1Sfc.js";import"./TrendUp01-Pa_0KlRB.js";import"./ZapSquare-Gxca0Ylc.js";import"./Users03-DP3zwt6-.js";import"./CheckCircle-D-nlOrXB.js";import"./Check-BdzjeMXF.js";import"./ChevronDown-BOc1-i9L.js";import"./ChevronRight-wqbYwiLF.js";import"./ChevronUp-IHCmvX3E.js";import"./DotsVertical-Bohq38Q1.js";import"./Stars02-CH68Qhm_.js";import"./Copy01-DIJvVGQk.js";import"./CreditCard01-W4m_wy49.js";import"./Globe01-DEX4B2yM.js";import"./Settings02-CpRid7rG.js";import"./Eye-C5vDWwaK.js";import"./FilterLines-C9pmu5SZ.js";import"./Share07-B14EYmF_.js";import"./Globe04-CDJqKwdP.js";import"./SwitchHorizontal01-DOmwqeXB.js";import"./HardDrive-BicURFt0.js";import"./Key01-CRQOB5O_.js";import"./LayoutLeft-DZwVeKk1.js";import"./LinkExternal01-Do6tmctI.js";import"./LockUnlocked01-BxK9l3CJ.js";import"./LogOut01-DhAdDNkV.js";import"./Monitor01-BKGGKBRj.js";import"./Sun-CjcZKPaq.js";import"./Palette-5WrpEUaC.js";import"./Play-Yhg2bDxR.js";import"./Plus-CgXuzVCT.js";import"./SearchLg-CYNvKytJ.js";import"./SearchMd-BOeEZKFu.js";import"./Shield01-DS1CkOm5.js";import"./Stars01-CPDNiFNQ.js";import"./Trash01-COMthlp3.js";import"./Upload01-DO7DRGUd.js";import"./User01-C2rVZTl-.js";import"./Users01-ClsBMo4K.js";import"./XClose-DdXn46Em.js";import"./X-Bfx6rO6W.js";import"./Zap-li0rR-RI.js";import"./dialog-C2XtKj4W.js";import"./tooltip-BfkRKScU.js";import"./extract-connection-data-V948FMyj.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-D880nDlC.js";import"./authenticate-and-persist-oauth-CqRX86RU.js";import"./mcp-oauth--A5K-xL8.js";import"./auth-tEJ4bybR.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-BqAz0FLa.js";const Qe={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ge=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function De({siteUrl:t,email:e,locale:s}){const i=(s&&Qe[s])??Qe["pt-BR"]??"https://decocms.com/agendar",r=new URL(i);return t&&r.searchParams.set("siteUrl",t),e&&r.searchParams.set("email",e),r.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:r,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==r?(c=Te("w-full",r),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(wt,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=o.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=o.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,r=Q();let l;e[0]!==r?(l=r("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=r,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ge.map((f,p)=>o.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ge.length-p},children:[o.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:o.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&o.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[o.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),o.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=o.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,r=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"-mt-9 mb-4",children:o.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==r?(n=r("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==n?(c=o.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==r?(m=r("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=r,e[7]=m):m=e[7];let d;e[8]!==m?(d=o.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=o.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=o.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=o.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:o.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,o.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let r,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=o.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=r,e[1]=l,e[2]=a):(r=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=o.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:o.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=o.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=o.jsxs("div",{className:"flex items-center gap-3",children:[r,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let r;e[0]!==i||e[1]!==s?(r=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r;let a;return e[3]!==l?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(dt,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function uo(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Lt,{}),t[0]=e):e=t[0],e}const rt=Y.createContext(null),ot=()=>Y.useContext(rt);function Pt(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==i?(r=o.jsx(bt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=r):r=t[1];let l;t[2]!==s?(l=()=>{s(Rt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Te(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=o.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(It)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Te(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=o.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=o.jsxs(xt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==r||t[20]!==p?(O=o.jsxs(yt,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=O):O=t[21],O}function It(t){return{...t,language:"pt-BR"}}function Rt(t){return{...t,language:"en"}}function B(t){const e=N.c(17);let s,i,r;e[0]!==t?({visual:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=Ae.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=De({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==r?(f=r??o.jsx(Fe,{href:u}),e[9]=u,e[10]=r,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Pt,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=o.jsxs(ft,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function zt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Ye(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Me(s);if(!Je&&st()){Je=!0;const r=pt(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...r,...i?{$set:{last_scanned_domain:i}}:{}})}return o.jsx(rt.Provider,{value:i,children:o.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),{data:l,isPending:a}=Ae.useSession(),n=ot();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(B,{children:o.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==r?(d=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?o.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==r?(f=zt(r),e[5]=r,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=o.jsx(B,{children:o.jsx(gt,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=o.jsx(Tt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Tt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),l=nt(),a=lt(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(At)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Mt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(B,{children:o.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==r?(g=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=g):g=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=o.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==r?(g=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=g):g=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=o.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=o.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=g):g=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=o.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==r?(b=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let T;e[49]===Symbol.for("react.memo_cache_sentinel")?(T=()=>f(!0),e[49]=T):T=e[49];let z;e[50]!==r?(z=r("routes.commerceOnboarding.createNewOrg"),e[50]=r,e[51]=z):z=e[51];let R;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==z?(R=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:T,createNewLabel:z})}),e[52]=p,e[53]=b,e[54]=_,e[55]=z,e[56]=R):R=e[56];let U;e[57]!==x||e[58]!==R?(U=o.jsxs("div",{className:"grid gap-10",children:[x,R]}),e[57]=x,e[58]=R,e[59]=U):U=e[59];let M;e[60]!==l||e[61]!==i?(M=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=M):M=e[62];let P;e[63]!==u||e[64]!==M?(P=o.jsx(qe,{open:u,onOpenChange:f,onCreated:M}),e[63]=u,e[64]=M,e[65]=P):P=e[65];let L;return e[66]!==U||e[67]!==P?(L=o.jsxs(B,{children:[U,P]}),e[66]=U,e[67]=P,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=o.jsx(Dt,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=o.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[77]=r,e[78]=g):g=e[78];let h;e[79]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=r,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=o.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let T;e[84]!==l||e[85]!==i?(T=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=T):T=e[86];let z;e[87]===Symbol.for("react.memo_cache_sentinel")?(z=()=>f(!0),e[87]=z):z=e[87];let R;e[88]!==r?(R=r("routes.commerceOnboarding.createNewOrg"),e[88]=r,e[89]=R):R=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==T||e[93]!==R?(U=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:b,domain:_,onJoined:T,onCreateNew:z,createNewLabel:R})}),e[90]=C.organizations,e[91]=_,e[92]=T,e[93]=R,e[94]=U):U=e[94];let M;e[95]!==U||e[96]!==x?(M=o.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=M):M=e[97];let P;e[98]!==l||e[99]!==i?(P=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=P):P=e[100];let L;e[101]!==u||e[102]!==P?(L=o.jsx(qe,{open:u,onOpenChange:f,onCreated:P}),e[101]=u,e[102]=P,e[103]=L):L=e[103];let j;return e[104]!==M||e[105]!==L?(j=o.jsxs(B,{children:[M,L]}),e[104]=M,e[105]=L,e[106]=j):j=e[106],j}let I;e[107]!==r?(I=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=r,e[108]=I):I=e[108];let E;e[109]!==C?.error||e[110]!==r?(E=C?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=r,e[111]=E):E=e[111];let A;e[112]!==r?(A=r("routes.commerceOnboarding.retryAgain"),e[112]=r,e[113]=A):A=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==I||e[117]!==E||e[118]!==A||e[119]!==W?(q=o.jsx(_e,{title:I,description:E,actionLabel:A,onRetry:W}),e[116]=I,e[117]=E,e[118]=A,e[119]=W,e[120]=q):q=e[120],q}async function Mt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Se(),e}function At(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Dt(t){const e=N.c(16),{mutation:s,onRetry:i}=t,r=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==r?(d=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=d):d=e[3];let u;e[4]!==r?(u=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=u):u=e[5];let f;e[6]!==r?(f=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=o.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=o.jsx(B,{children:o.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,r=ot();let l;e[0]!==r?(l=r?o.jsx(tt,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&o.jsxs("div",{className:"space-y-2",children:[s&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=o.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:r,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=o.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==r||e[4]!==l?(n=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=o.jsx(B,{children:o.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,r=Q(),{data:l}=Ae.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=De({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=o.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==r?(f=o.jsx(at,{children:p=>{const{reset:O}=p;return o.jsx(ct,{fallback:v=>{const{error:w,resetError:C}=v;return o.jsx(B,{visual:u,children:o.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:o.jsx(Y.Suspense,{fallback:o.jsx(it,{visual:u}),children:o.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=r,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(J,{}),o.jsx(et,{})]}),e[0]=i):i=e[0];let r;return e[1]!==s?(r=o.jsx(B,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=r):r=e[2],r}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:r}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=o.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=o.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==r||e[13]!==d?(u=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:r,children:d}),e[12]=r,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=o.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:r}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ct,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=Ot.COMMERCE_DISCOVERY(s.id),p=vt(s.id),O=He.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=Be(w),I=He.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let A;e[12]!==I||e[13]!==E?(A={queryKey:I,queryFn:E,retry:!1},e[12]=I,e[13]=E,e[14]=A):A=e[14];const W=Be(A);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Me(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Me(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,T=C.data.item,z=typeof T?.metadata?.siteUrl=="string"?T.metadata.siteUrl:void 0,R=i||n||"";let U;e[27]!==z||e[28]!==R?(U=ut(R,z),e[27]=z,e[28]=R,e[29]=U):U=e[29];const P=_&&U,L=i||n||z||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==r?(Z=De({siteUrl:L,email:r,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=r,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=o.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Ye(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const H=fe;let pe;e[40]!==b?(pe=y=>{const S=ze(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==P?(he=y=>{!y||u.current||P||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=P,e[45]=he):he=e[45];const Pe=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=ze(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(P){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let D;e[53]!==s.id?(D=St(s.id),e[53]=s.id,e[54]=D):D=e[54];const G=L||void 0;let F;e[55]!==D.id||e[56]!==G?(F={virtualmcpid:D.id,connect:"1",siteUrl:G},e[55]=D.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=o.jsx(mt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=o.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,D,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==H||e[71]!==Pe){ne=Symbol.for("react.early_return_sentinel");e:{const Ie=ze(i);if(!Ie.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=o.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==H?(je=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=H,e[92]=je):je=e[92];const Re=o.jsxs("div",{className:"grid gap-10",children:[Ce,o.jsx(we,{message:Ye(j,Ie.error)}),je]});let Oe;e[93]!==$||e[94]!==Re?(Oe=o.jsx(B,{visual:$,children:Re}),e[93]=$,e[94]=Re,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=B,K=$,G=Pe,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],D=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Ie.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=H,e[71]=Pe,e[72]=y,e[73]=S,e[74]=k,e[75]=D,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],D=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==D?(le=o.jsx(y,{title:k,description:D}),e[98]=y,e[99]=k,e[100]=D,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==H?(ae=H?o.jsxs(o.Fragment,{children:[o.jsx(we,{message:H}),o.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):o.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=H,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=o.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=o.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let re;e[118]!==s.name||e[119]!==j?(re=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=re):re=e[120];let oe;e[121]!==te||e[122]!==re?(oe=o.jsx(J,{title:te,description:re}),e[121]=te,e[122]=re,e[123]=oe):oe=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==H?(ie=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=H,e[128]=ie):ie=e[128];let se;e[129]!==oe||e[130]!==ie?(se=o.jsxs("div",{className:"grid gap-10",children:[oe,ie]}),e[129]=oe,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=o.jsx(B,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:r,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=A=>l(A.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==r||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=o.jsx(ht,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:r}),e[8]=r,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?o.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=o.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(_t,{size:16}),e[22]=C):C=e[22];let I;e[23]!==r||e[24]!==w?(I=o.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[w,C]}),e[23]=r,e[24]=w,e[25]=I):I=e[25];let E;return e[26]!==a||e[27]!==I||e[28]!==v?(E=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,I]}),e[26]=a,e[27]=I,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{uo as default};