decocms 4.120.0 → 4.122.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 (243) hide show
  1. package/dist/client/assets/{AlertCircle-fg3Hgsgz.js → AlertCircle-BVcbGU63.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CGiiBbMe.js → AreaChart-BOEksfko.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-CV0xQASq.js → ArrowRight-CKlvyIoh.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CJNj-lbc.js → ArrowUp-zrMcuXAr.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-B75b68J3.js → ArrowUpRight-BRtGTw6u.js} +1 -1
  6. package/dist/client/assets/{Check-BVao786V.js → Check-K9ygl0O6.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-IniJIcWw.js → CheckCircle-Ddtle1Hu.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-DPpeNPF5.js → ChevronDown-ivzZdE8w.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-CrBdlf5g.js → ChevronRight-wehtSt4J.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DYGKOdBy.js → ChevronUp-DtesMDJI.js} +1 -1
  11. package/dist/client/assets/{Copy01-Cz2rkjLR.js → Copy01-B2yggp1R.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-3GQ99jGv.js → DotsVertical-0w0ZkjcP.js} +1 -1
  13. package/dist/client/assets/{Eye-DTXEp_Op.js → Eye-CZVpzZj3.js} +1 -1
  14. package/dist/client/assets/{FilterLines-Cz9hbnJD.js → FilterLines-xmnqgD9Q.js} +1 -1
  15. package/dist/client/assets/{Globe01-CLxc6flB.js → Globe01-dnwQ58ni.js} +1 -1
  16. package/dist/client/assets/{Globe04-DkANX7p7.js → Globe04-C5N1Fi_a.js} +1 -1
  17. package/dist/client/assets/{HardDrive-z8I8Njjc.js → HardDrive-BP9_iF3o.js} +1 -1
  18. package/dist/client/assets/{Image01-DRgtbsjP.js → Image01-CTFJ4q_z.js} +1 -1
  19. package/dist/client/assets/{Key01-DTsWUBNB.js → Key01-DXv7srOu.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DGux0aXO.js → LayoutLeft-BPQ9stJD.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-DS_UHiRd.js → LinkExternal01-BktZyAnv.js} +1 -1
  22. package/dist/client/assets/{LogOut01-C8eH_07W.js → LogOut01-BDBTSoW6.js} +1 -1
  23. package/dist/client/assets/{Monitor01-XNX3vHJ4.js → Monitor01-7QFBOkji.js} +1 -1
  24. package/dist/client/assets/{Package-3iqcIf7w.js → Package-D8m71yLY.js} +1 -1
  25. package/dist/client/assets/{Palette-B2Z8mdAl.js → Palette-DWy3dzj0.js} +1 -1
  26. package/dist/client/assets/{Play-BftNxqXw.js → Play-lriwSM0x.js} +1 -1
  27. package/dist/client/assets/{Plus-CP-BI904.js → Plus-DQlLKoK7.js} +1 -1
  28. package/dist/client/assets/{SearchLg-Bbkgfm53.js → SearchLg-CoOX4SoC.js} +1 -1
  29. package/dist/client/assets/{SearchMd-DCdN8sFZ.js → SearchMd-Dg6mSNN_.js} +1 -1
  30. package/dist/client/assets/{Settings02-B2Q1F7yN.js → Settings02-BrQ1R_C3.js} +1 -1
  31. package/dist/client/assets/{Shield01-BZW1dWy4.js → Shield01-BeZ6Sg4x.js} +1 -1
  32. package/dist/client/assets/{Star01-TgpbQ1ki.js → Star01-DkiTL7fS.js} +1 -1
  33. package/dist/client/assets/{Stars01-5bOGRLFK.js → Stars01-DTVv_6xg.js} +1 -1
  34. package/dist/client/assets/{Stars02-DsiBetQn.js → Stars02-Rv7Zpq5p.js} +1 -1
  35. package/dist/client/assets/{Sun-DdoghNKG.js → Sun-DIwJT6kw.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-CFoLDY1q.js → SwitchHorizontal01-YOHN8l_Y.js} +1 -1
  37. package/dist/client/assets/{Tool01-Cp_FNZn9.js → Tool01-zKnvH-kk.js} +1 -1
  38. package/dist/client/assets/{Tool02-ByyTEcad.js → Tool02-a1QDD1BE.js} +1 -1
  39. package/dist/client/assets/{Trash01-jY1Npbiv.js → Trash01-CvmXP6ap.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-BDzOq-pH.js → TrendUp01-DbtFTYSl.js} +1 -1
  41. package/dist/client/assets/{Upload01-BJ-q-gLK.js → Upload01-Ur6u-B1R.js} +1 -1
  42. package/dist/client/assets/{User01-DiO_9L3k.js → User01-ELT05I_C.js} +1 -1
  43. package/dist/client/assets/{Users01-OTsRlXmF.js → Users01-DmKZlyCu.js} +1 -1
  44. package/dist/client/assets/{Users03-BowsdXcq.js → Users03-B2Rmdg8K.js} +1 -1
  45. package/dist/client/assets/{X-BnBYCjCN.js → X-DjQw217D.js} +1 -1
  46. package/dist/client/assets/{XCircle-7b_0pmj2.js → XCircle-BNVPuHya.js} +1 -1
  47. package/dist/client/assets/{XClose-B06L-PJc.js → XClose-BO1Lwhh7.js} +1 -1
  48. package/dist/client/assets/{Zap-Cf3B8XV9.js → Zap-C4HzUZ29.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-DmNcoydg.js → ZapSquare-CqrPlIO3.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-RylsG63M.js → ZoomOut-CAsxnm2x.js} +1 -1
  51. package/dist/client/assets/{access-gate-CHPOB4DQ.js → access-gate-uwgBtsBP.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-CPqee7Gd.js → add-section-modal-fmj_3SB_.js} +1 -1
  53. package/dist/client/assets/{agent-icon-DEBdQzV-.js → agent-icon-B2LgmiRt.js} +1 -1
  54. package/dist/client/assets/{agents-list-CZmpbfIJ.js → agents-list-DgcidbX7.js} +1 -1
  55. package/dist/client/assets/{ai-providers-DaxrLXdH.js → ai-providers-CERVG5fP.js} +1 -1
  56. package/dist/client/assets/{alert-NHdpWhdG.js → alert-2pYy2aRx.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-DKTyYqPU.js → alert-dialog-BsAEBtVk.js} +1 -1
  58. package/dist/client/assets/{app-editor-XgV22Fb6.js → app-editor-DgQfdAPl.js} +1 -1
  59. package/dist/client/assets/{auth-B6AFPxXM.js → auth-BbZNerdw.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-DVgY_sea.js → auth-catchall-3qQJZ3DD.js} +1 -1
  61. package/dist/client/assets/{auth-entry-DtBSX81T.js → auth-entry-tAavwvU4.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-BrR_HavC.js → auth-split-layout-DBnc8xhv.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-CigV4fJB.js → authenticate-and-persist-oauth-BUz0jLWA.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-BUA1PWG-.js → automation-list-row-CnMPr30w.js} +1 -1
  65. package/dist/client/assets/{automation-runs-CHryRYGN.js → automation-runs-qvWRqyqv.js} +1 -1
  66. package/dist/client/assets/automations-Dg-olwgA.js +1 -0
  67. package/dist/client/assets/{autosend-C2FZ13WA.js → autosend-BeIUwx1c.js} +1 -1
  68. package/dist/client/assets/{avatar-SVXA5K0_.js → avatar-B1FBqiPq.js} +1 -1
  69. package/dist/client/assets/{badge-BhXxSdh-.js → badge-8mmmFMes.js} +1 -1
  70. package/dist/client/assets/{block-document-DVinVbQY.js → block-document-NADzTy6R.js} +1 -1
  71. package/dist/client/assets/{brand-context-B3TnBDpP.js → brand-context-mtl0KcSc.js} +1 -1
  72. package/dist/client/assets/{buckets-Cvv5XH38.js → buckets-CU5R4UIm.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-H3u2Wl76.js → bulk-category-panel-KIgh2LVc.js} +1 -1
  74. package/dist/client/assets/{calendar-Bmjk91KZ.js → calendar-BYOoZCNu.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-Cjc3H0wk.js → capability-load-error-B3Yd05Zp.js} +1 -1
  76. package/dist/client/assets/{card-v9JJ51XL.js → card-CsVINvzI.js} +1 -1
  77. package/dist/client/assets/{category-editor-DfPl3Rqw.js → category-editor-CvpFkxzC.js} +1 -1
  78. package/dist/client/assets/{chat-context-CmQVFNlq.js → chat-context-DG5VMA6B.js} +5 -5
  79. package/dist/client/assets/{checkbox-qmL4ziNo.js → checkbox-CAW6yy-f.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-vd22O4Qi.js → cli-auth-success-B6BWMPYn.js} +1 -1
  81. package/dist/client/assets/{collection-detail-mMy6QI8J.js → collection-detail-0HHoB7Wa.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-kIDQNRwZ.js → collection-display-button-CO7gLnSL.js} +1 -1
  83. package/dist/client/assets/{collection-search-C364-hfY.js → collection-search-HTEknyDM.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-DtxkpLE8.js → collection-table-wrapper-MD0_mE3R.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-BCnplQCF.js → collection-tabs-Cu0giObB.js} +1 -1
  86. package/dist/client/assets/{command-BoLqTMqI.js → command-BYmAVtGu.js} +1 -1
  87. package/dist/client/assets/commerce-onboarding-CdHE3DqV.js +1 -0
  88. package/dist/client/assets/companions-core-C84CnqsZ.js +1 -0
  89. package/dist/client/assets/{connect-BxT8aRHN.js → connect-D3rtWj_4.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-C1OBxezk.js → connect-desktop-dialog-CVLI9IFZ.js} +1 -1
  91. package/dist/client/assets/{connection-card-B4ZK1nci.js → connection-card-CChyV7In.js} +1 -1
  92. package/dist/client/assets/{connection-detail-4_4n5HEk.js → connection-detail-Bg9BuBrs.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-VqgbDDwv.js → connection-form-helpers-BsaAWJ8U.js} +1 -1
  94. package/dist/client/assets/{connections-LJS4Kxru.js → connections-C9JbsGCi.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-DQp3v72-.js → decopilot-sse-pool-DWTCLkf7.js} +1 -1
  96. package/dist/client/assets/{dialog-CJJBIADb.js → dialog-C7PMQncq.js} +1 -1
  97. package/dist/client/assets/{domain-settings-RJFG1VSn.js → domain-settings-CwQ6FgAI.js} +1 -1
  98. package/dist/client/assets/{drawer-b0eCtWu6.js → drawer-D1Kw_X2C.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-Bn5pKJ7t.js → dropdown-menu-C3car2Q8.js} +1 -1
  100. package/dist/client/assets/{empty-state-BQtWItQu.js → empty-state-B7ZzKn6B.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-D3bgaTlN.js → extract-connection-data-wIgwD813.js} +1 -1
  102. package/dist/client/assets/{file-explorer-Bef-DGBS.js → file-explorer-CmnYIvY2.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-Bvmb_MGY.js → file-type-icon-Cg3Nm1XZ.js} +1 -1
  104. package/dist/client/assets/{files-6gEV_rOK.js → files-DPifkXR8.js} +1 -1
  105. package/dist/client/assets/{form-B3EdZ9mI.js → form-zrd7LYxu.js} +1 -1
  106. package/dist/client/assets/{general-DWiJx-QQ.js → general-BmB5iylu.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-CAQXTAGE.js → github-repo-picker-CcvybfZV.js} +1 -1
  108. package/dist/client/assets/{hooks-dE0ApXsc.js → hooks-CxPB8UeZ.js} +1 -1
  109. package/dist/client/assets/{index-BqALxCoS.js → index-BGtGWsgH.js} +1 -1
  110. package/dist/client/assets/{index-BK2vPJeW.js → index-BZmVwpHk.js} +1 -1
  111. package/dist/client/assets/index-BkzI2YJo.css +1 -0
  112. package/dist/client/assets/{index-w8muf72g.js → index-C6BpFIWK.js} +1 -1
  113. package/dist/client/assets/{index-BXjYLNnL.js → index-CPojIfJr.js} +1 -1
  114. package/dist/client/assets/{index-D_tHc7Jk.js → index-Cb8ogyWE.js} +1 -1
  115. package/dist/client/assets/{index-hTZCk9Nc.js → index-CtckDipO.js} +1 -1
  116. package/dist/client/assets/{index-CwQyOcmL.js → index-DEfykvQ6.js} +1 -1
  117. package/dist/client/assets/{index-S0bapDuc.js → index-DSvM3i2U.js} +1 -1
  118. package/dist/client/assets/{index-BPEu29M9.js → index-DX-8pprv.js} +5 -5
  119. package/dist/client/assets/index-Dig78Jy9.js +8 -0
  120. package/dist/client/assets/{index-ynJXuI4v.js → index-DuYUqDOf.js} +1 -1
  121. package/dist/client/assets/index-DvEa4Fvr.js +1 -0
  122. package/dist/client/assets/{index-BkQeimZz.js → index-QzdsfBYd.js} +11 -11
  123. package/dist/client/assets/{index-redirect-DmFg2qFx.js → index-redirect-Pb6lGISE.js} +1 -1
  124. package/dist/client/assets/{input-BiKdrDt4.js → input-P-LUerq4.js} +1 -1
  125. package/dist/client/assets/{integration-icon-Ca9Ro_Zp.js → integration-icon-DB0SNVRE.js} +1 -1
  126. package/dist/client/assets/invite-member-dialog-CGMe2vvR.js +1 -0
  127. package/dist/client/assets/{label-DmHlHvvv.js → label-DNCggKDl.js} +1 -1
  128. package/dist/client/assets/{layout-GE_dLqBe.js → layout-DTJcqcHF.js} +1 -1
  129. package/dist/client/assets/{login-D0yTvnsh.js → login-BhaHlz0z.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-D6_LXaaB.js → mcp-oauth-aEWbqsXM.js} +1 -1
  131. package/dist/client/assets/{members-3BjwzZvC.js → members-PCbHjis6.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-CHc71gyn.js → monaco-editor-CTTjzlzK.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-DY4TNZ2g.js → monitoring-stats-row-Cz8AzIWJ.js} +1 -1
  134. package/dist/client/assets/{multi-select-B15Tx2X-.js → multi-select-BaubaUW1.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-DWdlTCDB.js → oauth-callback-2HSRTiii.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-BmeAl-Ru.js → oauth-callback-ai-provider-CBuRFGN7.js} +1 -1
  137. package/dist/client/assets/{onboarding-Dsmqo1qq.js → onboarding-CM2VMCK1.js} +1 -1
  138. package/dist/client/assets/{org-install-BMO6BfSY.js → org-install-GTqzYXN8.js} +1 -1
  139. package/dist/client/assets/{org-layout-B9AqO57e.js → org-layout-Dxs5EZzy.js} +1 -1
  140. package/dist/client/assets/{organization-choice-kIsUHSW2.js → organization-choice-CcqIPbFg.js} +1 -1
  141. package/dist/client/assets/{orgs-DmfYuUAW.js → orgs-BAxBwjH2.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-Bg072qTS.js → page-seo-form-DFcFiRHt.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-Cb3ncQL_.js +1 -0
  144. package/dist/client/assets/{popover-DlUyr22d.js → popover-1ACpRRoe.js} +1 -1
  145. package/dist/client/assets/{post-editor-CB2cRz8_.js → post-editor-BRl6XFlu.js} +1 -1
  146. package/dist/client/assets/{primitives-BJ54Y_N-.js → primitives-BDg7LeKI.js} +1 -1
  147. package/dist/client/assets/{profile-nrHryK5E.js → profile-CFpO-2Tz.js} +1 -1
  148. package/dist/client/assets/project-app-view-CQAJMpON.js +1 -0
  149. package/dist/client/assets/record-editor-BukgEZzD.js +1 -0
  150. package/dist/client/assets/redirect-editor-DNT93xia.js +1 -0
  151. package/dist/client/assets/registry-DEFqq62K.js +2 -0
  152. package/dist/client/assets/{registry-layout-DSMRed1o.js → registry-layout-CzJ79GRR.js} +1 -1
  153. package/dist/client/assets/{reports-CsY1KnwQ.js → reports-BSHwZlIz.js} +1 -1
  154. package/dist/client/assets/{require-capability-9Z4LuijU.js → require-capability-Dp0qTVxW.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-DjDm-MZU.js → required-auth-layout-Bf2ygqfO.js} +1 -1
  156. package/dist/client/assets/{reset-password-CGwLA89u.js → reset-password-Cr-rT1U0.js} +1 -1
  157. package/dist/client/assets/{roles-C0T6q4vi.js → roles-CQt6_mFB.js} +1 -1
  158. package/dist/client/assets/{search-input-CBo5Q2hW.js → search-input-CzVqrwgl.js} +1 -1
  159. package/dist/client/assets/{secrets-BXUgSu9p.js → secrets-Dgw-jCWn.js} +1 -1
  160. package/dist/client/assets/{sections-editor-Dd3jgwtT.js → sections-editor-Cnnis1lL.js} +1 -1
  161. package/dist/client/assets/{select-CS3PZAih.js → select-BL9zv-JP.js} +1 -1
  162. package/dist/client/assets/{select-model-ygA9ImYq.js → select-model-C52p56Qc.js} +1 -1
  163. package/dist/client/assets/self-tool-result-BbtpoGjo.js +1 -0
  164. package/dist/client/assets/{seo-editor-jCZmCqxi.js → seo-editor--8Xe31OX.js} +1 -1
  165. package/dist/client/assets/{settings-layout-Cb_6CL1S.js → settings-layout-CplRCtU8.js} +1 -1
  166. package/dist/client/assets/{settings-section-TOIy-AvH.js → settings-section-DidGbszQ.js} +1 -1
  167. package/dist/client/assets/{shell-controls-CgY0N6H5.js → shell-controls-XRYGqE-R.js} +1 -1
  168. package/dist/client/assets/{shell-layout-CXG-tHmv.js → shell-layout-3WAcXYR2.js} +1 -1
  169. package/dist/client/assets/{sidebar-D8HHeZss.js → sidebar-BAaF24ye.js} +1 -1
  170. package/dist/client/assets/{skeleton-CVTYCuar.js → skeleton-onz47XQi.js} +1 -1
  171. package/dist/client/assets/{sso-hKXH3nfg.js → sso-DLTxsRbf.js} +1 -1
  172. package/dist/client/assets/{store-BWHlMw7n.js → store-CEhJ3ho8.js} +1 -1
  173. package/dist/client/assets/store-registry-B7kPXz4u.js +2 -0
  174. package/dist/client/assets/{studio-tools-PCiFWXzm.js → studio-tools-BhhcZfev.js} +1 -1
  175. package/dist/client/assets/{switch-DpdYRWDf.js → switch-m3W7oBlX.js} +1 -1
  176. package/dist/client/assets/{table-eGpXezIB.js → table-BsyOuaNT.js} +1 -1
  177. package/dist/client/assets/{tabs-D_k8JeNb.js → tabs-BQp4xLjw.js} +1 -1
  178. package/dist/client/assets/{textarea-CbskhFAr.js → textarea-CkyHXuQm.js} +1 -1
  179. package/dist/client/assets/{toggle-group-DDIDXHac.js → toggle-group-C9YlqJGO.js} +1 -1
  180. package/dist/client/assets/{toolbar-CIYAVWlg.js → toolbar-DYjFUHXX.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-CCDyO390.js → toolbar-icon-button-DEXhPEY6.js} +1 -1
  182. package/dist/client/assets/{tooltip-6YXDmKdK.js → tooltip-D0dd9ydB.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-C10MkKcn.js → use-ai-providers-iWGeiPtA.js} +1 -1
  184. package/dist/client/assets/{use-api-keys-yffux9i3.js → use-api-keys-DGNPcQCu.js} +1 -1
  185. package/dist/client/assets/{use-automations-B9P_vduo.js → use-automations-DbG3Rylz.js} +1 -1
  186. package/dist/client/assets/{use-autosave-Dif7aSAn.js → use-autosave-CiUUhqUi.js} +1 -1
  187. package/dist/client/assets/{use-capability-BV4X85Oa.js → use-capability-BxZIF_3J.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-BIiUVnXR.js → use-clock-tick-BqpT3lz9.js} +1 -1
  189. package/dist/client/assets/{use-connection-ClzlwYHs.js → use-connection-B_ydhIaR.js} +1 -1
  190. package/dist/client/assets/{use-copy-DCwa-tM1.js → use-copy-DKPJm23R.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-Da-kR0iH.js → use-create-virtual-mcp-CMfpLhg7.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-Baq7uTDg.js → use-debounced-autosave-O_qaz61i.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-HVV3niP0.js → use-debounced-value-Jiqdx_qI.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-DiL93U4G.js → use-deco-credits-CaUme1US.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-CLphMNS8.js → use-decopilot-events-BYrGmZOI.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-59p8f7Tr.js → use-delete-connection-BFylMDGc.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-DKrpjkza.js → use-deployment-admin-Ur6VnLj1.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-BLKJU026.js → use-file-configs-D378SSra.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-Bqwo9W1I.js → use-infinite-scroll-Dl1pnFE_.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-pWpVPxju.js → use-join-requests-Dy5u_fZi.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-G9ed5IAI.js → use-mcp-auth-status-C48HeCw9.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-Ca9l1Lnr.js → use-mcp-client-BpYZJj4o.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-DlhGbsTi.js → use-mcp-tools-l53r1zOu.js} +1 -1
  204. package/dist/client/assets/{use-members-BlxvLg7J.js → use-members-CTrDSEbl.js} +1 -1
  205. package/dist/client/assets/{use-mobile-C5W0RGLs.js → use-mobile-CRkRo6zy.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-O_6e-uti.js → use-navigate-to-agent-D7z6mwyi.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-DG_z1qAa.js → use-org-auth-client-C7NIGHa2.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-Bu88hY6l.js → use-org-sso-C3FJc_XM.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-CpQygxw6.js → use-organization-roles-Bt8yo51m.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-BQlvga2w.js → use-organization-settings-D2HSrnf_.js} +1 -1
  211. package/dist/client/assets/{use-registry-app-yWo1rUwy.js → use-registry-app-Cy2XVJ8o.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-COyWFnN1.js → use-registry-connections-xT5_Tp16.js} +1 -1
  213. package/dist/client/assets/{use-secrets-DzO5pujN.js → use-secrets-Dlwxdo4W.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-Bm_UBiKc.js → use-status-sounds-yNgZe7Tt.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-B2udRaKx.js → use-view-mode-YuddT2eW.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-knS-Q3oO.js → use-virtual-mcp-vNY0_cuG.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-aIQ9VGjU.js +1 -0
  218. package/dist/client/assets/{useQueries-BAIK-5ft.js → useQueries-CP5a8Gkq.js} +1 -1
  219. package/dist/client/assets/{useRouterState-CGpBUtoy.js → useRouterState-XbyODXg7.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-TkWZQEXd.js +1 -0
  221. package/dist/client/assets/{users-CW2kcYCh.js → users-Dxjht4mz.js} +1 -1
  222. package/dist/client/assets/{variant-calendar-6Ot7n47G.js → variant-calendar-DkYf5C0v.js} +1 -1
  223. package/dist/client/assets/{view-mode-toggle-D77eHOEq.js → view-mode-toggle-CeUnqVr5.js} +1 -1
  224. package/dist/client/index.html +2 -2
  225. package/dist/server/cli.js +1 -1
  226. package/dist/server/server.js +1 -1
  227. package/package.json +1 -1
  228. package/dist/client/assets/automations-C53PhIvf.js +0 -1
  229. package/dist/client/assets/commerce-onboarding-64IH8_a5.js +0 -1
  230. package/dist/client/assets/companions-core-B4QVmz70.js +0 -1
  231. package/dist/client/assets/index-BAunSejK.js +0 -8
  232. package/dist/client/assets/index-BUjoKnjr.js +0 -1
  233. package/dist/client/assets/index-vsJ-HZsf.css +0 -1
  234. package/dist/client/assets/invite-member-dialog-Cg_1O2lW.js +0 -1
  235. package/dist/client/assets/page-seo-sheet-CYtb8tPm.js +0 -1
  236. package/dist/client/assets/project-app-view-CDUUd87p.js +0 -1
  237. package/dist/client/assets/record-editor-CqrmzwUy.js +0 -1
  238. package/dist/client/assets/redirect-editor-B3kWqnhs.js +0 -1
  239. package/dist/client/assets/registry-DGP40Isr.js +0 -2
  240. package/dist/client/assets/self-tool-result-DqKafcy2.js +0 -1
  241. package/dist/client/assets/store-registry-C_0G7XOu.js +0 -2
  242. package/dist/client/assets/useInfiniteQuery--O0UJeP3.js +0 -1
  243. package/dist/client/assets/useSuspenseInfiniteQuery-DQXQ91ga.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.120.0",
3
+ "version": "4.122.0",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as B,j as o,b as q,F as D,d as M,r as $,B as F,q as R}from"./index-BkQeimZz.js";import{s as V}from"./Plus-CP-BI904.js";import{i as S}from"./Zap-Cf3B8XV9.js";import{S as G}from"./search-input-CBo5Q2hW.js";import{P as d}from"./index-BXjYLNnL.js";import{E as T}from"./empty-state-BQtWItQu.js";import{c as H}from"./use-automations-B9P_vduo.js";import{c as J}from"./use-navigate-to-agent-O_6e-uti.js";import{A as K}from"./automation-list-row-BUA1PWG-.js";import{q as O}from"./use-mcp-client-Ca9l1Lnr.js";import{a as Q}from"./use-virtual-mcp-knS-Q3oO.js";import{R as U}from"./require-capability-9Z4LuijU.js";import"./SearchMd-DCdN8sFZ.js";import"./sidebar-D8HHeZss.js";import"./LayoutLeft-DGux0aXO.js";import"./use-mobile-C5W0RGLs.js";import"./X-BnBYCjCN.js";import"./tooltip-6YXDmKdK.js";import"./studio-tools-PCiFWXzm.js";import"./hooks-dE0ApXsc.js";import"./decopilot-sse-pool-DQp3v72-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-DKTyYqPU.js";import"./dropdown-menu-Bn5pKJ7t.js";import"./Check-BVao786V.js";import"./ChevronRight-CrBdlf5g.js";import"./DotsVertical-3GQ99jGv.js";import"./Stars02-DsiBetQn.js";import"./Trash01-jY1Npbiv.js";import"./agent-icon-DEBdQzV-.js";import"./AlertCircle-fg3Hgsgz.js";import"./Tool01-Cp_FNZn9.js";import"./ArrowUp-CJNj-lbc.js";import"./Settings02-B2Q1F7yN.js";import"./Tool02-ByyTEcad.js";import"./ArrowRight-CV0xQASq.js";import"./ArrowUpRight-B75b68J3.js";import"./TrendUp01-BDzOq-pH.js";import"./ZapSquare-DmNcoydg.js";import"./ZoomOut-RylsG63M.js";import"./Users03-BowsdXcq.js";import"./CheckCircle-IniJIcWw.js";import"./ChevronDown-DPpeNPF5.js";import"./ChevronUp-DYGKOdBy.js";import"./Copy01-Cz2rkjLR.js";import"./Globe01-CLxc6flB.js";import"./Eye-DTXEp_Op.js";import"./FilterLines-Cz9hbnJD.js";import"./Star01-TgpbQ1ki.js";import"./Globe04-DkANX7p7.js";import"./SwitchHorizontal01-CFoLDY1q.js";import"./HardDrive-z8I8Njjc.js";import"./Image01-DRgtbsjP.js";import"./Key01-DTsWUBNB.js";import"./XCircle-7b_0pmj2.js";import"./LinkExternal01-DS_UHiRd.js";import"./LogOut01-C8eH_07W.js";import"./Monitor01-XNX3vHJ4.js";import"./Sun-DdoghNKG.js";import"./Package-3iqcIf7w.js";import"./Palette-B2Z8mdAl.js";import"./Play-BftNxqXw.js";import"./SearchLg-Bbkgfm53.js";import"./Shield01-BZW1dWy4.js";import"./Stars01-5bOGRLFK.js";import"./Upload01-BJ-q-gLK.js";import"./User01-DiO_9L3k.js";import"./Users01-OTsRlXmF.js";import"./XClose-B06L-PJc.js";import"./auth-B6AFPxXM.js";import"./use-capability-BV4X85Oa.js";import"./access-gate-CHPOB4DQ.js";import"./capability-load-error-Cjc3H0wk.js";function W(){const t=B.c(20),i=q(),{org:c}=D(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=M(),[x,E]=$.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(e=>{if(!h||e.name.toLowerCase().includes(h))return!0;if(e.virtual_mcp_id){const p=A.get(e.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(e,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:e,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+e}})};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]!==i?(s=i("settings.automations.pageTitle"),t[3]=i,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:i("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:i("settings.automations.emptyTitle"),description:i("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),i("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:i("settings.automations.noResultsTitle"),description:i("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(e=>o.jsx(K,{automation:e,showAgent:!0,onClick:()=>z(e.id,e.virtual_mcp_id)},e.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 vo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=i):i=t[0],i}export{vo as default};
@@ -1 +0,0 @@
1
- import{c as I,b as q,j as o,u as Ke,p as tt,q as Ce,r as H,a as Te,d as rt,s as it,e as Qe,v as Se,w as Ye,Q as ot,E as nt,K as De,x as Ae,B as ze,N as st,m as $e}from"./index-BkQeimZz.js";import{L as at,s as Le,S as Ge,a as He,b as ke,c as Me,i as lt,n as Pe,C as Je,p as Ie}from"./self-tool-result-DqKafcy2.js";import{A as ct}from"./auth-entry-DtBSX81T.js";import{A as mt}from"./auth-split-layout-BrR_HavC.js";import{O as We}from"./organization-choice-kIsUHSW2.js";import{I as ut}from"./input-BiKdrDt4.js";import{D as dt,a as qe,b as gt,c as ft}from"./dropdown-menu-Bn5pKJ7t.js";import{S as pt,u as ht,W as bt,g as xt,a as yt}from"./use-mcp-client-Ca9l1Lnr.js";import{i as Ct}from"./ArrowRight-CV0xQASq.js";import"./integration-icon-Ca9Ro_Zp.js";import"./Tool02-ByyTEcad.js";import"./agent-icon-DEBdQzV-.js";import"./AlertCircle-fg3Hgsgz.js";import"./Tool01-Cp_FNZn9.js";import"./ArrowUp-CJNj-lbc.js";import"./Settings02-B2Q1F7yN.js";import"./ArrowUpRight-B75b68J3.js";import"./TrendUp01-BDzOq-pH.js";import"./ZapSquare-DmNcoydg.js";import"./ZoomOut-RylsG63M.js";import"./Users03-BowsdXcq.js";import"./CheckCircle-IniJIcWw.js";import"./Check-BVao786V.js";import"./ChevronDown-DPpeNPF5.js";import"./ChevronRight-CrBdlf5g.js";import"./ChevronUp-DYGKOdBy.js";import"./DotsVertical-3GQ99jGv.js";import"./Stars02-DsiBetQn.js";import"./Copy01-Cz2rkjLR.js";import"./Globe01-CLxc6flB.js";import"./Eye-DTXEp_Op.js";import"./FilterLines-Cz9hbnJD.js";import"./Star01-TgpbQ1ki.js";import"./Globe04-DkANX7p7.js";import"./SwitchHorizontal01-CFoLDY1q.js";import"./HardDrive-z8I8Njjc.js";import"./Image01-DRgtbsjP.js";import"./Key01-DTsWUBNB.js";import"./LayoutLeft-DGux0aXO.js";import"./XCircle-7b_0pmj2.js";import"./LinkExternal01-DS_UHiRd.js";import"./LogOut01-C8eH_07W.js";import"./Monitor01-XNX3vHJ4.js";import"./Sun-DdoghNKG.js";import"./Package-3iqcIf7w.js";import"./Palette-B2Z8mdAl.js";import"./Play-BftNxqXw.js";import"./Plus-CP-BI904.js";import"./SearchLg-Bbkgfm53.js";import"./SearchMd-DCdN8sFZ.js";import"./Shield01-BZW1dWy4.js";import"./Stars01-5bOGRLFK.js";import"./Trash01-jY1Npbiv.js";import"./Upload01-BJ-q-gLK.js";import"./User01-DiO_9L3k.js";import"./Users01-OTsRlXmF.js";import"./XClose-B06L-PJc.js";import"./X-BnBYCjCN.js";import"./Zap-Cf3B8XV9.js";import"./dialog-CJJBIADb.js";import"./tooltip-6YXDmKdK.js";import"./companions-core-B4QVmz70.js";import"./extract-connection-data-D3bgaTlN.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-B3EdZ9mI.js";import"./label-DmHlHvvv.js";import"./use-debounced-value-HVV3niP0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-BAIK-5ft.js";import"./authenticate-and-persist-oauth-CigV4fJB.js";import"./mcp-oauth-D6_LXaaB.js";import"./auth-B6AFPxXM.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-SVXA5K0_.js";function Fe(t){const e=I.c(5),{variant:i}=t,n=q();let r;e[0]!==n||e[1]!==i?(r=n(i==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=n,e[1]=i,e[2]=r):r=e[2];const c=r;let a;return e[3]!==c?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(at,{label:c,className:"text-muted-foreground"})}),e[3]=c,e[4]=a):a=e[4],a}function ri(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(_t,{}),t[0]=e):e=t[0],e}const Xe=H.createContext(null),Ze=()=>H.useContext(Xe);function Ot(){const t=I.c(22),[e,i]=Se(),n=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==n?(r=o.jsx(dt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:n})}),t[0]=n,t[1]=r):r=t[1];let c;t[2]!==i?(c=()=>{i(St)},t[2]=i,t[3]=c):c=t[3];const a=e.language==="en"&&"bg-accent";let s;t[4]!==a?(s=$e(a),t[4]=a,t[5]=s):s=t[5];let g;t[6]!==c||t[7]!==s?(g=o.jsx(qe,{onClick:c,className:s,children:"English"}),t[6]=c,t[7]=s,t[8]=g):g=t[8];let f;t[9]!==i?(f=()=>{i(jt)},t[9]=i,t[10]=f):f=t[10];const u=e.language==="pt-BR"&&"bg-accent";let m;t[11]!==u?(m=$e(u),t[11]=u,t[12]=m):m=t[12];let d;t[13]!==f||t[14]!==m?(d=o.jsx(qe,{onClick:f,className:m,children:"Português (Brasil)"}),t[13]=f,t[14]=m,t[15]=d):d=t[15];let p;t[16]!==g||t[17]!==d?(p=o.jsxs(gt,{align:"end",children:[g,d]}),t[16]=g,t[17]=d,t[18]=p):p=t[18];let S;return t[19]!==r||t[20]!==p?(S=o.jsxs(ft,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=S):S=t[21],S}function jt(t){return{...t,language:"pt-BR"}}function St(t){return{...t,language:"en"}}function k(t){const e=I.c(17);let i,n,r;e[0]!==t?({visual:r,children:i,...n}=t,e[0]=t,e[1]=i,e[2]=n,e[3]=r):(i=e[1],n=e[2],r=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/commerce-onboarding"},e[4]=c):c=e[4];const a=Ke(c),{data:s}=Te.useSession(),[g]=Se(),f=s?.user?.email;let u;e[5]!==g.language||e[6]!==a.siteUrl||e[7]!==f?(u=ke({siteUrl:a.siteUrl,email:f,locale:g.language}),e[5]=g.language,e[6]=a.siteUrl,e[7]=f,e[8]=u):u=e[8];const m=u;let d;e[9]!==m||e[10]!==r?(d=r??o.jsx(Me,{href:m}),e[9]=m,e[10]=r,e[11]=d):d=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(Ot,{})]}),e[12]=p):p=e[12];let S;return e[13]!==i||e[14]!==n||e[15]!==d?(S=o.jsxs(mt,{...n,visual:d,children:[p,i]}),e[13]=i,e[14]=n,e[15]=d,e[16]=S):S=e[16],S}function vt(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 Be(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 Ve=!1;function _t(){const t=Ke({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=t,n=Le(i);return!Ve&&tt()&&(Ve=!0,Ce("commerce_onboarding_viewed",{site_url:i,domain:n??void 0,...n?{$set:{last_scanned_domain:n}}:{}})),o.jsx(Xe.Provider,{value:n,children:o.jsx(Et,{requestedOrgSlug:e,siteUrl:i})})}function Et(t){const e=I.c(14),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),{data:c,isPending:a}=Te.useSession(),s=Ze();if(a){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(k,{children:o.jsx(Fe,{variant:"generic"})}),e[0]=f):f=e[0],f}if(!c){const f=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let u;e[1]!==r?(u=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=u):u=e[2];let m;e[3]!==s?(m=s?o.jsx(Ge,{host:s}):void 0,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r?(d=vt(r),e[5]=r,e[6]=d):d=e[6];let p;return e[7]!==u||e[8]!==m||e[9]!==d?(p=o.jsx(k,{children:o.jsx(ct,{callbackUrl:f,allowAutoLogin:!1,title:u,subtitle:null,brand:m,copy:d})}),e[7]=u,e[8]=m,e[9]=d,e[10]=p):p=e[10],p}let g;return e[11]!==i||e[12]!==n?(g=o.jsx(Ut,{requestedOrgSlug:i,siteUrl:n}),e[11]=i,e[12]=n,e[13]=g):g=e[13],g}function Ut(t){const e=I.c(95),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),c=rt(),a=it(),[s,g]=H.useState(null),[f,u]=H.useState(null),m=a.data?.map(Nt)??[];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={mutationFn:wt,retry:!1,onSuccess:l=>{u(l)}},e[0]=d):d=e[0];const p=Qe(d);if(a.isPending){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(k,{children:o.jsx(Fe,{variant:"workspace"})}),e[1]=l):l=e[1],l}if(a.error){let l;e[2]!==r?(l=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=l):l=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 C;e[8]!==a?(C=()=>a.refetch(),e[8]=a,e[9]=C):C=e[9];let j;return e[10]!==l||e[11]!==h||e[12]!==x||e[13]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[10]=l,e[11]=h,e[12]=x,e[13]=C,e[14]=j):j=e[14],j}const S=i?m.find(l=>l.slug===i):null;if(S){let l;return e[15]!==S||e[16]!==n?(l=o.jsx(ye,{org:S,initialSiteUrl:n}),e[15]=S,e[16]=n,e[17]=l):l=e[17],l}if(i){let l;e[18]!==r?(l=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=l):l=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 C;e[24]!==a?(C=()=>a.refetch(),e[24]=a,e[25]=C):C=e[25];let j;return e[26]!==l||e[27]!==h||e[28]!==x||e[29]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[26]=l,e[27]=h,e[28]=x,e[29]=C,e[30]=j):j=e[30],j}if(s){let l;return e[31]!==s||e[32]!==n?(l=o.jsx(ye,{org:s,initialSiteUrl:n}),e[31]=s,e[32]=n,e[33]=l):l=e[33],l}if(m.length===1&&m[0]){let l;return e[34]!==m[0]||e[35]!==n?(l=o.jsx(ye,{org:m[0],initialSiteUrl:n}),e[34]=m[0],e[35]=n,e[36]=l):l=e[36],l}if(m.length>1){let l;e[37]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=l):l=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]!==l||e[42]!==h?(x=o.jsx(W,{title:l,description:h}),e[41]=l,e[42]=h,e[43]=x):x=e[43];let C;e[44]!==r?(C=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=C):C=e[45];let j;e[46]!==c||e[47]!==n?(j=V=>c({to:"/commerce-onboarding",search:{org:V.slug,siteUrl:n}}),e[46]=c,e[47]=n,e[48]=j):j=e[48];let O;e[49]!==m||e[50]!==C||e[51]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:m,selectLabel:C,onSelected:j})}),e[49]=m,e[50]=C,e[51]=j,e[52]=O):O=e[52];let F;return e[53]!==x||e[54]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[53]=x,e[54]=O,e[55]=F):F=e[55],F}if(!f){let l;e[56]!==p?(l=()=>{p.reset(),p.mutate()},e[56]=p,e[57]=l):l=e[57];let h;return e[58]!==p||e[59]!==l?(h=o.jsx(Pt,{mutation:p,onRetry:l}),e[58]=p,e[59]=l,e[60]=h):h=e[60],h}const b=f;if(b?.success&&(b.status==="created"||b.status==="joined"||b.status==="already_has_organization")&&b.organization){let l;return e[61]!==b.organization||e[62]!==n?(l=o.jsx(ye,{org:b.organization,initialSiteUrl:n}),e[61]=b.organization,e[62]=n,e[63]=l):l=e[63],l}if(b?.status==="ambiguous"&&b.organizations&&b.organizations.length>0){let l;e[64]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[64]=r,e[65]=l):l=e[65];let h;e[66]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[66]=r,e[67]=h):h=e[67];let x;e[68]!==l||e[69]!==h?(x=o.jsx(W,{title:l,description:h}),e[68]=l,e[69]=h,e[70]=x):x=e[70];const C=b.domain??void 0;let j;e[71]!==c||e[72]!==n?(j=(V,B)=>{Ye(),g({...V,slug:B}),c({to:"/commerce-onboarding",search:{org:B,siteUrl:n}})},e[71]=c,e[72]=n,e[73]=j):j=e[73];let O;e[74]!==b.organizations||e[75]!==C||e[76]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:b.organizations,domain:C,onJoined:j})}),e[74]=b.organizations,e[75]=C,e[76]=j,e[77]=O):O=e[77];let F;return e[78]!==x||e[79]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[78]=x,e[79]=O,e[80]=F):F=e[80],F}let E;e[81]!==r?(E=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[81]=r,e[82]=E):E=e[82];let U;e[83]!==b?.error||e[84]!==r?(U=b?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[83]=b?.error,e[84]=r,e[85]=U):U=e[85];let N;e[86]!==r?(N=r("routes.commerceOnboarding.retryAgain"),e[86]=r,e[87]=N):N=e[87];let w;e[88]!==p?(w=()=>{u(null),p.reset()},e[88]=p,e[89]=w):w=e[89];let M;return e[90]!==E||e[91]!==U||e[92]!==N||e[93]!==w?(M=o.jsx(Oe,{title:E,description:U,actionLabel:N,onRetry:w}),e[90]=E,e[91]=U,e[92]=N,e[93]=w,e[94]=M):M=e[94],M}async function wt(){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&&Ye(),e}function Nt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Pt(t){const e=I.c(16),{mutation:i,onRetry:n}=t,r=q(),c=H.useRef(!1);let a;e[0]!==i?(a=u=>{!u||c.current||(c.current=!0,i.mutate())},e[0]=i,e[1]=a):a=e[1];const s=a;if(i.error){let u;e[2]!==r?(u=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=u):u=e[3];let m;e[4]!==r?(m=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=m):m=e[5];let d;e[6]!==r?(d=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=d):d=e[7];let p;return e[8]!==n||e[9]!==u||e[10]!==m||e[11]!==d?(p=o.jsx(Oe,{title:u,description:m,actionLabel:d,onRetry:n}),e[8]=n,e[9]=u,e[10]=m,e[11]=d,e[12]=p):p=e[12],p}let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Fe,{variant:"generic"}),e[13]=g):g=e[13];let f;return e[14]!==s?(f=o.jsx(k,{children:o.jsx("div",{ref:s,children:g})}),e[14]=s,e[15]=f):f=e[15],f}function W(t){const e=I.c(8),{title:i,description:n}=t,r=Ze();let c;e[0]!==r?(c=r?o.jsx(Ge,{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]=c):c=e[1];let a;e[2]!==n||e[3]!==i?(a=(i||n)&&o.jsxs("div",{className:"space-y-2",children:[i&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),n&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=i,e[4]=a):a=e[4];let s;return e[5]!==c||e[6]!==a?(s=o.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=s):s=e[7],s}function Oe(t){const e=I.c(9),{title:i,description:n,actionLabel:r,onRetry:c}=t;let a;e[0]!==n||e[1]!==i?(a=o.jsx(W,{title:i,description:n}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let s;e[3]!==r||e[4]!==c?(s=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:c,children:r}),e[3]=r,e[4]=c,e[5]=s):s=e[5];let g;return e[6]!==a||e[7]!==s?(g=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[a,s]})}),e[6]=a,e[7]=s,e[8]=g):g=e[8],g}function ye(t){const e=I.c(13),{org:i,initialSiteUrl:n}=t,r=q(),{data:c}=Te.useSession(),[a]=Se(),s=c?.user?.email;let g;e[0]!==n||e[1]!==a.language||e[2]!==s?(g=ke({siteUrl:n,email:s,locale:a.language}),e[0]=n,e[1]=a.language,e[2]=s,e[3]=g):g=e[3];const f=g;let u;e[4]!==f||e[5]!==i.id?(u=o.jsx(Me,{href:f,orgId:i.id}),e[4]=f,e[5]=i.id,e[6]=u):u=e[6];const m=u;let d;return e[7]!==n||e[8]!==m||e[9]!==i||e[10]!==c?.user?.email||e[11]!==r?(d=o.jsx(ot,{children:p=>{const{reset:S}=p;return o.jsx(nt,{fallback:b=>{const{error:E,resetError:U}=b;return o.jsx(k,{visual:m,children:o.jsx(It,{orgName:i.name,message:E instanceof Error?E.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{S(),U()}})})},children:o.jsx(H.Suspense,{fallback:o.jsx(et,{visual:m}),children:o.jsx(Rt,{org:i,initialSiteUrl:n,sessionEmail:c?.user?.email},`${i.id}:${n??""}`)})})}}),e[7]=n,e[8]=m,e[9]=i,e[10]=c?.user?.email,e[11]=r,e[12]=d):d=e[12],d}function et(t){const e=I.c(3),{visual:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(W,{}),o.jsx(Je,{})]}),e[0]=n):n=e[0];let r;return e[1]!==i?(r=o.jsx(k,{align:"fill",visual:i,children:n}),e[1]=i,e[2]=r):r=e[2],r}function It(t){const e=I.c(19),{orgName:i,message:n,onRetry:r}=t,c=q();let a;e[0]!==c?(a=c("routes.commerceOnboarding.commerceDiagnostic"),e[0]=c,e[1]=a):a=e[1];let s;e[2]!==i||e[3]!==c?(s=c("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i}),e[2]=i,e[3]=c,e[4]=s):s=e[4];let g;e[5]!==a||e[6]!==s?(g=o.jsx(W,{title:a,description:s}),e[5]=a,e[6]=s,e[7]=g):g=e[7];let f;e[8]!==n?(f=o.jsx(je,{message:n}),e[8]=n,e[9]=f):f=e[9];let u;e[10]!==c?(u=c("routes.commerceOnboarding.retryAgain"),e[10]=c,e[11]=u):u=e[11];let m;e[12]!==r||e[13]!==u?(m=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:r,children:u}),e[12]=r,e[13]=u,e[14]=m):m=e[14];let d;return e[15]!==g||e[16]!==f||e[17]!==m?(d=o.jsxs("div",{className:"grid gap-10",children:[g,f,m]}),e[15]=g,e[16]=f,e[17]=m,e[18]=d):d=e[18],d}function Rt(t){const e=I.c(135),{org:i,initialSiteUrl:n,sessionEmail:r}=t;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:pt,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=ht(c),[s,g]=H.useState(n??""),[f,u]=H.useState(null),m=H.useRef(!1),d=bt.COMMERCE_DISCOVERY(i.id),p=xt(i.id),S=De.commerceDiscoveryConnection(i.id,d);let b;e[3]!==d||e[4]!==a?(b=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return Ie(y)},e[3]=d,e[4]=a,e[5]=b):b=e[5];let E;e[6]!==S||e[7]!==b?(E={queryKey:S,queryFn:b,retry:!1},e[6]=S,e[7]=b,e[8]=E):E=e[8];const U=Ae(E),N=De.commerceDiscoveryVirtualMcp(i.id,p);let w;e[9]!==a||e[10]!==p?(w=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Ie(y)},e[9]=a,e[10]=p,e[11]=w):w=e[11];let M;e[12]!==N||e[13]!==w?(M={queryKey:N,queryFn:w,retry:!1},e[12]=N,e[13]=w,e[14]=M):M=e[14];const l=Ae(M);let h;e[15]!==a?(h=async y=>{const v=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Ie(v)},e[15]=a,e[16]=h):h=e[16];let x;e[17]!==U||e[18]!==i.id||e[19]!==l?(x=(y,v)=>{Ce("commerce_onboarding_setup_succeeded",{domain:Le(v)??void 0,organization_id:i.id}),u(null),U.refetch(),l.refetch()},e[17]=U,e[18]=i.id,e[19]=l,e[20]=x):x=e[20];let C;e[21]!==i.id?(C=(y,v)=>{Ce("commerce_onboarding_setup_failed",{domain:Le(v)??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),u(y instanceof Error?y.message:"__configurationFailed")},e[21]=i.id,e[22]=C):C=e[22];let j;e[23]!==C||e[24]!==h||e[25]!==x?(j={mutationFn:h,retry:!1,onSuccess:x,onError:C},e[23]=C,e[24]=h,e[25]=x,e[26]=j):j=e[26];const O=Qe(j),F=!!U.data.item&&!!l.data.item,V=U.data.item,B=typeof V?.metadata?.siteUrl=="string"?V.metadata.siteUrl:void 0,ve=n||s||"";let ne;e[27]!==B||e[28]!==ve?(ne=lt(ve,B),e[27]=B,e[28]=ve,e[29]=ne):ne=e[29];const se=F&&ne,ae=n||s||B||"",_=q(),[_e]=Se();let le;e[30]!==ae||e[31]!==_e.language||e[32]!==r?(le=ke({siteUrl:ae,email:r,locale:_e.language}),e[30]=ae,e[31]=_e.language,e[32]=r,e[33]=le):le=e[33];const Ee=le;let ce;e[34]!==Ee||e[35]!==i.id?(ce=o.jsx(Me,{href:Ee,orgId:i.id}),e[34]=Ee,e[35]=i.id,e[36]=ce):ce=e[36];const T=ce;let me;e[37]!==f||e[38]!==_?(me=f?Be(_,f):null,e[37]=f,e[38]=_,e[39]=me):me=e[39];const z=me;let ue;e[40]!==O?(ue=y=>{const v=Pe(y);if(!v.ok){u(v.error);return}u(null),O.mutate(v.value)},e[40]=O,e[41]=ue):ue=e[41];const K=ue;let de;e[42]!==n||e[43]!==K||e[44]!==se?(de=y=>{!y||m.current||se||!n||(m.current=!0,K(n))},e[42]=n,e[43]=K,e[44]=se,e[45]=de):de=e[45];const Ue=de;let ge;e[46]!==i.id||e[47]!==K||e[48]!==s?(ge=y=>{y.preventDefault();const v=Pe(s);v.ok&&Ce("commerce_onboarding_site_url_submitted",{domain:new URL(v.value).hostname,organization_id:i.id}),K(s)},e[46]=i.id,e[47]=K,e[48]=s,e[49]=ge):ge=e[49];const D=ge;if(se){const y=i.slug;let v;e[50]===Symbol.for("react.memo_cache_sentinel")?(v=crypto.randomUUID(),e[50]=v):v=e[50];let P;e[51]!==i.slug?(P={org:y,taskId:v},e[51]=i.slug,e[52]=P):P=e[52];let R;e[53]!==i.id?(R=yt(i.id),e[53]=i.id,e[54]=R):R=e[54];const $=ae||void 0;let L;e[55]!==R.id||e[56]!==$?(L={virtualmcpid:R.id,connect:"1",siteUrl:$},e[55]=R.id,e[56]=$,e[57]=L):L=e[57];let A;return e[58]!==P||e[59]!==L?(A=o.jsx(st,{to:"/$org/$taskId",params:P,search:L,replace:!0}),e[58]=P,e[59]=L,e[60]=A):A=e[60],A}if(O.isPending){let y;return e[61]!==T?(y=o.jsx(et,{visual:T}),e[61]=T,e[62]=y):y=e[62],y}if(n){let y,v,P,R,$,L,A,Z;if(e[63]!==T||e[64]!==D||e[65]!==n||e[66]!==i.name||e[67]!==O.isPending||e[68]!==s||e[69]!==_||e[70]!==z||e[71]!==Ue){Z=Symbol.for("react.early_return_sentinel");e:{const we=Pe(n);if(!we.ok){let ie;e[80]!==_?(ie=_("routes.commerceOnboarding.commerceDiagnostic"),e[80]=_,e[81]=ie):ie=e[81];let oe;e[82]!==i.name||e[83]!==_?(oe=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[82]=i.name,e[83]=_,e[84]=oe):oe=e[84];let he;e[85]!==ie||e[86]!==oe?(he=o.jsx(W,{title:ie,description:oe}),e[85]=ie,e[86]=oe,e[87]=he):he=e[87];let be;e[88]!==D||e[89]!==O.isPending||e[90]!==s||e[91]!==z?(be=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[88]=D,e[89]=O.isPending,e[90]=s,e[91]=z,e[92]=be):be=e[92];const Ne=o.jsxs("div",{className:"grid gap-10",children:[he,o.jsx(je,{message:Be(_,we.error)}),be]});let xe;e[93]!==T||e[94]!==Ne?(xe=o.jsx(k,{visual:T,children:Ne}),e[93]=T,e[94]=Ne,e[95]=xe):xe=e[95],Z=xe;break e}v=k,A=T,$=Ue,L="grid gap-10",y=W,e[96]!==_?(P=_("routes.commerceOnboarding.commerceDiagnostic"),e[96]=_,e[97]=P):P=e[97],R=_("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:we.value})}e[63]=T,e[64]=D,e[65]=n,e[66]=i.name,e[67]=O.isPending,e[68]=s,e[69]=_,e[70]=z,e[71]=Ue,e[72]=y,e[73]=v,e[74]=P,e[75]=R,e[76]=$,e[77]=L,e[78]=A,e[79]=Z}else y=e[72],v=e[73],P=e[74],R=e[75],$=e[76],L=e[77],A=e[78],Z=e[79];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let ee;e[98]!==y||e[99]!==P||e[100]!==R?(ee=o.jsx(y,{title:P,description:R}),e[98]=y,e[99]=P,e[100]=R,e[101]=ee):ee=e[101];let te;e[102]!==D||e[103]!==O.isPending||e[104]!==s||e[105]!==z?(te=z?o.jsxs(o.Fragment,{children:[o.jsx(je,{message:z}),o.jsx(Re,{siteUrl:s,error:null,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D})]}):o.jsx(Je,{}),e[102]=D,e[103]=O.isPending,e[104]=s,e[105]=z,e[106]=te):te=e[106];let re;e[107]!==$||e[108]!==L||e[109]!==ee||e[110]!==te?(re=o.jsxs("div",{ref:$,className:L,children:[ee,te]}),e[107]=$,e[108]=L,e[109]=ee,e[110]=te,e[111]=re):re=e[111];let pe;return e[112]!==v||e[113]!==A||e[114]!==re?(pe=o.jsx(v,{visual:A,children:re}),e[112]=v,e[113]=A,e[114]=re,e[115]=pe):pe=e[115],pe}let Q;e[116]!==_?(Q=_("routes.commerceOnboarding.commerceDiagnostic"),e[116]=_,e[117]=Q):Q=e[117];let Y;e[118]!==i.name||e[119]!==_?(Y=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[118]=i.name,e[119]=_,e[120]=Y):Y=e[120];let G;e[121]!==Q||e[122]!==Y?(G=o.jsx(W,{title:Q,description:Y}),e[121]=Q,e[122]=Y,e[123]=G):G=e[123];let J;e[124]!==D||e[125]!==O.isPending||e[126]!==s||e[127]!==z?(J=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[124]=D,e[125]=O.isPending,e[126]=s,e[127]=z,e[128]=J):J=e[128];let X;e[129]!==G||e[130]!==J?(X=o.jsxs("div",{className:"grid gap-10",children:[G,J]}),e[129]=G,e[130]=J,e[131]=X):X=e[131];let fe;return e[132]!==T||e[133]!==X?(fe=o.jsx(k,{visual:T,children:X}),e[132]=T,e[133]=X,e[134]=fe):fe=e[134],fe}function Re(t){const e=I.c(30),{siteUrl:i,error:n,isSubmitting:r,onSiteUrlChange:c,onSubmit:a}=t,s=q();let g;e[0]!==s?(g=s("routes.commerceOnboarding.siteUrlLabel"),e[0]=s,e[1]=g):g=e[1];let f;e[2]!==g?(f=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:g}),e[2]=g,e[3]=f):f=e[3];let u;e[4]!==c?(u=M=>c(M.target.value),e[4]=c,e[5]=u):u=e[5];let m;e[6]!==s?(m=s("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=s,e[7]=m):m=e[7];const d=!!n;let p;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==m||e[12]!==d?(p=o.jsx(ut,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:u,placeholder:m,"aria-invalid":d,disabled:r}),e[8]=r,e[9]=i,e[10]=u,e[11]=m,e[12]=d,e[13]=p):p=e[13];let S;e[14]!==n?(S=n?o.jsx(je,{message:n}):null,e[14]=n,e[15]=S):S=e[15];let b;e[16]!==f||e[17]!==p||e[18]!==S?(b=o.jsxs("div",{className:"grid gap-2",children:[f,p,S]}),e[16]=f,e[17]=p,e[18]=S,e[19]=b):b=e[19];let E;e[20]!==s?(E=s("routes.commerceOnboarding.authCopy.continue"),e[20]=s,e[21]=E):E=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx(Ct,{size:16}),e[22]=U):U=e[22];let N;e[23]!==r||e[24]!==E?(N=o.jsxs(ze,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[E,U]}),e[23]=r,e[24]=E,e[25]=N):N=e[25];let w;return e[26]!==a||e[27]!==N||e[28]!==b?(w=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[b,N]}),e[26]=a,e[27]=N,e[28]=b,e[29]=w):w=e[29],w}function je(t){const e=I.c(2),{message:i}=t;let n;return e[0]!==i?(n=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=n):n=e[1],n}export{ri as default};
@@ -1 +0,0 @@
1
- import{b as m}from"./extract-connection-data-D3bgaTlN.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
@@ -1,8 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BPEu29M9.js","assets/index-BkQeimZz.js","assets/index-vsJ-HZsf.css","assets/ArrowUp-CJNj-lbc.js","assets/chat-context-CmQVFNlq.js","assets/autosend-C2FZ13WA.js","assets/hooks-dE0ApXsc.js","assets/use-mcp-client-Ca9l1Lnr.js","assets/auth-B6AFPxXM.js","assets/decopilot-sse-pool-DQp3v72-.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-PCiFWXzm.js","assets/use-virtual-mcp-knS-Q3oO.js","assets/use-ai-providers-C10MkKcn.js","assets/location-BpLtHjTZ.js","assets/tab-id-BijBBRwE.js","assets/use-decopilot-events-CLphMNS8.js","assets/use-organization-settings-BQlvga2w.js","assets/automation-runs-CHryRYGN.js","assets/select-CS3PZAih.js","assets/tooltip-6YXDmKdK.js","assets/Check-BVao786V.js","assets/ChevronDown-DPpeNPF5.js","assets/ChevronUp-DYGKOdBy.js","assets/useInfiniteQuery--O0UJeP3.js","assets/use-infinite-scroll-Bqwo9W1I.js","assets/use-connection-ClzlwYHs.js","assets/card-v9JJ51XL.js","assets/sidebar-D8HHeZss.js","assets/LayoutLeft-DGux0aXO.js","assets/use-mobile-C5W0RGLs.js","assets/X-BnBYCjCN.js","assets/table-eGpXezIB.js","assets/empty-state-BQtWItQu.js","assets/use-members-BlxvLg7J.js","assets/use-org-auth-client-DG_z1qAa.js","assets/use-clock-tick-BIiUVnXR.js","assets/AlertCircle-fg3Hgsgz.js","assets/CheckCircle-IniJIcWw.js","assets/DotsVertical-3GQ99jGv.js","assets/agent-icon-DEBdQzV-.js","assets/Tool01-Cp_FNZn9.js","assets/Settings02-B2Q1F7yN.js","assets/Tool02-ByyTEcad.js","assets/ArrowRight-CV0xQASq.js","assets/ArrowUpRight-B75b68J3.js","assets/TrendUp01-BDzOq-pH.js","assets/ZapSquare-DmNcoydg.js","assets/ZoomOut-RylsG63M.js","assets/Users03-BowsdXcq.js","assets/ChevronRight-CrBdlf5g.js","assets/Stars02-DsiBetQn.js","assets/Copy01-Cz2rkjLR.js","assets/Globe01-CLxc6flB.js","assets/Eye-DTXEp_Op.js","assets/FilterLines-Cz9hbnJD.js","assets/Star01-TgpbQ1ki.js","assets/Globe04-DkANX7p7.js","assets/SwitchHorizontal01-CFoLDY1q.js","assets/HardDrive-z8I8Njjc.js","assets/Image01-DRgtbsjP.js","assets/Key01-DTsWUBNB.js","assets/XCircle-7b_0pmj2.js","assets/LinkExternal01-DS_UHiRd.js","assets/LogOut01-C8eH_07W.js","assets/Monitor01-XNX3vHJ4.js","assets/Sun-DdoghNKG.js","assets/Package-3iqcIf7w.js","assets/Palette-B2Z8mdAl.js","assets/Play-BftNxqXw.js","assets/Plus-CP-BI904.js","assets/SearchLg-Bbkgfm53.js","assets/SearchMd-DCdN8sFZ.js","assets/Shield01-BZW1dWy4.js","assets/Stars01-5bOGRLFK.js","assets/Trash01-jY1Npbiv.js","assets/Upload01-BJ-q-gLK.js","assets/User01-DiO_9L3k.js","assets/Users01-OTsRlXmF.js","assets/XClose-B06L-PJc.js","assets/Zap-Cf3B8XV9.js","assets/use-automations-B9P_vduo.js","assets/useSuspenseInfiniteQuery-DQXQ91ga.js","assets/avatar-SVXA5K0_.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DCwa-tM1.js","assets/file-type-icon-Bvmb_MGY.js","assets/dialog-CJJBIADb.js","assets/monaco-editor-CHc71gyn.js","assets/index-D_tHc7Jk.js","assets/index-CwQyOcmL.js","assets/calendar-Bmjk91KZ.js","assets/shell-layout-CXG-tHmv.js","assets/required-auth-layout-DjDm-MZU.js","assets/use-org-sso-Bu88hY6l.js","assets/integration-icon-Ca9Ro_Zp.js","assets/use-navigate-to-agent-O_6e-uti.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-CGiiBbMe.js","assets/form-B3EdZ9mI.js","assets/label-DmHlHvvv.js","assets/input-BiKdrDt4.js","assets/drawer-b0eCtWu6.js","assets/collection-search-C364-hfY.js","assets/tabs-D_k8JeNb.js","assets/toggle-group-DDIDXHac.js","assets/use-deco-credits-DiL93U4G.js","assets/popover-DlUyr22d.js","assets/alert-dialog-DKTyYqPU.js","assets/toolbar-icon-button-CCDyO390.js","assets/skeleton-CVTYCuar.js","assets/use-registry-app-yWo1rUwy.js","assets/use-mcp-tools-DlhGbsTi.js","assets/github-repo-picker-CAQXTAGE.js","assets/use-debounced-value-HVV3niP0.js","assets/authenticate-and-persist-oauth-CigV4fJB.js","assets/mcp-oauth-D6_LXaaB.js","assets/extract-connection-data-D3bgaTlN.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/github-repo-scope-DjMZbiKa.js","assets/connection-card-B4ZK1nci.js","assets/use-registry-connections-COyWFnN1.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-CbskhFAr.js","assets/connection-form-helpers-VqgbDDwv.js","assets/collection-tabs-BCnplQCF.js","assets/badge-BhXxSdh-.js","assets/connect-desktop-dialog-C1OBxezk.js","assets/select-model-ygA9ImYq.js","assets/checkbox-qmL4ziNo.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-TOIy-AvH.js","assets/index-BqALxCoS.js","assets/toolbar-CIYAVWlg.js","assets/dropdown-menu-Bn5pKJ7t.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-Bm_UBiKc.js","assets/deco-site-production-url-CaKZ7xBn.js","assets/use-capability-BV4X85Oa.js","assets/pt-BR-CLy76QW2.js","assets/use-mcp-auth-status-G9ed5IAI.js","assets/use-debounced-autosave-Baq7uTDg.js","assets/index-BXjYLNnL.js","assets/search-input-CBo5Q2hW.js","assets/switch-DpdYRWDf.js","assets/use-secrets-DzO5pujN.js","assets/command-BoLqTMqI.js","assets/index-S0bapDuc.js","assets/useQueries-BAIK-5ft.js","assets/use-file-configs-BLKJU026.js","assets/automation-list-row-BUA1PWG-.js","assets/get-initials-D-f_fDFw.js","assets/index-CiP0VfIv.css"])))=>i.map(i=>d[i]);
2
- import{G as Vs,r as B,c as q,x as Ys,K as vt,F as He,n as Nt,a as Hs,o as Zt,t as Dt,_ as Ws,m as V,j as s,e as Tt,b as te,B as ke,E as Xs,d as ks,q as us,k as es,u as Js,aK as Zs}from"./index-BkQeimZz.js";import{g as Pe}from"./get-initials-D-f_fDFw.js";import{A as Le}from"./avatar-SVXA5K0_.js";import{au as ts,U as en,e as Ns,av as tn,h as sn,an as vs,aw as nn,ax as an,as as Et,X as Ct,n as Ss,ar as ln}from"./agent-icon-DEBdQzV-.js";import{i as rn}from"./SwitchHorizontal01-CFoLDY1q.js";import{s as ss}from"./Plus-CP-BI904.js";import{a as At,P as $t,b as Ot}from"./popover-DlUyr22d.js";import{W as on,m as fs,S as Ds,C as ws,g as cn,u as dn,h as un,a as fn}from"./use-mcp-client-Ca9l1Lnr.js";import{u as mn,G as gn}from"./use-registry-app-yWo1rUwy.js";import{d as ns,e as as,b as ls,h as xn,a as pn,c as hn}from"./dialog-CJJBIADb.js";import{b as yn,u as bn}from"./use-connection-ClzlwYHs.js";import{g as jn}from"./github-repo-scope-DjMZbiKa.js";import{a as kn}from"./authenticate-and-persist-oauth-CigV4fJB.js";import{e as Nn}from"./extract-connection-data-D3bgaTlN.js";import{u as Cs}from"./use-members-BlxvLg7J.js";import{u as Mt}from"./studio-tools-PCiFWXzm.js";import{t as vn,T as Sn,S as Me}from"./decopilot-sse-pool-DQp3v72-.js";import{u as Dn}from"./use-decopilot-events-CLphMNS8.js";import{a as wn}from"./format-time-BnbuEtat.js";import{i as _s}from"./AlertCircle-fg3Hgsgz.js";import{i as rs}from"./CheckCircle-IniJIcWw.js";import{i as Cn}from"./DotsVertical-3GQ99jGv.js";import{s as _n}from"./Eye-DTXEp_Op.js";import{a as St,D as zt,b as Ft,c as Rt}from"./dropdown-menu-Bn5pKJ7t.js";import{P as Yt,a as In,D as Bn,j as Tn,k as En,C as An,c as $n}from"./calendar-Bmjk91KZ.js";import{u as On}from"./use-copy-DCwa-tM1.js";import{i as zn}from"./Check-BVao786V.js";import{i as Fn}from"./ChevronRight-CrBdlf5g.js";import{a as Rn}from"./Copy01-Cz2rkjLR.js";import{n as Pn}from"./LinkExternal01-DS_UHiRd.js";import{i as ms}from"./X-BnBYCjCN.js";import{b as Is,C as Bs,a as Ye,e as Pt,d as Ts,c as Es}from"./command-BoLqTMqI.js";import{s as Ht}from"./User01-DiO_9L3k.js";import{g as Ln,b as Mn,e as qn,f as Kn,a as Un,D as Gn}from"./drawer-b0eCtWu6.js";import{t as os}from"./ChevronDown-DPpeNPF5.js";import{i as As}from"./FilterLines-Cz9hbnJD.js";import{s as Qn}from"./TrendUp01-BDzOq-pH.js";import{u as Vn}from"./shell-layout-CXG-tHmv.js";import{b as Yn}from"./hooks-dE0ApXsc.js";import{u as Hn}from"./use-organization-settings-BQlvga2w.js";import{i as $s}from"./ArrowRight-CV0xQASq.js";import{f as Wn}from"./tab-id-BijBBRwE.js";import{u as Wt}from"./companions-core-B4QVmz70.js";function Xn(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const er="__home__";function is(t,e){return Vs.chatDraft(t,e)}function Jn(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function Zn(t,e,n,o,a){const l=is(e,n);if(Xn(o)){t.removeItem(l);return}const r={tiptapDoc:o,updatedAt:Date.now()},i=JSON.stringify(r);try{t.setItem(l,i)}catch(d){if(ea(d)){const m=new TextEncoder().encode(i).byteLength;a?.onQuotaExceeded?.({docSizeBytes:m});return}throw d}}function tr(t,e,n){const o=is(e,n),a=t.getItem(o),l=Jn(a);return a!==null&&l===null&&t.removeItem(o),l}function sr(t,e,n){t.removeItem(is(e,n))}function ea(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}function ta(t){var e;const{char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:i}=t,d=o&&!a,m=En(n),x=new RegExp(`\\s${m}$`),c=r?"^":"",f=a?"":m,g=d?new RegExp(`${c}${m}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${c}(?:^)?${m}[^\\s${f}]*`,"gm"),y=((e=i.nodeBefore)==null?void 0:e.isText)&&i.nodeBefore.text;if(!y)return null;const h=i.pos-y.length,p=Array.from(y.matchAll(g)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const b=p.input.slice(Math.max(0,p.index-1),p.index),u=new RegExp(`^[${l?.join("")}\0]?$`).test(b);if(l!==null&&!u)return null;const k=h+p.index;let j=k+p[0].length;return d&&x.test(y.slice(j-1,j+1))&&(p[0]+=" ",j+=1),k<i.pos&&j>=i.pos?{range:{from:k,to:j},query:p[0].slice(n.length),text:p[0]}:null}var sa=new Yt("suggestion");function na({pluginKey:t=sa,editor:e,char:n="@",allowSpaces:o=!1,allowToIncludeChar:a=!1,allowedPrefixes:l=[" "],startOfLine:r=!1,decorationTag:i="span",decorationClass:d="suggestion",decorationContent:m="",decorationEmptyClass:x="is-empty",command:c=()=>null,items:f=()=>[],render:g=()=>({}),allow:y=()=>!0,findSuggestionMatch:h=ta,shouldShow:p}){let b;const u=g?.(),k=()=>{const v=e.state.selection.$anchor.pos,D=e.view.coordsAtPos(v),{top:w,right:T,bottom:I,left:_}=D;try{return new DOMRect(_,w,T-_,I-w)}catch{return null}},j=(v,D)=>D?()=>{const w=t.getState(e.state),T=w?.decorationId,I=v.dom.querySelector(`[data-decoration-id="${T}"]`);return I?.getBoundingClientRect()||null}:k;function S(v,D){var w;try{const I=t.getState(v.state),_=I?.decorationId?v.dom.querySelector(`[data-decoration-id="${I.decorationId}"]`):null,O={editor:e,range:I?.range||{from:0,to:0},query:I?.query||null,text:I?.text||null,items:[],command:U=>c({editor:e,range:I?.range||{from:0,to:0},props:U}),decorationNode:_,clientRect:j(v,_)};(w=u?.onExit)==null||w.call(u,O)}catch{}const T=v.state.tr.setMeta(D,{exit:!0});v.dispatch(T)}const N=new In({key:t,view(){return{update:async(v,D)=>{var w,T,I,_,O,U,K;const C=(w=this.key)==null?void 0:w.getState(D),E=(T=this.key)==null?void 0:T.getState(v.state),A=C.active&&E.active&&C.range.from!==E.range.from,G=!C.active&&E.active,Y=C.active&&!E.active,R=!G&&!Y&&C.query!==E.query,H=G||A&&R,X=R||A,J=Y||A&&R;if(!H&&!X&&!J)return;const W=J&&!H?C:E,P=v.dom.querySelector(`[data-decoration-id="${W.decorationId}"]`);b={editor:e,range:W.range,query:W.query,text:W.text,items:[],command:F=>c({editor:e,range:W.range,props:F}),decorationNode:P,clientRect:j(v,P)},H&&((I=u?.onBeforeStart)==null||I.call(u,b)),X&&((_=u?.onBeforeUpdate)==null||_.call(u,b)),(X||H)&&(b.items=await f({editor:e,query:W.query})),J&&((O=u?.onExit)==null||O.call(u,b)),X&&((U=u?.onUpdate)==null||U.call(u,b)),H&&((K=u?.onStart)==null||K.call(u,b))},destroy:()=>{var v;b&&((v=u?.onExit)==null||v.call(u,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(v,D,w,T){const{isEditable:I}=e,{composing:_}=e.view,{selection:O}=v,{empty:U,from:K}=O,C={...D},E=v.getMeta(t);if(E&&E.exit)return C.active=!1,C.decorationId=null,C.range={from:0,to:0},C.query=null,C.text=null,C;if(C.composing=_,I&&(U||e.view.composing)){(K<D.range.from||K>D.range.to)&&!_&&!D.composing&&(C.active=!1);const A=h({char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:O.$from}),G=`id_${Math.floor(Math.random()*4294967295)}`;A&&y({editor:e,state:T,range:A.range,isActive:D.active})&&(!p||p({editor:e,range:A.range,query:A.query,text:A.text,transaction:v}))?(C.active=!0,C.decorationId=D.decorationId?D.decorationId:G,C.range=A.range,C.query=A.query,C.text=A.text):C.active=!1}else C.active=!1;return C.active||(C.decorationId=null,C.range={from:0,to:0},C.query=null,C.text=null),C}},props:{handleKeyDown(v,D){var w,T,I,_;const{active:O,range:U}=N.getState(v.state);if(!O)return!1;if(D.key==="Escape"||D.key==="Esc"){const C=N.getState(v.state),E=(w=b?.decorationNode)!=null?w:null,A=E??(C?.decorationId?v.dom.querySelector(`[data-decoration-id="${C.decorationId}"]`):null);if(((T=u?.onKeyDown)==null?void 0:T.call(u,{view:v,event:D,range:C.range}))||!1)return!0;const Y={editor:e,range:C.range,query:C.query,text:C.text,items:[],command:R=>c({editor:e,range:C.range,props:R}),decorationNode:A,clientRect:A?()=>A.getBoundingClientRect()||null:null};return(I=u?.onExit)==null||I.call(u,Y),S(v,t),!0}return((_=u?.onKeyDown)==null?void 0:_.call(u,{view:v,event:D,range:U}))||!1},decorations(v){const{active:D,range:w,decorationId:T,query:I}=N.getState(v);if(!D)return null;const _=!I?.length,O=[d];return _&&O.push(x),Bn.create(v.doc,[Tn.inline(w.from,w.to,{nodeName:i,class:O.join(" "),"data-decoration-id":T,"data-decoration-content":m})])}}});return N}function aa(t){const e=q.c(24),{editor:n,query:o,items:a,onSelect:l,onClose:r}=t,[i,d]=B.useState(0),m=B.useRef(a),x=B.useRef(i),c=B.useRef(l),f=B.useRef(r),g=B.useDeferredValue(o);let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{d(0)},e[0]=y):y=e[0];let h;e[1]!==g?(h=[g],e[1]=g,e[2]=h):h=e[2],B.useEffect(y,h);let p,b;e[3]!==a.length||e[4]!==i?(p=()=>{i>=a.length&&a.length>0&&d(0)},b=[a.length,i],e[3]=a.length,e[4]=i,e[5]=p,e[6]=b):(p=e[5],b=e[6]),B.useEffect(p,b);let u,k;e[7]!==a?(u=()=>{m.current=a},k=[a],e[7]=a,e[8]=u,e[9]=k):(u=e[8],k=e[9]),B.useEffect(u,k);let j,S;e[10]!==i?(j=()=>{x.current=i},S=[i],e[10]=i,e[11]=j,e[12]=S):(j=e[11],S=e[12]),B.useEffect(j,S);let N,v;e[13]!==l?(v=()=>{c.current=l},N=[l],e[13]=l,e[14]=N,e[15]=v):(N=e[14],v=e[15]),B.useEffect(v,N);let D,w;e[16]!==r?(D=()=>{f.current=r},w=[r],e[16]=r,e[17]=D,e[18]=w):(D=e[17],w=e[18]),B.useEffect(D,w);let T,I;e[19]!==n?(T=()=>{if(n?.isDestroyed)return;let U;try{U=n.view.dom}catch{return}if(!U)return;const K=E=>{const A=m.current;if(!A.length)return!1;const G=()=>d(R=>(R+1)%A.length),Y=()=>d(R=>(R-1+A.length)%A.length);switch(E.key){case"ArrowUp":return E.preventDefault(),Y(),!0;case"ArrowDown":return E.preventDefault(),G(),!0;case"Tab":return E.preventDefault(),E.shiftKey?Y():G(),!0;case"Home":return E.preventDefault(),d(0),!0;case"End":return E.preventDefault(),d(A.length-1),!0;case"Enter":{if(E.isComposing)return!1;E.preventDefault();const R=x.current;return R!==-1&&A[R]&&c.current?.(A[R],R),!0}case"Escape":return E.preventDefault(),f.current?.(),!0;default:return!1}},C=E=>{K(E)};return U.addEventListener("keydown",C,!0),()=>{U?.removeEventListener("keydown",C,!0)}},I=[n],e[19]=n,e[20]=T,e[21]=I):(T=e[20],I=e[21]),B.useEffect(T,I);const _=a.length?i:void 0;let O;return e[22]!==_?(O={selectedIndex:_,setSelectedIndex:d},e[22]=_,e[23]=O):O=e[23],O}function la(t,e){switch(e.type){case"SET_SELECTED_ITEM":return{...t,selectedItem:e.payload};case"ON_START":return{...t,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...t,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return t}}const ra=B.createContext(void 0);function oa(){const t=B.useContext(ra);if(!t)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return t}function nr(t){const e=q.c(16),{editor:n,char:o,pluginKey:a,allow:l,onOpenChange:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=i):i=e[0];const[d,m]=B.useReducer(la,i);let x;e[1]!==r?(x=h=>{r?.(h)},e[1]=r,e[2]=x):x=e[2];const c=B.useEffectEvent(x);let f;e[3]!==o||e[4]!==l||e[5]!==n||e[6]!==c||e[7]!==a?(f=()=>{if(n?.isDestroyed)return;const h=a instanceof Yt?a:new Yt(a);n.state.plugins.find(u=>u.spec.key===h)&&n.unregisterPlugin(h);const b=na({pluginKey:h,editor:n,char:o,allow(u){const k=n.state.doc.resolve(u.range.from);for(let j=k.depth;j>0;j--)if(k.node(j).type.name==="image")return!1;return!(l&&!l(u))},command(){},render:()=>({onStart:u=>{m({type:"ON_START",payload:{element:u.decorationNode??null,query:u.query,range:u.range}}),c(!0)},onUpdate:u=>{m({type:"ON_UPDATE",payload:{element:u.decorationNode??null,query:u.query,range:u.range}})},onKeyDown:u=>u.event.key==="Escape"?(m({type:"ON_EXIT"}),!0):!1,onExit:()=>{m({type:"ON_EXIT"}),c(!1)}}),items:ia});return n.registerPlugin(b),()=>{n?.isDestroyed||n.unregisterPlugin(h)}},e[3]=o,e[4]=l,e[5]=n,e[6]=c,e[7]=a,e[8]=f):f=e[8];let g;e[9]!==o||e[10]!==l||e[11]!==n||e[12]!==a?(g=[n,a,o,m,l],e[9]=o,e[10]=l,e[11]=n,e[12]=a,e[13]=g):g=e[13],B.useEffect(f,g);let y;return e[14]!==d?(y={state:d,dispatch:m},e[14]=d,e[15]=y):y=e[15],y}function ia(){return[]}function ar({editor:t,queryKey:e,queryFn:n,onSelect:o}){const{state:a,dispatch:l}=oa(),r=B.useDeferredValue(a.query),{data:i}=Ys({queryKey:vt.suggestionItems(e,a.open,r),queryFn:()=>a.open?n({query:r}):[]}),d=()=>{l({type:"ON_EXIT"})},m=async(c,f)=>{if(!(a.selectedItem!==null||!a.range)){l({type:"SET_SELECTED_ITEM",payload:c});try{const{view:g}=t,h=g.state.selection.$to.nodeAfter?.text?.startsWith(" "),p=a.range?{...a.range}:{from:0,to:0};h&&a.range&&(p.to+=1),await o({range:p,item:c})===!1?l({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:x}=aa({editor:t,query:r,items:i,onSelect:m,onClose:d});return{selectedItem:a.selectedItem,items:i,selectedIndex:x,close:d,onSelect:m}}function ca(t){return t?t.run_in_progress?"generating":t.scanned_at?"ready":"none":"none"}const da=2e4;function ua(t){if(typeof t!="string"||!t)return null;try{return new URL(t).hostname||null}catch{return null}}function fa(){const t=q.c(17),{org:e}=He(),n=on.COMMERCE_DISCOVERY(e.id);let o;t[0]!==e.id||t[1]!==e.slug?(o=fs({connectionId:Ds,orgId:e.id,orgSlug:e.slug}),t[0]=e.id,t[1]=e.slug,t[2]=o):o=t[2];const{data:a}=Nt(o),r=Nt({queryKey:vt.commerceDiscoveryConnection(e.id,n),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const k=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}});return Wt(k)}}).data?.item??null,{data:i}=Nt({...fs({connectionId:n,orgId:e.id,orgSlug:e.slug}),enabled:!!r}),d=vt.commerceDiscoveryDiagnostic(e.id,n),m=!!i;let x;t[3]!==i?(x=async()=>{if(!i)throw new Error("cdClient not ready");const k=await i.callTool({name:ws,arguments:{}});return Wt(k).diagnostic??null},t[3]=i,t[4]=x):x=t[4];let c;t[5]!==d||t[6]!==m||t[7]!==x?(c={queryKey:d,enabled:m,retry:1,refetchInterval:ma,queryFn:x},t[5]=d,t[6]=m,t[7]=x,t[8]=c):c=t[8];const f=Nt(c),g=f.data??null,y=f.isSuccess,h=r?.metadata?.siteUrl;let p;t[9]!==h?(p=ua(h),t[9]=h,t[10]=p):p=t[10];const b=i??null;let u;return t[11]!==n||t[12]!==f.isSuccess||t[13]!==g||t[14]!==p||t[15]!==b?(u={diagnostic:g,isSuccess:y,host:p,connectionId:n,cdClient:b},t[11]=n,t[12]=f.isSuccess,t[13]=g,t[14]=p,t[15]=b,t[16]=u):u=t[16],u}function ma(t){return t.state.status!=="error"&&ca(t.state.data)==="generating"?da:!1}function ga(t,e){return{to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:cn(t.id),main:Wn(e,ws)}}}function xa(t){const{org:e}=He(),{data:n}=Hs.useSession(),o=yn(),a=Zt(),l=dn({connectionId:Ds,orgId:e.id,orgSlug:e.slug}),[r,i]=B.useState(!1),d=mn(t,{enabled:!1});return{connect:async()=>{if(!(r||!n?.user?.id||!e)){i(!0);try{const x=d.data??(await d.refetch()).data;if(!x){Dt.error("Could not find this integration in the registry");return}const c=Nn(x,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url){Dt.error("This integration has no connection method available");return}const f=c.app_name?await pa(l,c.app_name):null,g=!f,y=f?.id??(await o.create.mutateAsync(c)).id,h=await kn({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:p=>o.update.mutateAsync({id:y,data:{connection_token:p}}).then(()=>{})});if(h.ran&&!h.ok){if(g)try{await o.delete.mutateAsync(y)}catch{}Dt.error(`Authentication failed: ${h.error??"no token"}`);return}Ws(a,e.id),Dt.success(g?"Connected successfully":"Already connected")}catch(x){Dt.error(`Failed to connect: ${x instanceof Error?x.message:String(x)}`)}finally{i(!1)}}},isConnecting:r}}async function pa(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Ve(t){const e=q.c(8),{size:n,className:o}=t,a=n===void 0?16:n;let l;e[0]!==a?(l={width:a,height:a},e[0]=a,e[1]=l):l=e[1];let r;e[2]!==o?(r=V("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==l||e[6]!==r?(i=s.jsx("img",{src:un,alt:"Super Agent",width:a,height:a,style:l,className:r}),e[4]=a,e[5]=l,e[6]=r,e[7]=i):i=e[7],i}const gs=()=>0;function ha(t){const{orgSlug:e,enabled:n=!0,onUpdate:o,onDelete:a}=t,l=B.useRef(o);l.current=o;const r=B.useRef(a);r.current=a;const i=B.useRef(null),d=B.useRef(n),m=B.useRef(e);(!i.current||d.current!==n||m.current!==e)&&(d.current=n,m.current=e,i.current=c=>{if(!n||!e)return()=>{};const f=g=>{let y;try{y=JSON.parse(g.data)}catch{return}y.data&&(g.type===Sn?r.current?.(y.data.id):l.current(y.data)),c()};return vn.subscribe(e,f)}),B.useSyncExternalStore(i.current,gs,gs)}function ya(){const t=q.c(27),{org:e,locator:n}=He(),o=Mt(),a=Zt();let l;t[0]!==n?(l=vt.taskBoardItems(n),t[0]=n,t[1]=l):l=t[1];const r=l;let i;t[2]!==o?(i=async()=>(await o.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=o,t[3]=i):i=t[3];let d;t[4]!==r||t[5]!==i?(d={queryKey:r,queryFn:i},t[4]=r,t[5]=i,t[6]=d):d=t[6];const m=Nt(d);let x,c;t[7]!==a||t[8]!==r?(x=b=>{a.setQueryData(r,u=>{const k=u??[],j=b;return k.some(S=>S.id===j.id)?k.map(S=>S.id===j.id?j:S):[j,...k]})},c=b=>{a.setQueryData(r,u=>u?.filter(k=>k.id!==b))},t[7]=a,t[8]=r,t[9]=x,t[10]=c):(x=t[9],c=t[10]);let f;t[11]!==e.slug||t[12]!==x||t[13]!==c?(f={orgSlug:e.slug,onUpdate:x,onDelete:c},t[11]=e.slug,t[12]=x,t[13]=c,t[14]=f):f=t[14],ha(f);let g;t[15]!==a||t[16]!==r?(g=b=>{const u=b.subject,k=b.data.status;a.setQueryData(r,j=>j?.map(S=>S.threads.some(N=>N.threadId===u)?{...S,threads:S.threads.map(N=>N.threadId===u?{...N,status:k}:N)}:S))},t[15]=a,t[16]=r,t[17]=g):g=t[17];let y;t[18]!==e.slug||t[19]!==g?(y={orgSlug:e.slug,onTaskStatus:g},t[18]=e.slug,t[19]=g,t[20]=y):y=t[20],Dn(y);let h;t[21]!==m.data?(h=m.data??[],t[21]=m.data,t[22]=h):h=t[22];let p;return t[23]!==m.error||t[24]!==m.isLoading||t[25]!==h?(p={items:h,isLoading:m.isLoading,error:m.error},t[23]=m.error,t[24]=m.isLoading,t[25]=h,t[26]=p):p=t[26],p}function ba(){const t=q.c(36),{locator:e}=He(),n=Mt(),o=Zt();let a;t[0]!==e?(a=vt.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const l=a;let r;t[2]!==o||t[3]!==l?(r=()=>o.invalidateQueries({queryKey:l}),t[2]=o,t[3]=l,t[4]=r):r=t[4];const i=r;let d;t[5]!==n?(d=v=>n.call("TASK_BOARD_ITEM_CREATE",v),t[5]=n,t[6]=d):d=t[6];let m;t[7]!==i||t[8]!==d?(m={mutationFn:d,onSuccess:i},t[7]=i,t[8]=d,t[9]=m):m=t[9];const x=Tt(m);let c;t[10]!==n?(c=v=>n.call("TASK_BOARD_ITEM_UPDATE",v),t[10]=n,t[11]=c):c=t[11];let f,g;t[12]!==o||t[13]!==l?(f=async v=>{await o.cancelQueries({queryKey:l});const D=o.getQueryData(l);return o.setQueryData(l,w=>w?.map(T=>T.id===v.id?{...T,...v}:T)),{previous:D}},g=(v,D,w)=>{w?.previous&&o.setQueryData(l,w.previous)},t[12]=o,t[13]=l,t[14]=f,t[15]=g):(f=t[14],g=t[15]);let y;t[16]!==i||t[17]!==c||t[18]!==f||t[19]!==g?(y={mutationFn:c,onMutate:f,onError:g,onSettled:i},t[16]=i,t[17]=c,t[18]=f,t[19]=g,t[20]=y):y=t[20];const h=Tt(y);let p;t[21]!==n?(p=v=>n.call("TASK_BOARD_ITEM_DELETE",{id:v}),t[21]=n,t[22]=p):p=t[22];let b;t[23]!==i||t[24]!==p?(b={mutationFn:p,onSuccess:i},t[23]=i,t[24]=p,t[25]=b):b=t[25];const u=Tt(b);let k;t[26]!==n?(k=v=>n.call("TASK_BOARD_ITEM_UPDATE",v),t[26]=n,t[27]=k):k=t[27];let j;t[28]!==i||t[29]!==k?(j={mutationFn:k,onSuccess:i},t[28]=i,t[29]=k,t[30]=j):j=t[30];const S=Tt(j);let N;return t[31]!==x||t[32]!==S||t[33]!==u||t[34]!==h?(N={create:x,update:h,remove:u,link:S},t[31]=x,t[32]=S,t[33]=u,t[34]=h,t[35]=N):N=t[35],N}function Xt(t){return t.threads.some(e=>e.status==="requires_action")}function ja(t){return t.threads[0]}const Os=["triage","todo","in_progress","in_review","done"],Fe={triage:{labelKey:"taskBoard.config.statusBacklog",icon:_s,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:Cn,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:ts,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:_n,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:rs,iconClassName:"text-success"}},zs=["none","low","medium","high","urgent"],Re={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function ka(t){const e=q.c(10),{locator:n}=He(),o=Mt();let a;e[0]!==t||e[1]!==n?(a=vt.taskBoardItemPrs(n,t??""),e[0]=t,e[1]=n,e[2]=a):a=e[2];const l=!!t;let r;e[3]!==t||e[4]!==o?(r=async()=>(await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=o,e[5]=r):r=e[5];let i;return e[6]!==a||e[7]!==l||e[8]!==r?(i={queryKey:a,enabled:l,queryFn:r},e[6]=a,e[7]=l,e[8]=r,e[9]=i):i=e[9],Nt(i)}function Fs(t){const e=q.c(27),{members:n,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Is,{placeholder:"Assign to…",className:"h-9"}),e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Bs,{children:"No members found."}),e[1]=l):l=e[1];let r;e[2]!==o?(r=()=>o(Me),e[2]=o,e[3]=r):r=e[3];let i,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ve,{size:16}),d=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[4]=i,e[5]=d):(i=e[4],d=e[5]);let m;e[6]!==r?(m=s.jsxs(Ye,{value:"Super Agent",onSelect:r,className:"gap-2",children:[i,d]}),e[6]=r,e[7]=m):m=e[7];let x;e[8]!==o?(x=()=>o(null),e[8]=o,e[9]=x):x=e[9];let c,f;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),f=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[10]=c,e[11]=f):(c=e[10],f=e[11]);let g;e[12]!==x?(g=s.jsxs(Ye,{value:"Unassigned",onSelect:x,className:"gap-2",children:[c,f]}),e[12]=x,e[13]=g):g=e[13];let y;e[14]!==g||e[15]!==m?(y=s.jsxs(Pt,{children:[m,g]}),e[14]=g,e[15]=m,e[16]=y):y=e[16];let h;if(e[17]!==n||e[18]!==o){let u;e[20]!==o?(u=k=>s.jsxs(Ye,{value:k.user?.name??k.userId,onSelect:()=>o(k.userId),className:"gap-2",children:[s.jsx(Le,{url:k.user?.image??void 0,fallback:Pe(k.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:k.user?.name??k.userId})]},k.userId),e[20]=o,e[21]=u):u=e[21],h=n.map(u),e[17]=n,e[18]=o,e[19]=h}else h=e[19];let p;e[22]!==h?(p=s.jsx(Pt,{heading:"Members",children:h}),e[22]=h,e[23]=p):p=e[23];let b;return e[24]!==y||e[25]!==p?(b=s.jsxs(Ts,{children:[a,s.jsxs(Es,{children:[l,y,p]})]}),e[24]=y,e[25]=p,e[26]=b):b=e[26],b}function Na(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function xs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const va=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),wt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent";function Sa(t){const e=q.c(199),{open:n,onClose:o,item:a,defaultStatus:l,onSubmit:r,onDelete:i,onOpenThread:d,onNewChat:m,isSaving:x}=t,c=te(),{data:f}=Cs(),g=f?.data?.members??[],{handleCopy:y,copied:h}=On(),[p,b]=B.useState(a?.title??""),[u,k]=B.useState(a?.description??""),[j,S]=B.useState(a?.status??l??"triage"),[N,v]=B.useState(a?.priority??"medium"),[D,w]=B.useState(a?.assigneeId??null),T=a?.dueDate;let I;e[0]!==T?(I=xs(T),e[0]=T,e[1]=I):I=e[1];const[_,O]=B.useState(I),[U,K]=B.useState(!1),[C,E]=B.useState(!1);let A;e[2]!==l||e[3]!==a?.assigneeId||e[4]!==a?.description||e[5]!==a?.dueDate||e[6]!==a?.priority||e[7]!==a?.status||e[8]!==a?.title||e[9]!==w||e[10]!==O?(A=()=>{b(a?.title??""),k(a?.description??""),S(a?.status??l??"triage"),v(a?.priority??"medium"),w(a?.assigneeId??null),O(xs(a?.dueDate))},e[2]=l,e[3]=a?.assigneeId,e[4]=a?.description,e[5]=a?.dueDate,e[6]=a?.priority,e[7]=a?.status,e[8]=a?.title,e[9]=w,e[10]=O,e[11]=A):A=e[11];const G=A;let Y;e[12]!==o||e[13]!==G?(Y=()=>{o(),G()},e[12]=o,e[13]=G,e[14]=Y):Y=e[14];const R=Y;let H;e[15]!==D||e[16]!==u||e[17]!==_||e[18]!==r||e[19]!==N||e[20]!==j||e[21]!==p?(H=()=>{const $=p.trim();$&&r({title:$,description:u.trim()||null,status:j,priority:N,assigneeId:D,dueDate:_?Na(_):null})},e[15]=D,e[16]=u,e[17]=_,e[18]=r,e[19]=N,e[20]=j,e[21]=p,e[22]=H):H=e[22];const X=H,J=D===Me;let W;e[23]!==D?(W=$=>$.userId===D,e[23]=D,e[24]=W):W=e[24];const P=g.find(W),F=a?.assignedBy?g.find($=>$.userId===a.assignedBy):void 0,Z=Fe[j].icon,ee=as;let z;e[25]!==R?(z=$=>!$&&R(),e[25]=R,e[26]=z):z=e[26];const L=ns,se="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",je="hidden";let ne;e[27]!==a||e[28]!==c?(ne=c(a?"taskBoard.taskDialog.editTaskTitle":"taskBoard.taskDialog.newTaskTitle"),e[27]=a,e[28]=c,e[29]=ne):ne=e[29];let ae;e[30]!==ne?(ae=s.jsx(ls,{className:"sr-only",children:ne}),e[30]=ne,e[31]=ae):ae=e[31];let le;e[32]!==c?(le=c("taskBoard.taskDialog.closeAriaLabel"),e[32]=c,e[33]=le):le=e[33];let ie;e[34]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ms,{size:16}),e[34]=ie):ie=e[34];let ce;e[35]!==R||e[36]!==le?(ce=s.jsx("button",{type:"button","aria-label":le,onClick:R,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ie}),e[35]=R,e[36]=le,e[37]=ce):ce=e[37];const qe="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let Ne;e[38]===Symbol.for("react.memo_cache_sentinel")?(Ne=$=>{b($.target.value),$.target.style.height="auto",$.target.style.height=`${$.target.scrollHeight}px`},e[38]=Ne):Ne=e[38];let de;e[39]!==c?(de=c("taskBoard.taskDialog.taskTitlePlaceholder"),e[39]=c,e[40]=de):de=e[40];let ue;e[41]!==de||e[42]!==p?(ue=s.jsx("textarea",{ref:wa,value:p,onChange:Ne,onKeyDown:Da,placeholder:de,autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=de,e[42]=p,e[43]=ue):ue=e[43];let Oe;e[44]===Symbol.for("react.memo_cache_sentinel")?(Oe=$=>k($.target.value),e[44]=Oe):Oe=e[44];let M;e[45]!==c?(M=c("taskBoard.taskDialog.descriptionPlaceholder"),e[45]=c,e[46]=M):M=e[46];let re;e[47]!==u||e[48]!==M?(re=s.jsx("textarea",{value:u,onChange:Oe,placeholder:M,className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[47]=u,e[48]=M,e[49]=re):re=e[49];let oe;e[50]!==h||e[51]!==u||e[52]!==y||e[53]!==c?(oe=u&&s.jsx(ke,{type:"button",variant:"ghost",size:"icon","aria-label":c("taskBoard.taskDialog.copyDescriptionAriaLabel"),className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>y(u),children:h?s.jsx(zn,{size:14}):s.jsx(Rn,{size:14})}),e[50]=h,e[51]=u,e[52]=y,e[53]=c,e[54]=oe):oe=e[54];let Ce;e[55]!==re||e[56]!==oe?(Ce=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[re,oe]}),e[55]=re,e[56]=oe,e[57]=Ce):Ce=e[57];const _e=a&&a.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-2",children:a.threads.map($=>s.jsx(Ca,{thread:$,startedBy:F??P,onOpen:d},$.threadId))});let Ie;e[58]!==a?(Ie=a?.id&&s.jsx(Ba,{itemId:a.id}),e[58]=a,e[59]=Ie):Ie=e[59];let ve;e[60]!==ue||e[61]!==Ce||e[62]!==_e||e[63]!==Ie?(ve=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[ue,Ce,_e,Ie]}),e[60]=ue,e[61]=Ce,e[62]=_e,e[63]=Ie,e[64]=ve):ve=e[64];const ds="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let ze;e[65]!==c?(ze=c("taskBoard.taskDialog.propertiesLabel"),e[65]=c,e[66]=ze):ze=e[66];let Se;e[67]!==ze?(Se=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:ze}),e[67]=ze,e[68]=Se):Se=e[68];const Ke="flex flex-wrap gap-2 sm:flex-col",Be=Fe[j];let fe;e[69]!==Z||e[70]!==Be.iconClassName?(fe=s.jsx(Z,{size:16,className:Be.iconClassName}),e[69]=Z,e[70]=Be.iconClassName,e[71]=fe):fe=e[71];const Te=Fe[j];let Ee;e[72]!==c||e[73]!==Te.labelKey?(Ee=c(Te.labelKey),e[72]=c,e[73]=Te.labelKey,e[74]=Ee):Ee=e[74];let De;e[75]!==fe||e[76]!==Ee?(De=s.jsx(zt,{asChild:!0,children:s.jsxs("button",{type:"button",className:wt,children:[fe,Ee]})}),e[75]=fe,e[76]=Ee,e[77]=De):De=e[77];let me;e[78]!==c?(me=Os.map($=>{const Qs=Fe[$].icon;return s.jsxs(St,{onSelect:()=>S($),className:"gap-2",children:[s.jsx(Qs,{size:16,className:Fe[$].iconClassName}),c(Fe[$].labelKey)]},$)}),e[78]=c,e[79]=me):me=e[79];let ge;e[80]!==me?(ge=s.jsx(Ft,{align:"start",className:"w-44",children:me}),e[80]=me,e[81]=ge):ge=e[81];let Ae;e[82]!==De||e[83]!==ge?(Ae=s.jsxs(Rt,{children:[De,ge]}),e[82]=De,e[83]=ge,e[84]=Ae):Ae=e[84];const Ue=N==="none"&&"text-muted-foreground";let xe;e[85]!==Ue?(xe=V(wt,Ue),e[85]=Ue,e[86]=xe):xe=e[86];let pe;e[87]!==N||e[88]!==c?(pe=N==="none"?s.jsxs(s.Fragment,{children:[s.jsx(en,{size:16}),c("taskBoard.taskDialog.setPriorityButton")]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:V("size-2 rounded-full",Re[N].dotClassName)}),c(Re[N].labelKey)]}),e[87]=N,e[88]=c,e[89]=pe):pe=e[89];let he;e[90]!==xe||e[91]!==pe?(he=s.jsx(zt,{asChild:!0,children:s.jsx("button",{type:"button",className:xe,children:pe})}),e[90]=xe,e[91]=pe,e[92]=he):he=e[92];let we;e[93]!==c?(we=zs.map($=>s.jsxs(St,{onSelect:()=>v($),children:[s.jsx("span",{className:V("size-2 rounded-full",Re[$].dotClassName)}),c(Re[$].labelKey)]},$)),e[93]=c,e[94]=we):we=e[94];let ye;e[95]!==we?(ye=s.jsx(Ft,{align:"start",className:"w-40",children:we}),e[95]=we,e[96]=ye):ye=e[96];let be;e[97]!==he||e[98]!==ye?(be=s.jsxs(Rt,{children:[he,ye]}),e[97]=he,e[98]=ye,e[99]=be):be=e[99];const Ge="flex flex-col",$e=$t,Q=!0,Qe=At,Us=!0,Gs="button",Kt=!D&&"text-muted-foreground";let We;e[100]!==Kt?(We=V(wt,Kt),e[100]=Kt,e[101]=We):We=e[101];const Ut=J&&F?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(Le,{url:F.user?.image??void 0,fallback:Pe(F.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:F.user?.name??c("taskBoard.taskDialog.superAgentDefaultName")})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(Le,{url:F.user?.image??void 0,fallback:Pe(F.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Ve,{size:16,className:"ring-2 ring-background"})]}),c("taskBoard.taskDialog.superAgentLabel")]})]}):J?s.jsxs(s.Fragment,{children:[s.jsx(Ve,{size:16}),c("taskBoard.taskDialog.superAgentLabel")]}):P?s.jsxs(s.Fragment,{children:[s.jsx(Le,{url:P.user?.image??void 0,fallback:Pe(P.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:P.user?.name??c("taskBoard.taskDialog.unassignedLabel")})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ns,{size:16,className:"text-muted-foreground"}),c("taskBoard.taskDialog.assignButton")]});let Xe;e[102]!==We||e[103]!==Ut?(Xe=s.jsx("button",{type:Gs,className:We,children:Ut}),e[102]=We,e[103]=Ut,e[104]=Xe):Xe=e[104];let Je;e[105]!==Qe||e[106]!==Xe?(Je=s.jsx(Qe,{asChild:Us,children:Xe}),e[105]=Qe,e[106]=Xe,e[107]=Je):Je=e[107];let Ze;e[108]!==w||e[109]!==E?(Ze=$=>{w($),E(!1)},e[108]=w,e[109]=E,e[110]=Ze):Ze=e[110];let et;e[111]!==g||e[112]!==Ze?(et=s.jsx(Ot,{align:"start",className:"w-56 p-0",children:s.jsx(Fs,{members:g,onSelect:Ze})}),e[111]=g,e[112]=Ze,e[113]=et):et=e[113];let tt;e[114]!==$e||e[115]!==C||e[116]!==E||e[117]!==Je||e[118]!==et?(tt=s.jsxs($e,{open:C,onOpenChange:E,modal:Q,children:[Je,et]}),e[114]=$e,e[115]=C,e[116]=E,e[117]=Je,e[118]=et,e[119]=tt):tt=e[119];let st;e[120]!==F||e[121]!==J||e[122]!==c?(st=J&&F&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:V(wt,"pointer-events-none"),children:[s.jsx(Ve,{size:16}),c("taskBoard.taskDialog.superAgentLabel")]})]}),e[120]=F,e[121]=J,e[122]=c,e[123]=st):st=e[123];let nt;e[124]!==tt||e[125]!==st?(nt=s.jsxs("div",{className:Ge,children:[tt,st]}),e[124]=tt,e[125]=st,e[126]=nt):nt=e[126];const Gt=!_&&"text-muted-foreground";let at;e[127]!==Gt?(at=V(wt,Gt),e[127]=Gt,e[128]=at):at=e[128];let _t;e[129]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Ct,{size:16,className:"text-muted-foreground"}),e[129]=_t):_t=e[129];let lt;e[130]!==_||e[131]!==c?(lt=_?va.format(_):c("taskBoard.taskDialog.dueDateLabel"),e[130]=_,e[131]=c,e[132]=lt):lt=e[132];let rt;e[133]!==_||e[134]!==O||e[135]!==c?(rt=_&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":c("taskBoard.taskDialog.clearDueDateAriaLabel"),className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:$=>{$.stopPropagation(),O(null)},onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),$.stopPropagation(),O(null))},children:s.jsx(ms,{size:12})}),e[133]=_,e[134]=O,e[135]=c,e[136]=rt):rt=e[136];let ot;e[137]!==at||e[138]!==lt||e[139]!==rt?(ot=s.jsx(At,{asChild:!0,children:s.jsxs("button",{type:"button",className:at,children:[_t,lt,rt]})}),e[137]=at,e[138]=lt,e[139]=rt,e[140]=ot):ot=e[140];const Qt=_??void 0;let it;e[141]!==O||e[142]!==K?(it=$=>{O($??null),$&&K(!1)},e[141]=O,e[142]=K,e[143]=it):it=e[143];let ct;e[144]!==Qt||e[145]!==it?(ct=s.jsx(Ot,{className:"w-auto p-0",align:"start",children:s.jsx(An,{mode:"single",selected:Qt,onSelect:it,initialFocus:!0})}),e[144]=Qt,e[145]=it,e[146]=ct):ct=e[146];let dt;e[147]!==U||e[148]!==K||e[149]!==ot||e[150]!==ct?(dt=s.jsxs($t,{open:U,onOpenChange:K,children:[ot,ct]}),e[147]=U,e[148]=K,e[149]=ot,e[150]=ct,e[151]=dt):dt=e[151];let ut;e[152]!==Ae||e[153]!==be||e[154]!==nt||e[155]!==dt?(ut=s.jsxs("div",{className:Ke,children:[Ae,be,nt,dt]}),e[152]=Ae,e[153]=be,e[154]=nt,e[155]=dt,e[156]=ut):ut=e[156];let ft;e[157]!==Se||e[158]!==ut?(ft=s.jsxs("div",{className:ds,children:[Se,ut]}),e[157]=Se,e[158]=ut,e[159]=ft):ft=e[159];let mt;e[160]!==ve||e[161]!==ft?(mt=s.jsxs("div",{className:qe,children:[ve,ft]}),e[160]=ve,e[161]=ft,e[162]=mt):mt=e[162];let gt;e[163]!==a||e[164]!==i||e[165]!==c?(gt=a&&i?s.jsx(ke,{variant:"ghost",size:"icon","aria-label":c("taskBoard.taskDialog.deleteTaskAriaLabel"),className:"size-10 text-muted-foreground hover:text-destructive",onClick:i,children:s.jsx(tn,{size:16})}):s.jsx("span",{}),e[163]=a,e[164]=i,e[165]=c,e[166]=gt):gt=e[166];let xt;e[167]!==a||e[168]!==m||e[169]!==c?(xt=a&&m&&s.jsxs(ke,{variant:"outline",size:"sm",onClick:m,children:[s.jsx(sn,{size:16}),c("taskBoard.taskDialog.newChatButton")]}),e[167]=a,e[168]=m,e[169]=c,e[170]=xt):xt=e[170];let pt;e[171]!==x||e[172]!==p?(pt=!p.trim()||x,e[171]=x,e[172]=p,e[173]=pt):pt=e[173];let It;e[174]===Symbol.for("react.memo_cache_sentinel")?(It=s.jsx(ss,{size:16}),e[174]=It):It=e[174];let ht;e[175]!==a||e[176]!==c?(ht=c(a?"taskBoard.taskDialog.saveButton":"taskBoard.taskDialog.createTaskButton"),e[175]=a,e[176]=c,e[177]=ht):ht=e[177];let yt;e[178]!==X||e[179]!==pt||e[180]!==ht?(yt=s.jsxs(ke,{size:"sm",disabled:pt,onClick:X,children:[It,ht]}),e[178]=X,e[179]=pt,e[180]=ht,e[181]=yt):yt=e[181];let bt;e[182]!==xt||e[183]!==yt?(bt=s.jsxs("div",{className:"flex items-center gap-2",children:[xt,yt]}),e[182]=xt,e[183]=yt,e[184]=bt):bt=e[184];let jt;e[185]!==gt||e[186]!==bt?(jt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[gt,bt]}),e[185]=gt,e[186]=bt,e[187]=jt):jt=e[187];let kt;e[188]!==L||e[189]!==ae||e[190]!==ce||e[191]!==mt||e[192]!==jt?(kt=s.jsxs(L,{className:se,closeButtonClassName:je,children:[ae,ce,mt,jt]}),e[188]=L,e[189]=ae,e[190]=ce,e[191]=mt,e[192]=jt,e[193]=kt):kt=e[193];let Bt;return e[194]!==ee||e[195]!==n||e[196]!==z||e[197]!==kt?(Bt=s.jsx(ee,{open:n,onOpenChange:z,children:kt}),e[194]=ee,e[195]=n,e[196]=z,e[197]=kt,e[198]=Bt):Bt=e[198],Bt}function Da(t){t.key==="Enter"&&t.preventDefault()}function wa(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Ca(t){const e=q.c(17),{thread:n,startedBy:o,onOpen:a}=t,l=te();let r;if(e[0]!==a||e[1]!==o||e[2]!==l||e[3]!==n){const i={failed:{label:l("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:nn},requires_action:{label:l("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:vs},in_progress:{label:l("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:ts,spin:!0},completed:{label:l("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:rs},expired:{label:l("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:_s}},d=n.status?i[n.status]:null,m=n.lastMessage;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ve,{size:16}),e[5]=x):x=e[5];let c;e[6]!==l||e[7]!==n.title?(c=n.title||l("taskBoard.taskDialog.superAgentDefaultName"),e[6]=l,e[7]=n.title,e[8]=c):c=e[8];let f;e[9]!==c?(f=s.jsx("span",{className:"truncate text-sm text-foreground",children:c}),e[9]=c,e[10]=f):f=e[10];let g;e[11]!==o||e[12]!==l?(g=o&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:l("taskBoard.taskDialog.startedByLabel")}),s.jsx(Le,{url:o.user?.image??void 0,fallback:Pe(o.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:o.user?.name??l("taskBoard.taskDialog.someoneLabel")})]}),e[11]=o,e[12]=l,e[13]=g):g=e[13];let y;e[14]!==f||e[15]!==g?(y=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[x,f,g]}),e[14]=f,e[15]=g,e[16]=y):y=e[16],r=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[y,d&&s.jsxs("button",{type:"button",disabled:!a,onClick:()=>a?.(n),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:V("flex items-center gap-1.5",d.className),children:[s.jsx(d.icon,{size:16,className:V(d.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:d.label})]}),m&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:m}),a&&s.jsx(Fn,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]})]}),e[0]=a,e[1]=o,e[2]=l,e[3]=n,e[4]=r}else r=e[4];return r}function _a(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:an}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:Et}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:Et}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:Et}}function Ia(t){const e=q.c(39),{pr:n}=t,o=te();let a,l,r,i,d,m,x,c;if(e[0]!==n||e[1]!==o){l=_a(n,o);let N;e[10]!==n.body?(N=n.body?.trim(),e[10]=n.body,e[11]=N):N=e[11],a=N,d=n.url,m="_blank",x="noreferrer",c="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",i="flex items-center gap-2",r=V("flex items-center gap-1.5",l.className),e[0]=n,e[1]=o,e[2]=a,e[3]=l,e[4]=r,e[5]=i,e[6]=d,e[7]=m,e[8]=x,e[9]=c}else a=e[2],l=e[3],r=e[4],i=e[5],d=e[6],m=e[7],x=e[8],c=e[9];let f;e[12]!==l.icon?(f=s.jsx(l.icon,{size:16}),e[12]=l.icon,e[13]=f):f=e[13];let g;e[14]!==l.label?(g=s.jsx("span",{className:"text-sm",children:l.label}),e[14]=l.label,e[15]=g):g=e[15];let y;e[16]!==r||e[17]!==f||e[18]!==g?(y=s.jsxs("span",{className:r,children:[f,g]}),e[16]=r,e[17]=f,e[18]=g,e[19]=y):y=e[19];const h=n.title??`${n.repoOwner}/${n.repoName}`;let p;e[20]!==h?(p=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:h}),e[20]=h,e[21]=p):p=e[21];let b;e[22]!==n.number?(b=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",n.number]}),e[22]=n.number,e[23]=b):b=e[23];let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pn,{size:16,className:"shrink-0 text-muted-foreground"}),e[24]=u):u=e[24];let k;e[25]!==p||e[26]!==b||e[27]!==i||e[28]!==y?(k=s.jsxs("span",{className:i,children:[y,p,b,u]}),e[25]=p,e[26]=b,e[27]=i,e[28]=y,e[29]=k):k=e[29];let j;e[30]!==a?(j=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[30]=a,e[31]=j):j=e[31];let S;return e[32]!==k||e[33]!==j||e[34]!==d||e[35]!==m||e[36]!==x||e[37]!==c?(S=s.jsxs("a",{href:d,target:m,rel:x,className:c,children:[k,j]}),e[32]=k,e[33]=j,e[34]=d,e[35]=m,e[36]=x,e[37]=c,e[38]=S):S=e[38],S}function Ba(t){const e=q.c(11),{itemId:n}=t,o=te(),{data:a,isLoading:l}=ka(n);if(!l&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Et,{size:16,className:"text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==o?(i=o("taskBoard.taskDialog.pullRequestsLabel"),e[1]=o,e[2]=i):i=e[2];let d;e[3]!==i?(d=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[r,s.jsx("span",{className:"text-sm text-foreground",children:i})]}),e[3]=i,e[4]=d):d=e[4];let m;e[5]!==a||e[6]!==o?(m=a?a.map(Ta):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(ts,{size:16,className:"animate-spin"}),s.jsx("span",{children:o("taskBoard.taskDialog.loadingLabel")})]}),e[5]=a,e[6]=o,e[7]=m):m=e[7];let x;return e[8]!==d||e[9]!==m?(x=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[d,m]}),e[8]=d,e[9]=m,e[10]=x):x=e[10],x}function Ta(t){return s.jsx(Ia,{pr:t},t.url)}function Ea(t,e=[]){const n=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
3
-
4
- `)];if(e.length>0){const o=e.map(a=>{const l=a.merged?"merged":a.state??(a.draft?"draft":"open"),r=a.title?.trim()||`${a.repoOwner}/${a.repoName}`;return`- #${a.number} ${r} [${l}] ${a.url}`});n.push(["## Linked pull requests",...o].join(`
5
- `))}if(t.threads.length>0){const o=t.threads.map(a=>{const l=a.title?.trim()||"Untitled chat";return a.status?`- ${l} [${a.status}]`:`- ${l}`});n.push(["## Other chats on this task",...o].join(`
6
- `))}return n.join(`
7
-
8
- `)}const Jt="__unassigned__",Lt={assignee:null,priority:null,due:null};function Aa(t){return t.assignee!==null||t.priority!==null||t.due!==null}function $a(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Oa=864e5;function za(t,e){const n=new Date(t),o=new Date(e);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function Fa(t,e){if(e.assignee!==null){if(e.assignee===Jt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const n=new Date(t.dueDate).getTime(),o=Date.now();if(e.due==="overdue"&&n>=o||e.due==="today"&&!za(n,o)||e.due==="week"&&(n<o||n>o+7*Oa))return!1}return!0}const ps={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function qt(t,e=!1){return V("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Ra(t){const e=q.c(95),{value:n,members:o,onChange:a,block:l}=t,r=te(),[i,d]=B.useState(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ht,{size:14,className:"shrink-0"}),e[0]=m):m=e[0];let x=m,c;e[1]!==r?(c=r("taskBoard.taskFilters.assigneeLabel"),e[1]=r,e[2]=c):c=e[2];let f=c;if(n===Jt){let z;e[3]!==r?(z=r("taskBoard.taskFilters.assigneeUnassigned"),e[3]=r,e[4]=z):z=e[4],f=z}else if(n===Me){let z;e[5]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ve,{size:14}),e[5]=z):z=e[5],x=z;let L;e[6]!==r?(L=r("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=r,e[7]=L):L=e[7],f=L}else if(n){let z,L,se,je;if(e[8]!==o||e[9]!==n){let le;e[14]!==n?(le=ie=>ie.userId===n,e[14]=n,e[15]=le):le=e[15],L=o.find(le),z=Le,se=L?.user?.image??void 0,je=Pe(L?.user?.name),e[8]=o,e[9]=n,e[10]=z,e[11]=L,e[12]=se,e[13]=je}else z=e[10],L=e[11],se=e[12],je=e[13];let ne;e[16]!==z||e[17]!==se||e[18]!==je?(ne=s.jsx(z,{url:se,fallback:je,shape:"circle",size:"2xs"}),e[16]=z,e[17]=se,e[18]=je,e[19]=ne):ne=e[19],x=ne;let ae;e[20]!==L?.user?.name||e[21]!==r?(ae=L?.user?.name??r("taskBoard.taskFilters.assigneeMember"),e[20]=L?.user?.name,e[21]=r,e[22]=ae):ae=e[22],f=ae}let g;e[23]!==a?(g=z=>{a(z),d(!1)},e[23]=a,e[24]=g):g=e[24];const y=g,h=n!==null;let p;e[25]!==l||e[26]!==h?(p=qt(h,l),e[25]=l,e[26]=h,e[27]=p):p=e[27];const b=p,u=l&&"ml-auto";let k;e[28]!==u?(k=V("shrink-0 opacity-60",u),e[28]=u,e[29]=k):k=e[29];const j=k;let S;e[30]!==f?(S=s.jsx("span",{className:"max-w-[10rem] truncate",children:f}),e[30]=f,e[31]=S):S=e[31];let N;e[32]!==j?(N=s.jsx(os,{size:12,className:j}),e[32]=j,e[33]=N):N=e[33];let v;e[34]!==x||e[35]!==S||e[36]!==N||e[37]!==b?(v=s.jsx(At,{asChild:!0,children:s.jsxs("button",{type:"button",className:b,children:[x,S,N]})}),e[34]=x,e[35]=S,e[36]=N,e[37]=b,e[38]=v):v=e[38];let D;e[39]!==r?(D=r("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=r,e[40]=D):D=e[40];let w;e[41]!==D?(w=s.jsx(Is,{placeholder:D,className:"h-9"}),e[41]=D,e[42]=w):w=e[42];let T;e[43]!==r?(T=r("taskBoard.taskFilters.assigneeNoMembersFound"),e[43]=r,e[44]=T):T=e[44];let I;e[45]!==T?(I=s.jsx(Bs,{children:T}),e[45]=T,e[46]=I):I=e[46];let _;e[47]!==y?(_=()=>y(null),e[47]=y,e[48]=_):_=e[48];let O;e[49]!==r?(O=r("taskBoard.taskFilters.assigneeAnyone"),e[49]=r,e[50]=O):O=e[50];let U;e[51]!==_||e[52]!==O?(U=s.jsx(Ye,{value:"Anyone",onSelect:_,children:O}),e[51]=_,e[52]=O,e[53]=U):U=e[53];let K;e[54]!==y?(K=()=>y(Jt),e[54]=y,e[55]=K):K=e[55];let C;e[56]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),e[56]=C):C=e[56];let E;e[57]!==r?(E=r("taskBoard.taskFilters.assigneeUnassigned"),e[57]=r,e[58]=E):E=e[58];let A;e[59]!==K||e[60]!==E?(A=s.jsxs(Ye,{value:"Unassigned",onSelect:K,className:"gap-2",children:[C,E]}),e[59]=K,e[60]=E,e[61]=A):A=e[61];let G;e[62]!==y?(G=()=>y(Me),e[62]=y,e[63]=G):G=e[63];let Y;e[64]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Ve,{size:16}),e[64]=Y):Y=e[64];let R;e[65]!==r?(R=r("taskBoard.taskFilters.assigneeSuperAgent"),e[65]=r,e[66]=R):R=e[66];let H;e[67]!==G||e[68]!==R?(H=s.jsxs(Ye,{value:"Super Agent",onSelect:G,className:"gap-2",children:[Y,R]}),e[67]=G,e[68]=R,e[69]=H):H=e[69];let X;e[70]!==U||e[71]!==A||e[72]!==H?(X=s.jsxs(Pt,{children:[U,A,H]}),e[70]=U,e[71]=A,e[72]=H,e[73]=X):X=e[73];let J;e[74]!==r?(J=r("taskBoard.taskFilters.assigneeGroupMembers"),e[74]=r,e[75]=J):J=e[75];let W;if(e[76]!==o||e[77]!==y){let z;e[79]!==y?(z=L=>s.jsxs(Ye,{value:L.user?.name??L.userId,onSelect:()=>y(L.userId),className:"gap-2",children:[s.jsx(Le,{url:L.user?.image??void 0,fallback:Pe(L.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:L.user?.name??L.userId})]},L.userId),e[79]=y,e[80]=z):z=e[80],W=o.map(z),e[76]=o,e[77]=y,e[78]=W}else W=e[78];let P;e[81]!==J||e[82]!==W?(P=s.jsx(Pt,{heading:J,children:W}),e[81]=J,e[82]=W,e[83]=P):P=e[83];let F;e[84]!==I||e[85]!==X||e[86]!==P?(F=s.jsxs(Es,{children:[I,X,P]}),e[84]=I,e[85]=X,e[86]=P,e[87]=F):F=e[87];let Z;e[88]!==w||e[89]!==F?(Z=s.jsx(Ot,{align:"start",className:"w-56 p-0",children:s.jsxs(Ts,{children:[w,F]})}),e[88]=w,e[89]=F,e[90]=Z):Z=e[90];let ee;return e[91]!==i||e[92]!==v||e[93]!==Z?(ee=s.jsxs($t,{open:i,onOpenChange:d,children:[v,Z]}),e[91]=i,e[92]=v,e[93]=Z,e[94]=ee):ee=e[94],ee}function Pa(t){const e=q.c(33),{value:n,onChange:o,block:a}=t,l=te(),r=n!==null;let i;e[0]!==a||e[1]!==r?(i=qt(r,a),e[0]=a,e[1]=r,e[2]=i):i=e[2];const d=i,m=a&&"ml-auto";let x;e[3]!==m?(x=V("shrink-0 opacity-60",m),e[3]=m,e[4]=x):x=e[4];const c=x;let f;e[5]!==n?(f=n?s.jsx("span",{className:V("size-2 shrink-0 rounded-full",Re[n].dotClassName)}):s.jsx(Qn,{size:14,className:"shrink-0"}),e[5]=n,e[6]=f):f=e[6];let g;e[7]!==l||e[8]!==n?(g=l(n?Re[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=n,e[9]=g):g=e[9];let y;e[10]!==c?(y=s.jsx(os,{size:12,className:c}),e[10]=c,e[11]=y):y=e[11];let h;e[12]!==f||e[13]!==g||e[14]!==y||e[15]!==d?(h=s.jsx(zt,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,children:[f,g,y]})}),e[12]=f,e[13]=g,e[14]=y,e[15]=d,e[16]=h):h=e[16];let p;e[17]!==o?(p=()=>o(null),e[17]=o,e[18]=p):p=e[18];let b;e[19]!==l?(b=l("taskBoard.taskFilters.priorityAnyPriority"),e[19]=l,e[20]=b):b=e[20];let u;e[21]!==b||e[22]!==p?(u=s.jsx(St,{onSelect:p,children:b}),e[21]=b,e[22]=p,e[23]=u):u=e[23];let k;e[24]!==o||e[25]!==l?(k=zs.map(N=>s.jsxs(St,{onSelect:()=>o(N),className:"gap-2",children:[s.jsx("span",{className:V("size-2 rounded-full",Re[N].dotClassName)}),l(Re[N].labelKey)]},N)),e[24]=o,e[25]=l,e[26]=k):k=e[26];let j;e[27]!==u||e[28]!==k?(j=s.jsxs(Ft,{align:"start",className:"w-40",children:[u,k]}),e[27]=u,e[28]=k,e[29]=j):j=e[29];let S;return e[30]!==j||e[31]!==h?(S=s.jsxs(Rt,{children:[h,j]}),e[30]=j,e[31]=h,e[32]=S):S=e[32],S}function La(t){const e=q.c(35),{value:n,onChange:o,block:a}=t,l=te();let r;e[0]!==l||e[1]!==n?(r=n?l(ps[n]):void 0,e[0]=l,e[1]=n,e[2]=r):r=e[2];const i=r,d=n!==null;let m;e[3]!==a||e[4]!==d?(m=qt(d,a),e[3]=a,e[4]=d,e[5]=m):m=e[5];const x=m,c=a&&"ml-auto";let f;e[6]!==c?(f=V("shrink-0 opacity-60",c),e[6]=c,e[7]=f):f=e[7];const g=f;let y;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ct,{size:14,className:"shrink-0"}),e[8]=y):y=e[8];let h;e[9]!==i||e[10]!==l?(h=i??l("taskBoard.taskFilters.dueDateLabel"),e[9]=i,e[10]=l,e[11]=h):h=e[11];let p;e[12]!==g?(p=s.jsx(os,{size:12,className:g}),e[12]=g,e[13]=p):p=e[13];let b;e[14]!==h||e[15]!==p||e[16]!==x?(b=s.jsx(zt,{asChild:!0,children:s.jsxs("button",{type:"button",className:x,children:[y,h,p]})}),e[14]=h,e[15]=p,e[16]=x,e[17]=b):b=e[17];let u;e[18]!==o?(u=()=>o(null),e[18]=o,e[19]=u):u=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Ct,{size:16,className:"text-muted-foreground"}),e[20]=k):k=e[20];let j;e[21]!==l?(j=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=j):j=e[22];let S;e[23]!==u||e[24]!==j?(S=s.jsxs(St,{onSelect:u,className:"gap-2",children:[k,j]}),e[23]=u,e[24]=j,e[25]=S):S=e[25];let N;e[26]!==o||e[27]!==l?(N=Object.entries(ps).map(w=>{const[T,I]=w,_=T==="overdue";return s.jsxs(St,{onSelect:()=>o(T),className:V("gap-2",_&&"text-destructive"),children:[s.jsx(Ct,{size:16,className:V("shrink-0",_?"text-destructive":"text-muted-foreground")}),l(I)]},T)}),e[26]=o,e[27]=l,e[28]=N):N=e[28];let v;e[29]!==S||e[30]!==N?(v=s.jsxs(Ft,{align:"start",className:"w-44",children:[S,N]}),e[29]=S,e[30]=N,e[31]=v):v=e[31];let D;return e[32]!==v||e[33]!==b?(D=s.jsxs(Rt,{children:[b,v]}),e[32]=v,e[33]=b,e[34]=D):D=e[34],D}function Rs(t){const e=q.c(26),{filters:n,members:o,onChange:a,block:l}=t;let r;e[0]!==n||e[1]!==a?(r=g=>a({...n,assignee:g}),e[0]=n,e[1]=a,e[2]=r):r=e[2];let i;e[3]!==l||e[4]!==n.assignee||e[5]!==o||e[6]!==r?(i=s.jsx(Ra,{block:l,value:n.assignee,members:o,onChange:r}),e[3]=l,e[4]=n.assignee,e[5]=o,e[6]=r,e[7]=i):i=e[7];let d;e[8]!==n||e[9]!==a?(d=g=>a({...n,priority:g}),e[8]=n,e[9]=a,e[10]=d):d=e[10];let m;e[11]!==l||e[12]!==n.priority||e[13]!==d?(m=s.jsx(Pa,{block:l,value:n.priority,onChange:d}),e[11]=l,e[12]=n.priority,e[13]=d,e[14]=m):m=e[14];let x;e[15]!==n||e[16]!==a?(x=g=>a({...n,due:g}),e[15]=n,e[16]=a,e[17]=x):x=e[17];let c;e[18]!==l||e[19]!==n.due||e[20]!==x?(c=s.jsx(La,{block:l,value:n.due,onChange:x}),e[18]=l,e[19]=n.due,e[20]=x,e[21]=c):c=e[21];let f;return e[22]!==i||e[23]!==m||e[24]!==c?(f=s.jsxs(s.Fragment,{children:[i,m,c]}),e[22]=i,e[23]=m,e[24]=c,e[25]=f):f=e[25],f}function Ma(t){const e=q.c(12),{filters:n,members:o,onChange:a}=t,l=te();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(As,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==n||e[2]!==o||e[3]!==a?(i=s.jsx(Rs,{filters:n,members:o,onChange:a}),e[1]=n,e[2]=o,e[3]=a,e[4]=i):i=e[4];let d;e[5]!==n||e[6]!==a||e[7]!==l?(d=Aa(n)&&s.jsx("button",{type:"button",onClick:()=>a(Lt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[5]=n,e[6]=a,e[7]=l,e[8]=d):d=e[8];let m;return e[9]!==i||e[10]!==d?(m=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,i,d]}),e[9]=i,e[10]=d,e[11]=m):m=e[11],m}function qa(t){const e=q.c(38),{filters:n,members:o,onChange:a}=t,l=te(),[r,i]=B.useState(!1),d=$a(n),m=d>0;let x;e[0]!==m?(x=qt(m),e[0]=m,e[1]=x):x=e[1];const c=x;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(As,{size:14,className:"shrink-0"}),e[2]=f):f=e[2];let g;e[3]!==l?(g=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=g):g=e[4];let y;e[5]!==d?(y=d>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:d}),e[5]=d,e[6]=y):y=e[6];let h;e[7]!==g||e[8]!==y||e[9]!==c?(h=s.jsx(Ln,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[f,g,y]})}),e[7]=g,e[8]=y,e[9]=c,e[10]=h):h=e[10];let p;e[11]!==l?(p=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=p):p=e[12];let b;e[13]!==p?(b=s.jsx(Mn,{className:"px-4 pt-4 text-base font-medium text-foreground",children:p}),e[13]=p,e[14]=b):b=e[14];let u;e[15]!==n||e[16]!==o||e[17]!==a?(u=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Rs,{block:!0,filters:n,members:o,onChange:a})}),e[15]=n,e[16]=o,e[17]=a,e[18]=u):u=e[18];let k;e[19]!==d||e[20]!==a||e[21]!==l?(k=d>0&&s.jsx(ke,{variant:"outline",className:"flex-1",onClick:()=>a(Lt),children:l("taskBoard.taskFilters.clearAllButton")}),e[19]=d,e[20]=a,e[21]=l,e[22]=k):k=e[22];let j;e[23]!==l?(j=l("taskBoard.taskFilters.doneButton"),e[23]=l,e[24]=j):j=e[24];let S;e[25]!==j?(S=s.jsx(qn,{asChild:!0,children:s.jsx(ke,{className:"flex-1",children:j})}),e[25]=j,e[26]=S):S=e[26];let N;e[27]!==k||e[28]!==S?(N=s.jsxs(Kn,{className:"flex-row gap-2",children:[k,S]}),e[27]=k,e[28]=S,e[29]=N):N=e[29];let v;e[30]!==N||e[31]!==b||e[32]!==u?(v=s.jsxs(Un,{className:"p-0",children:[b,u,N]}),e[30]=N,e[31]=b,e[32]=u,e[33]=v):v=e[33];let D;return e[34]!==r||e[35]!==v||e[36]!==h?(D=s.jsxs(Gn,{open:r,onOpenChange:i,direction:"bottom",children:[h,v]}),e[34]=r,e[35]=v,e[36]=h,e[37]=D):D=e[37],D}const hs=380,Ka=90,ys=5,Ua="cubic-bezier(0.22, 0.61, 0.36, 1)",Ga=8;function Qa(t,e){const n=B.useRef(new Map);B.useLayoutEffect(()=>{const o=t.current;if(!o)return;const a=o.querySelectorAll("[data-flip-id]"),l=n.current,r=new Map,i=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const f of a){const g=f.dataset.flipId;if(!g)continue;const y=f.getBoundingClientRect();r.set(g,y);const h=l.get(g);if(!h)continue;const p=h.left-y.left,b=h.top-y.top;(p||b)&&d.push({el:f,dx:p,dy:b,lane:Math.abs(p)>Ga})}if(n.current=r,i||d.length===0)return;for(const f of d){const g=f.lane?` rotate(${f.dx>0?ys:-ys}deg)`:"";f.el.style.transition="none",f.el.style.transform=`translate(${f.dx}px, ${f.dy}px)${g}`,f.lane&&(f.el.style.zIndex="10")}let m=0;const x=[],c=requestAnimationFrame(()=>{for(const f of d){const g=f.lane?m++*Ka:0;f.el.style.transition=`transform ${hs}ms ${Ua} ${g}ms`,f.el.style.transform="",x.push(window.setTimeout(()=>{f.el.style.transition="",f.el.style.transform="",f.el.style.zIndex=""},hs+g+30))}});return()=>{cancelAnimationFrame(c);for(const f of x)clearTimeout(f)}},[e,t])}const Va="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover",Ya=["Todas as tarefas do diagnóstico, priorizadas no seu quadro","Um relatório recorrente do seu site, sempre atualizado","O agente resolve cada tarefa e deixa pronta para a sua revisão"],bs={price:"R$ 99",anchor:"R$ 499"};function Ha(t){const e=q.c(5),{onOpen:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-success/10",children:s.jsx(Ss,{size:16,className:"text-success"})}),e[0]=o):o=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[o,s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Seu plano de ação está a um clique"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Desbloqueie o diagnóstico completo e as tarefas entram aqui, da maior prioridade para a menor."})]})]}),e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx($s,{size:16}),e[2]=l):l=e[2];let r;return e[3]!==n?(r=s.jsxs("div",{className:"flex flex-col gap-3 rounded-xl bg-card p-4 card-shadow sm:flex-row sm:items-center sm:gap-4",children:[a,s.jsxs(ke,{size:"sm",onClick:n,className:"w-full gap-2 sm:w-auto sm:shrink-0",children:["Desbloquear diagnóstico",l]})]}),e[3]=n,e[4]=r):r=e[4],r}function Wa({open:t,onOpenChange:e,cdClient:n,onExpired:o}){const[a,l]=B.useState(!1),r=async()=>{if(!n){o();return}l(!0);try{const i=await n.callTool({name:"start_checkout",arguments:{}}),{url:d}=Wt(i);if(new URL(d).protocol!=="https:")throw new Error("unsafe checkout url");window.open(d,"_blank","noopener,noreferrer"),e(!1)}catch{o()}finally{l(!1)}};return s.jsx(as,{open:t,onOpenChange:e,children:s.jsxs(ns,{className:"gap-0 p-3 sm:max-w-[500px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[s.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:s.jsx("img",{src:Va,alt:"Prévia do seu quadro de tarefas desbloqueado",className:"h-[208px] w-full object-cover object-left-top"})}),s.jsxs("div",{className:"flex flex-col gap-7 px-3 pb-3 pt-7",children:[s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ls,{className:"text-xl font-semibold text-foreground",children:"Desbloqueie seu plano de trabalho"}),s.jsx("ul",{className:"flex flex-col gap-3.5",children:Ya.map(i=>s.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[s.jsx(rs,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),s.jsx("span",{className:"leading-snug text-foreground",children:i})]},i))})]}),s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsx("span",{className:"text-2xl font-semibold text-foreground",children:bs.price}),s.jsx("span",{className:"text-sm text-muted-foreground line-through",children:bs.anchor})]}),s.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[s.jsx(ke,{variant:"ghost",onClick:()=>e(!1),disabled:a,className:"order-2 w-full sm:order-none sm:w-auto",children:"Explorar"}),s.jsxs(ke,{onClick:r,disabled:a,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[a?s.jsx(es,{size:16,className:"animate-spin"}):null,"Desbloquear diagnóstico",!a&&s.jsx($s,{size:16})]})]})]})]})]})})}function Vt(t){return`board-paywall-seen:${t}`}function Xa(){const t=q.c(26),{org:e}=He(),n=ks(),{diagnostic:o,cdClient:a,connectionId:l}=fa();let r;t[0]!==e.id?(r=()=>({orgId:e.id,open:!sessionStorage.getItem(Vt(e.id))}),t[0]=e.id,t[1]=r):r=t[1];const[i,d]=B.useState(r);let m;t[2]!==i.open||t[3]!==i.orgId||t[4]!==e.id?(m=i.orgId===e.id?i.open:!sessionStorage.getItem(Vt(e.id)),t[2]=i.open,t[3]=i.orgId,t[4]=e.id,t[5]=m):m=t[5];const x=m;if(!o?.locked)return null;let c;t[6]!==e.id?(c=j=>d({orgId:e.id,open:j}),t[6]=e.id,t[7]=c):c=t[7];const f=c;let g;t[8]!==e.id||t[9]!==f?(g=j=>{f(j),j||sessionStorage.setItem(Vt(e.id),"1")},t[8]=e.id,t[9]=f,t[10]=g):g=t[10];const y=g;let h;t[11]!==l||t[12]!==n||t[13]!==e?(h=()=>{us("board_paywall_report_opened",{organization_id:e.id}),n(ga(e,l))},t[11]=l,t[12]=n,t[13]=e,t[14]=h):h=t[14];const p=h;let b;t[15]!==e.id||t[16]!==f?(b=s.jsx(Ha,{onOpen:()=>{us("board_paywall_banner_clicked",{organization_id:e.id}),f(!0)}}),t[15]=e.id,t[16]=f,t[17]=b):b=t[17];let u;t[18]!==a||t[19]!==y||t[20]!==x||t[21]!==p?(u=s.jsx(Wa,{open:x,onOpenChange:y,cdClient:a,onExpired:p}),t[18]=a,t[19]=y,t[20]=x,t[21]=p,t[22]=u):u=t[22];let k;return t[23]!==b||t[24]!==u?(k=s.jsxs(s.Fragment,{children:[b,u]}),t[23]=b,t[24]=u,t[25]=k):k=t[25],k}function Ja(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Xs,{fallback:null,children:s.jsx(Xa,{})}),t[0]=e):e=t[0],e}Zs(()=>import("./index-BPEu29M9.js").then(t=>t.b4),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155])).catch(()=>{});function Za(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(Ks,{})})})}),t[0]=e):e=t[0],e}const el=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function tl(t){const e=new Date(t),n=e.getTime()<Date.now();return{label:el.format(e),overdue:n}}const cs="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function Ps(){const t=q.c(9),e=te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=V(cs,"border-warning/30 text-warning"),t[0]=n):n=t[0];let o;t[1]!==e?(o=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=o):o=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(vs,{size:14}),t[3]=a):a=t[3];let l;t[4]!==e?(l=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=l):l=t[5];let r;return t[6]!==o||t[7]!==l?(r=s.jsxs("span",{className:n,title:o,children:[a,l]}),t[6]=o,t[7]=l,t[8]=r):r=t[8],r}function Ls(t){const e=q.c(10),{priority:n}=t,o=te(),a=Re[n];let l;e[0]!==a.dotClassName?(l=V("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=l):l=e[1];let r;e[2]!==l?(r=s.jsx("span",{className:l}),e[2]=l,e[3]=r):r=e[3];let i;e[4]!==a.labelKey||e[5]!==o?(i=o(a.labelKey),e[4]=a.labelKey,e[5]=o,e[6]=i):i=e[6];let d;return e[7]!==r||e[8]!==i?(d=s.jsxs("span",{className:cs,children:[r,i]}),e[7]=r,e[8]=i,e[9]=d):d=e[9],d}function Ms(t){const e=q.c(7),{iso:n}=t;let o,a;if(e[0]!==n){const{label:i,overdue:d}=tl(n);o=i,a=V(cs,d&&"border-destructive/30 text-destructive"),e[0]=n,e[1]=o,e[2]=a}else o=e[1],a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ct,{size:14}),e[3]=l):l=e[3];let r;return e[4]!==o||e[5]!==a?(r=s.jsxs("span",{className:a,children:[l,o]}),e[4]=o,e[5]=a,e[6]=r):r=e[6],r}function qs(t){const e=q.c(24),{item:n,assignee:o,assignedBy:a,members:l,onAssign:r}=t,i=te(),[d,m]=B.useState(!1);if(n.assigneeId===Me){let h;e[0]!==a||e[1]!==i?(h=a?.user?.name?i("taskBoard.taskBoard.assignedToSuperAgentBy",{name:a.user.name}):i("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=a,e[1]=i,e[2]=h):h=e[2];let p;e[3]!==a?(p=a&&s.jsx(Le,{url:a.user?.image??void 0,fallback:Pe(a.user?.name),shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[3]=a,e[4]=p):p=e[4];let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ve,{size:20,className:"ring-2 ring-background"}),e[5]=b):b=e[5];let u;return e[6]!==h||e[7]!==p?(u=s.jsxs("span",{className:"inline-flex items-center",title:h,children:[p,b]}),e[6]=h,e[7]=p,e[8]=u):u=e[8],u}if(o){const h=o.user?.image??void 0,p=o.user?.name;let b;e[9]!==p?(b=Pe(p),e[9]=p,e[10]=b):b=e[10];let u;return e[11]!==h||e[12]!==b?(u=s.jsx(Le,{url:h,fallback:b,shape:"circle",size:"xs"}),e[11]=h,e[12]=b,e[13]=u):u=e[13],u}if(!r||!l?.length)return null;let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=h=>{h.stopPropagation(),m(!0)},e[14]=x):x=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(At,{asChild:!0,children:s.jsx("button",{type:"button",title:"Assign",onClick:x,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:s.jsx(Ns,{size:13})})}),e[15]=c):c=e[15];let f;e[16]!==r?(f=h=>{r(h),m(!1)},e[16]=r,e[17]=f):f=e[17];let g;e[18]!==l||e[19]!==f?(g=s.jsx(Ot,{className:"w-56 p-0",align:"end",side:"bottom",onClick:sl,children:s.jsx(Fs,{members:l,onSelect:f})}),e[18]=l,e[19]=f,e[20]=g):g=e[20];let y;return e[21]!==d||e[22]!==g?(y=s.jsxs($t,{open:d,onOpenChange:m,children:[c,g]}),e[21]=d,e[22]=g,e[23]=y):y=e[23],y}function sl(t){return t.stopPropagation()}function Ks(){const t=q.c(127),e=te(),{items:n,isLoading:o}=ya(),a=ba(),l=Hn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const i=bn(r);let d;t[1]!==i?(d=jn(i),t[1]=i,t[2]=d):d=t[2];const m=d.length>0,[x,c]=B.useState(!1);let f;t[3]!==m?(f=M=>M===Me&&!m?(c(!0),!0):!1,t[3]=m,t[4]=f):f=t[4];const g=f,{data:y}=Cs();let h,p;t[5]!==y?.data?.members?(h=y?.data?.members??[],p=new Map(h.map(ll)),t[5]=y?.data?.members,t[6]=h,t[7]=p):(h=t[6],p=t[7]);const b=p,[u,k]=B.useState("board"),[j,S]=B.useState(Lt),[N,v]=B.useState(!1),[D,w]=B.useState(null),[T,I]=B.useState(null),{setTaskId:_}=Vn(),{create:O}=Yn(),U=Mt(),{org:K,locator:C}=He(),E=ks();let A;t[8]===Symbol.for("react.memo_cache_sentinel")?(A={strict:!1},t[8]=A):A=t[8];const{task:G}=Js(A);let Y;t[9]!==G||t[10]!==n?(Y=G?n.find(M=>M.id===G)??null:null,t[9]=G,t[10]=n,t[11]=Y):Y=t[11];const R=Y;let H;t[12]!==G||t[13]!==E||t[14]!==K?(H=()=>{G&&E({to:"/$org/board",params:{org:K.slug},search:{},replace:!0})},t[12]=G,t[13]=E,t[14]=K,t[15]=H):H=t[15];const X=H;let J;t[16]!==a||t[17]!==O||t[18]!==C||t[19]!==K||t[20]!==_||t[21]!==U?(J=async M=>{const re=crypto.randomUUID(),oe=fn(K.id).id,Ce=await U.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:M.id}).then(al).catch(nl),_e=Ea(M,Ce),Ie={type:"doc",content:[{type:"paragraph",content:[$n({id:M.id,name:M.title,char:"@",kind:"task",metadata:{title:M.title,description:M.description,context:_e}}),{type:"text",text:" "}]}]};Zn(sessionStorage,C,re,Ie),v(!1);try{await O({id:re,virtual_mcp_id:oe}),await a.link.mutateAsync({id:M.id,linkThreadId:re})}catch{}_(re,oe)},t[16]=a,t[17]=O,t[18]=C,t[19]=K,t[20]=_,t[21]=U,t[22]=J):J=t[22];const W=J;let P,F,Z,ee,z,L,se;if(t[23]!==a||t[24]!==g||t[25]!==X||t[26]!==R||t[27]!==N||t[28]!==D||t[29]!==j||t[30]!==o||t[31]!==n||t[32]!==u||t[33]!==b||t[34]!==h||t[35]!==l||t[36]!==e){L=Symbol.for("react.early_return_sentinel");e:{let M;t[44]!==j?(M=Q=>Fa(Q,j),t[44]=j,t[45]=M):M=t[45];const re=n.filter(M);let oe;t[46]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>{w(null),I(null),v(!0)},t[46]=oe):oe=t[46];const Ce=oe;let _e;t[47]===Symbol.for("react.memo_cache_sentinel")?(_e=Q=>{w(null),I(Q),v(!0)},t[47]=_e):_e=t[47];const Ie=_e;let ve;t[48]===Symbol.for("react.memo_cache_sentinel")?(ve=Q=>{w(Q),v(!0)},t[48]=ve):ve=t[48];const ze=ve;P=D??R,Z=N||!!R;let Se;if(t[49]!==X?(Se=()=>{v(!1),w(null),I(null),X()},t[49]=X,t[50]=Se):Se=t[50],F=Se,o&&n.length===0){let Q;t[51]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(es,{size:20,className:"animate-spin text-muted-foreground"})}),t[51]=Q):Q=t[51],L=Q;break e}se="flex min-h-0 flex-1 flex-col";let Ke;t[52]!==e?(Ke=e("taskBoard.taskBoard.tasksTitle"),t[52]=e,t[53]=Ke):Ke=t[53];let Be;t[54]!==Ke?(Be=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:Ke}),t[54]=Ke,t[55]=Be):Be=t[55];let fe;t[56]!==l?(fe=l&&s.jsx(Ja,{}),t[56]=l,t[57]=fe):fe=t[57];let Te;t[58]!==j||t[59]!==n.length||t[60]!==h?(Te=n.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(qa,{filters:j,members:h,onChange:S})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(Ma,{filters:j,members:h,onChange:S})})]}),t[58]=j,t[59]=n.length,t[60]=h,t[61]=Te):Te=t[61];const Ee=u==="list";let De;t[62]===Symbol.for("react.memo_cache_sentinel")?(De=()=>k("list"),t[62]=De):De=t[62];let me;t[63]!==e?(me=e("common.taskBoard.listView"),t[63]=e,t[64]=me):me=t[64];let ge;t[65]!==Ee||t[66]!==me?(ge=s.jsx(js,{active:Ee,onClick:De,icon:rn,label:me}),t[65]=Ee,t[66]=me,t[67]=ge):ge=t[67];const Ae=u==="board";let Ue;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ue=()=>k("board"),t[68]=Ue):Ue=t[68];let xe;t[69]!==e?(xe=e("common.taskBoard.boardView"),t[69]=e,t[70]=xe):xe=t[70];let pe;t[71]!==Ae||t[72]!==xe?(pe=s.jsx(js,{active:Ae,onClick:Ue,icon:ln,label:xe}),t[71]=Ae,t[72]=xe,t[73]=pe):pe=t[73];let he;t[74]!==ge||t[75]!==pe?(he=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[ge,pe]}),t[74]=ge,t[75]=pe,t[76]=he):he=t[76];let we;t[77]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(ss,{size:16}),t[77]=we):we=t[77];let ye;t[78]!==e?(ye=e("taskBoard.taskBoard.newTask"),t[78]=e,t[79]=ye):ye=t[79];let be;t[80]!==ye?(be=s.jsxs(ke,{size:"sm",onClick:Ce,children:[we,ye]}),t[80]=ye,t[81]=be):be=t[81];let Ge;t[82]!==he||t[83]!==be?(Ge=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[he,be]}),t[82]=he,t[83]=be,t[84]=Ge):Ge=t[84];let $e;t[85]!==Te||t[86]!==Ge?($e=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Te,Ge]}),t[85]=Te,t[86]=Ge,t[87]=$e):$e=t[87],t[88]!==Be||t[89]!==fe||t[90]!==$e?(ee=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[Be,fe,$e]}),t[88]=Be,t[89]=fe,t[90]=$e,t[91]=ee):ee=t[91],z=n.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:e("taskBoard.taskBoard.noTasksYet")})}):re.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:[e("taskBoard.taskBoard.noTasksMatch"),s.jsx(ke,{variant:"outline",size:"sm",onClick:()=>S(Lt),children:e("taskBoard.taskBoard.clearFilters")})]})}):u==="board"?s.jsx(ol,{items:re,members:h,memberByUserId:b,onOpen:ze,onCreate:Ie,onMove:(Q,Qe)=>a.update.mutate({id:Q,status:Qe}),onAssign:(Q,Qe)=>{g(Qe)||a.update.mutate({id:Q,assigneeId:Qe??void 0})},onAutoFix:l?Q=>{g(Me)||a.update.mutate({id:Q.id,assigneeId:Me})}:void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:re.map(Q=>s.jsx(dl,{item:Q,assignee:Q.assigneeId?b.get(Q.assigneeId):void 0,assignedBy:Q.assignedBy?b.get(Q.assignedBy):void 0,onOpen:()=>ze(Q)},Q.id))})})}t[23]=a,t[24]=g,t[25]=X,t[26]=R,t[27]=N,t[28]=D,t[29]=j,t[30]=o,t[31]=n,t[32]=u,t[33]=b,t[34]=h,t[35]=l,t[36]=e,t[37]=P,t[38]=F,t[39]=Z,t[40]=ee,t[41]=z,t[42]=L,t[43]=se}else P=t[37],F=t[38],Z=t[39],ee=t[40],z=t[41],L=t[42],se=t[43];if(L!==Symbol.for("react.early_return_sentinel"))return L;const je=Z?P?.id??`new-${T??"default"}`:"closed",ne=P??void 0,ae=T??void 0,le=a.create.isPending||a.update.isPending;let ie;t[92]!==a.create||t[93]!==a.update||t[94]!==P||t[95]!==g||t[96]!==F?(ie=M=>{if(g(M.assigneeId)){F();return}P?a.update.mutate({id:P.id,...M}):a.create.mutate(M),F()},t[92]=a.create,t[93]=a.update,t[94]=P,t[95]=g,t[96]=F,t[97]=ie):ie=t[97];let ce;t[98]!==a.remove||t[99]!==P||t[100]!==F?(ce=P?()=>{a.remove.mutate(P.id),F()}:void 0,t[98]=a.remove,t[99]=P,t[100]=F,t[101]=ce):ce=t[101];let qe;t[102]!==P||t[103]!==W?(qe=P?()=>{W(P)}:void 0,t[102]=P,t[103]=W,t[104]=qe):qe=t[104];let Ne;t[105]!==F||t[106]!==_?(Ne=M=>{M.virtualMcpId&&(F(),_(M.threadId,M.virtualMcpId,{main:M.hasPreview?"preview":"board"}))},t[105]=F,t[106]=_,t[107]=Ne):Ne=t[107];let de;t[108]!==F||t[109]!==Z||t[110]!==je||t[111]!==ne||t[112]!==ae||t[113]!==le||t[114]!==ie||t[115]!==ce||t[116]!==qe||t[117]!==Ne?(de=s.jsx(Sa,{open:Z,onClose:F,item:ne,defaultStatus:ae,isSaving:le,onSubmit:ie,onDelete:ce,onNewChat:qe,onOpenThread:Ne},je),t[108]=F,t[109]=Z,t[110]=je,t[111]=ne,t[112]=ae,t[113]=le,t[114]=ie,t[115]=ce,t[116]=qe,t[117]=Ne,t[118]=de):de=t[118];let ue;t[119]!==x?(ue=s.jsx(rl,{open:x,onOpenChange:c}),t[119]=x,t[120]=ue):ue=t[120];let Oe;return t[121]!==ee||t[122]!==z||t[123]!==de||t[124]!==ue||t[125]!==se?(Oe=s.jsxs("div",{className:se,children:[ee,z,de,ue]}),t[121]=ee,t[122]=z,t[123]=de,t[124]=ue,t[125]=se,t[126]=Oe):Oe=t[126],Oe}function nl(){return[]}function al(t){return t.prs}function ll(t){return[t.userId,t]}function rl(t){const e=q.c(30),{open:n,onOpenChange:o}=t,a=te(),{connect:l,isConnecting:r}=xa("deco/mcp-github");let i;e[0]!==a?(i=a("taskBoard.taskBoard.connectGithubTitle"),e[0]=a,e[1]=i):i=e[1];let d;e[2]!==i?(d=s.jsx(ls,{children:i}),e[2]=i,e[3]=d):d=e[3];let m;e[4]!==a?(m=a("taskBoard.taskBoard.connectGithubDescription"),e[4]=a,e[5]=m):m=e[5];let x;e[6]!==m?(x=s.jsx(xn,{children:m}),e[6]=m,e[7]=x):x=e[7];let c;e[8]!==d||e[9]!==x?(c=s.jsxs(pn,{children:[d,x]}),e[8]=d,e[9]=x,e[10]=c):c=e[10];let f;e[11]!==l||e[12]!==o?(f=async()=>{await l(),o(!1)},e[11]=l,e[12]=o,e[13]=f):f=e[13];let g;e[14]!==r?(g=r?s.jsx(es,{size:16,className:"animate-spin"}):s.jsx(gn,{className:"size-4"}),e[14]=r,e[15]=g):g=e[15];let y;e[16]!==a?(y=a("taskBoard.taskBoard.connectGithubButton"),e[16]=a,e[17]=y):y=e[17];let h;e[18]!==r||e[19]!==f||e[20]!==g||e[21]!==y?(h=s.jsx(hn,{children:s.jsxs(ke,{onClick:f,disabled:r,className:"gap-2",children:[g,y]})}),e[18]=r,e[19]=f,e[20]=g,e[21]=y,e[22]=h):h=e[22];let p;e[23]!==c||e[24]!==h?(p=s.jsxs(ns,{className:"sm:max-w-md",children:[c,h]}),e[23]=c,e[24]=h,e[25]=p):p=e[25];let b;return e[26]!==o||e[27]!==n||e[28]!==p?(b=s.jsx(as,{open:n,onOpenChange:o,children:p}),e[26]=o,e[27]=n,e[28]=p,e[29]=b):b=e[29],b}function js(t){const e=q.c(14),{active:n,onClick:o,icon:a,label:l}=t,r=te();let i;e[0]!==l||e[1]!==r?(i=r("taskBoard.taskBoard.layoutViewAriaLabel",{label:l}),e[0]=l,e[1]=r,e[2]=i):i=e[2];const d=n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let m;e[3]!==d?(m=V("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",d),e[3]=d,e[4]=m):m=e[4];let x;e[5]!==a?(x=s.jsx(a,{size:14}),e[5]=a,e[6]=x):x=e[6];let c;return e[7]!==n||e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==m||e[12]!==x?(c=s.jsxs("button",{type:"button",onClick:o,"aria-label":i,"aria-pressed":n,className:m,children:[x,l]}),e[7]=n,e[8]=l,e[9]=o,e[10]=i,e[11]=m,e[12]=x,e[13]=c):c=e[13],c}function ol(t){const e=q.c(15),{items:n,members:o,memberByUserId:a,onOpen:l,onCreate:r,onMove:i,onAutoFix:d,onAssign:m}=t,x=te(),[c,f]=B.useState(null),g=B.useRef(null);let y;e[0]!==n?(y=n.map(il).join(","),e[0]=n,e[1]=y):y=e[1],Qa(g,y);let p;e[2]!==n||e[3]!==a||e[4]!==o||e[5]!==m||e[6]!==d||e[7]!==r||e[8]!==i||e[9]!==l||e[10]!==c||e[11]!==x?(p=Os.map(u=>{const k=n.filter(N=>N.status===u),j=Fe[u],S=j.icon;return s.jsxs("div",{onDragOver:N=>{N.preventDefault(),f(u)},onDragLeave:N=>{N.currentTarget.contains(N.relatedTarget)||f(null)},onDrop:N=>{N.preventDefault();const v=N.dataTransfer.getData("text/plain");v&&i(v,u),f(null)},className:V("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",c===u&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(S,{size:15,className:V("shrink-0",j.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:x(j.labelKey)}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:k.length}),s.jsx("button",{type:"button","aria-label":x("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:x(j.labelKey)}),title:x("taskBoard.taskBoard.newTaskInLaneTitle",{lane:x(j.labelKey)}),onClick:()=>r(u),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(ss,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:k.map(N=>s.jsx(cl,{item:N,assignee:N.assigneeId?a.get(N.assigneeId):void 0,assignedBy:N.assignedBy?a.get(N.assignedBy):void 0,members:o,onOpen:()=>l(N),onAutoFix:d?()=>d(N):void 0,onAssign:m?v=>m(N.id,v):void 0},N.id))})]},u)}),e[2]=n,e[3]=a,e[4]=o,e[5]=m,e[6]=d,e[7]=r,e[8]=i,e[9]=l,e[10]=c,e[11]=x,e[12]=p):p=e[12];let b;return e[13]!==p?(b=s.jsx("div",{ref:g,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:p})}),e[13]=p,e[14]=b):b=e[14],b}function il(t){return`${t.id}:${t.status}`}function cl(t){const e=q.c(36),{item:n,assignee:o,assignedBy:a,members:l,onOpen:r,onAutoFix:i,onAssign:d}=t,m=te(),x=Fe[n.status],c=x.icon,f=ja(n)?.lastMessage,g=i&&(n.status==="triage"||n.status==="todo")&&n.assigneeId!==Me,y=n.id;let h;e[0]!==n.id?(h=T=>{T.dataTransfer.setData("text/plain",n.id),T.dataTransfer.effectAllowed="move"},e[0]=n.id,e[1]=h):h=e[1];const p=n.title;let b;e[2]!==x.iconClassName?(b=V("mt-px shrink-0",x.iconClassName),e[2]=x.iconClassName,e[3]=b):b=e[3];let u;e[4]!==c||e[5]!==b?(u=s.jsx(c,{size:16,className:b}),e[4]=c,e[5]=b,e[6]=u):u=e[6];let k;e[7]!==n.title?(k=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:n.title}),e[7]=n.title,e[8]=k):k=e[8];let j;e[9]!==a||e[10]!==o||e[11]!==n||e[12]!==l||e[13]!==d?(j=s.jsx(qs,{item:n,assignee:o,assignedBy:a,members:l,onAssign:d}),e[9]=a,e[10]=o,e[11]=n,e[12]=l,e[13]=d,e[14]=j):j=e[14];let S;e[15]!==u||e[16]!==k||e[17]!==j?(S=s.jsxs("div",{className:"flex items-start gap-2",children:[u,k,j]}),e[15]=u,e[16]=k,e[17]=j,e[18]=S):S=e[18];let N;e[19]!==f?(N=f&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:f}),e[19]=f,e[20]=N):N=e[20];let v;e[21]!==n?(v=(Xt(n)||n.priority!=="none"||!!n.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Xt(n)&&s.jsx(Ps,{}),n.priority!=="none"&&s.jsx(Ls,{priority:n.priority}),n.dueDate&&s.jsx(Ms,{iso:n.dueDate})]}),e[21]=n,e[22]=v):v=e[22];let D;e[23]!==i||e[24]!==g||e[25]!==m?(D=g&&s.jsxs("button",{type:"button",onClick:T=>{T.stopPropagation(),i()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Ss,{size:12}),m("taskBoard.taskBoard.autoFix")]}),e[23]=i,e[24]=g,e[25]=m,e[26]=D):D=e[26];let w;return e[27]!==n.id||e[28]!==n.title||e[29]!==r||e[30]!==v||e[31]!==D||e[32]!==h||e[33]!==S||e[34]!==N?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":y,onDragStart:h,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:p,children:[S,N,v,D]}),e[27]=n.id,e[28]=n.title,e[29]=r,e[30]=v,e[31]=D,e[32]=h,e[33]=S,e[34]=N,e[35]=w):w=e[35],w}function dl(t){const e=q.c(30),{item:n,assignee:o,assignedBy:a,onOpen:l}=t,r=Fe[n.status],i=r.icon;let d;e[0]!==r.iconClassName?(d=V("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let m;e[2]!==i||e[3]!==d?(m=s.jsx(i,{size:16,className:d}),e[2]=i,e[3]=d,e[4]=m):m=e[4];let x;e[5]!==n.title?(x=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:n.title}),e[5]=n.title,e[6]=x):x=e[6];let c;e[7]!==n?(c=Xt(n)&&s.jsx(Ps,{}),e[7]=n,e[8]=c):c=e[8];let f;e[9]!==n.priority?(f=n.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ls,{priority:n.priority})}),e[9]=n.priority,e[10]=f):f=e[10];let g;e[11]!==n.dueDate?(g=n.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ms,{iso:n.dueDate})}),e[11]=n.dueDate,e[12]=g):g=e[12];let y;e[13]!==a||e[14]!==o||e[15]!==n?(y=s.jsx(qs,{item:n,assignee:o,assignedBy:a}),e[13]=a,e[14]=o,e[15]=n,e[16]=y):y=e[16];let h;e[17]!==n.createdAt?(h=wn(new Date(n.createdAt)),e[17]=n.createdAt,e[18]=h):h=e[18];let p;e[19]!==h?(p=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:h}),e[19]=h,e[20]=p):p=e[20];let b;return e[21]!==l||e[22]!==m||e[23]!==x||e[24]!==c||e[25]!==f||e[26]!==g||e[27]!==y||e[28]!==p?(b=s.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[m,x,c,f,g,y,p]}),e[21]=l,e[22]=m,e[23]=x,e[24]=c,e[25]=f,e[26]=g,e[27]=y,e[28]=p,e[29]=b):b=e[29],b}const lr=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:Ks,default:Za},Symbol.toStringTag,{value:"Module"}));export{er as H,Re as P,ra as S,Sa as T,oa as a,ar as b,sr as c,fa as d,ca as e,ga as f,xa as g,ya as h,Xn as i,ba as j,Fe as k,Ve as l,Ks as m,lr as n,tr as r,nr as u,Zn as w};
@@ -1 +0,0 @@
1
- import{c as P,d as ae,F as Q,b as U,G as fs,j as s,B as be,r as G,E as Xe,H as ps,v as Mt,a as Ne,x as hs,K as It,e as it,q,I as ze,m as B,J as xs,t as ce,M as gs,P as bs,L as js,n as vs,R as ys,k as _s,f as Ss,u as Tt,O as Cs,U as Ns}from"./index-BkQeimZz.js";import{u as _e,S as Qe,a as Je,b as J,c as Y,d as V,e as Pt,f as ks,g as At,h as ws,i as Ge,j as Ms,k as Is,l as Ts}from"./sidebar-D8HHeZss.js";import{u as $t}from"./use-mobile-C5W0RGLs.js";import{C as Ps,p as Re,s as As,b as $s,S as zs,d as Os,e as Es,c as Ds,n as Rs}from"./self-tool-result-DqKafcy2.js";import{f as Ls,b as Ze,e as et,g as Fs,d as zt,h as Ot,a as Et}from"./dialog-CJJBIADb.js";import{f as Gs}from"./tab-id-BijBBRwE.js";import{C as Bs,W as Dt,g as Hs,u as Rt,S as Lt,a as rt}from"./use-mcp-client-Ca9l1Lnr.js";import{i as tt}from"./ArrowRight-CV0xQASq.js";import{S as se}from"./skeleton-CVTYCuar.js";import{i as Ft}from"./LayoutLeft-DGux0aXO.js";import{O as Be,A as st,u as Us,a as Ws,g as Ks,b as Vs,c as qs}from"./use-deco-credits-DiL93U4G.js";import{T as we}from"./toolbar-icon-button-CCDyO390.js";import{P as Gt,a as Bt,b as Ht}from"./popover-DlUyr22d.js";import{D as Ys,a as Xs,b as Qs}from"./drawer-b0eCtWu6.js";import{A as He}from"./avatar-SVXA5K0_.js";import{T as je,a as ve,b as Ut,c as ye}from"./tooltip-6YXDmKdK.js";import{a as Ue}from"./Copy01-Cz2rkjLR.js";import{n as Js,i as Zs}from"./Globe01-CLxc6flB.js";import{i as en}from"./ZoomOut-RylsG63M.js";import{n as tn}from"./LinkExternal01-DS_UHiRd.js";import{i as at}from"./LogOut01-C8eH_07W.js";import{i as We}from"./Monitor01-XNX3vHJ4.js";import{n as sn,a as nn}from"./Sun-DdoghNKG.js";import{a as Oe}from"./Settings02-B2Q1F7yN.js";import{i as on}from"./Shield01-BZW1dWy4.js";import{t as Wt,a as ln,i as rn,b as ct,c as an,d as cn,e as Kt,A as ke,s as dn,f as mn,g as un,h as fn}from"./agent-icon-DEBdQzV-.js";import{a as pn}from"./Users03-BowsdXcq.js";import{u as hn}from"./use-deployment-admin-DKrpjkza.js";import"./index-BK2vPJeW.js";import{a as Vt}from"./XCircle-7b_0pmj2.js";import{a as xn}from"./ZapSquare-DmNcoydg.js";import{I as qt}from"./invite-member-dialog-Cg_1O2lW.js";import{u as dt}from"./use-copy-DCwa-tM1.js";import{i as Ke}from"./Check-BVao786V.js";import{m as gn,u as bn,c as jn}from"./use-api-keys-yffux9i3.js";import{u as vn,C as yn}from"./chat-context-CmQVFNlq.js";import{v as _n,C as mt}from"./connect-desktop-dialog-C1OBxezk.js";import{u as nt}from"./use-organization-settings-BQlvga2w.js";import{i as Sn}from"./FilterLines-Cz9hbnJD.js";import{T as Cn,a as Nn}from"./toggle-group-DDIDXHac.js";import{u as Yt,a as kn}from"./use-virtual-mcp-knS-Q3oO.js";import{u as wn,a as Xt,b as Mn,T as In}from"./hooks-dE0ApXsc.js";import{u as Qt,f as Tn}from"./shell-layout-CXG-tHmv.js";import{C as Pn,a as An,b as $n,c as zn,d as On}from"./command-BoLqTMqI.js";import{u as Jt}from"./studio-tools-PCiFWXzm.js";import{i as Zt}from"./Zap-Cf3B8XV9.js";import{S as es,M as En}from"./shell-controls-CgY0N6H5.js";import{n as Dn}from"./Stars02-DsiBetQn.js";import{g as Rn,u as Ln,S as Fn}from"./use-clock-tick-BIiUVnXR.js";import{a as Gn}from"./format-time-BnbuEtat.js";import{t as Bn}from"./ChevronDown-DPpeNPF5.js";import{i as Hn}from"./ChevronRight-CrBdlf5g.js";import{S as ts}from"./use-navigate-to-agent-O_6e-uti.js";import{T as xe}from"./toolbar-CIYAVWlg.js";import"./X-BnBYCjCN.js";import"./integration-icon-Ca9Ro_Zp.js";import"./Tool02-ByyTEcad.js";import"./CheckCircle-IniJIcWw.js";import"./companions-core-B4QVmz70.js";import"./extract-connection-data-D3bgaTlN.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-B3EdZ9mI.js";import"./label-DmHlHvvv.js";import"./input-BiKdrDt4.js";import"./Eye-DTXEp_Op.js";import"./use-debounced-value-HVV3niP0.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-BAIK-5ft.js";import"./authenticate-and-persist-oauth-CigV4fJB.js";import"./mcp-oauth-D6_LXaaB.js";import"./auth-B6AFPxXM.js";import"./ArrowUpRight-B75b68J3.js";import"./Plus-CP-BI904.js";import"./SearchMd-DCdN8sFZ.js";import"./XClose-B06L-PJc.js";import"./alert-dialog-DKTyYqPU.js";import"./use-registry-app-yWo1rUwy.js";import"./use-mcp-tools-DlhGbsTi.js";import"./github-repo-picker-CAQXTAGE.js";import"./collection-search-C364-hfY.js";import"./use-connection-ClzlwYHs.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-B4ZK1nci.js";import"./use-registry-connections-COyWFnN1.js";import"./useInfiniteQuery--O0UJeP3.js";import"./use-infinite-scroll-Bqwo9W1I.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-v9JJ51XL.js";import"./select-CS3PZAih.js";import"./ChevronUp-DYGKOdBy.js";import"./textarea-CbskhFAr.js";import"./Star01-TgpbQ1ki.js";import"./connection-form-helpers-VqgbDDwv.js";import"./Trash01-jY1Npbiv.js";import"./collection-tabs-BCnplQCF.js";import"./badge-BhXxSdh-.js";import"./useSuspenseInfiniteQuery-DQXQ91ga.js";import"./use-ai-providers-C10MkKcn.js";import"./User01-DiO_9L3k.js";import"./AlertCircle-fg3Hgsgz.js";import"./Tool01-Cp_FNZn9.js";import"./ArrowUp-CJNj-lbc.js";import"./TrendUp01-BDzOq-pH.js";import"./DotsVertical-3GQ99jGv.js";import"./Globe04-DkANX7p7.js";import"./SwitchHorizontal01-CFoLDY1q.js";import"./HardDrive-z8I8Njjc.js";import"./Image01-DRgtbsjP.js";import"./Key01-DTsWUBNB.js";import"./Package-3iqcIf7w.js";import"./Palette-B2Z8mdAl.js";import"./Play-BftNxqXw.js";import"./SearchLg-Bbkgfm53.js";import"./Stars01-5bOGRLFK.js";import"./Upload01-BJ-q-gLK.js";import"./Users01-OTsRlXmF.js";import"./use-org-auth-client-DG_z1qAa.js";import"./use-organization-roles-CpQygxw6.js";import"./autosend-C2FZ13WA.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CLphMNS8.js";import"./decopilot-sse-pool-DQp3v72-.js";import"./required-auth-layout-DjDm-MZU.js";import"./use-org-sso-Bu88hY6l.js";import"./index-S0bapDuc.js";import"./differenceInSeconds-NQ4PDo0z.js";function Un(t){const e=P.c(22),{siteUrl:n}=t,l=ae(),{org:o}=Q(),i=U();let r;e[0]!==l||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(fs.sidebarOpen(),JSON.stringify(!1)),l({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Hs(o.id),main:Gs(Dt.COMMERCE_DISCOVERY(o.id),Bs),sidepanel:0}})},e[0]=l,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ls,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==i?(c=i("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=i,e[6]=c):c=e[6];let u;e[7]!==c?(u=s.jsx(Ze,{className:"sr-only",children:c}),e[7]=c,e[8]=u):u=e[8];let m;e[9]!==a||e[10]!==i?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:i("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(be,{type:"button",size:"xl",className:"w-full",onClick:a,children:[i("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(tt,{size:18})]})]}),e[9]=a,e[10]=i,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ps,{}),e[12]=f):f=e[12];let x;e[13]!==a||e[14]!==n?(x=s.jsx(G.Suspense,{fallback:f,children:s.jsx(qn,{siteUrlFromUrl:n,onComplete:a})}),e[13]=a,e[14]=n,e[15]=x):x=e[15];let p;e[16]!==m||e[17]!==x?(p=s.jsx(Xe,{fallback:m,children:x}),e[16]=m,e[17]=x,e[18]=p):p=e[18];let g;return e[19]!==u||e[20]!==p?(g=s.jsx(et,{open:!0,children:s.jsxs(Fs,{children:[d,s.jsxs(ps,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vn,onPointerDownOutside:Kn,onInteractOutside:Wn,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[u,p]})]})}),e[19]=u,e[20]=p,e[21]=g):g=e[21],g}function Wn(t){return t.preventDefault()}function Kn(t){return t.preventDefault()}function Vn(t){return t.preventDefault()}function qn({siteUrlFromUrl:t,onComplete:e}){const n=U(),[l]=Mt(),{org:o}=Q(),{data:i}=Ne.useSession(),r=Dt.COMMERCE_DISCOVERY(o.id),a=Rt({connectionId:Lt,orgId:o.id,orgSlug:o.slug}),c=hs({queryKey:It.commerceDiscoveryConnection(o.id,r),queryFn:async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}});return Re(y)},retry:!1}).data.item,u=typeof c?.metadata?.siteUrl=="string"?c.metadata.siteUrl:void 0,m=t||u,f=As(m),[x,p]=G.useState(!0),[g,h]=G.useState(null),b=it({mutationFn:async y=>Re(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}})),retry:!1}),j=it({mutationFn:async y=>Re(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:y}})),retry:!1}),_=$s({siteUrl:m,email:i?.user?.email,locale:l.language}),v=async()=>{h(null),q("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:o.id});const y=m?Rs(m):null;if(y?.ok)try{let C=await j.mutateAsync(y.value);if(C.triggered||(q("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:o.id,reason:C.reason??"not_upgraded"}),await b.mutateAsync(y.value),C=await j.mutateAsync(y.value)),!C.triggered){q("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C.reason??"not_triggered"}),h(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(C){q("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C instanceof Error?C.message:String(C)}),h(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()};return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4 lg:gap-6 lg:bg-sidebar lg:p-10",children:[f?s.jsx(zs,{host:f}):null,s.jsx(Os,{org:o,cdConnectionId:r,siteUrl:m,onReadinessChange:p}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-3",children:[s.jsx(Es,{href:_,orgId:o.id,className:"lg:hidden"}),g?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:g}):null,s.jsxs(be,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium whitespace-normal h-auto py-3",onClick:()=>{v()},disabled:j.isPending||!x,children:[j.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n(x?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),!j.isPending&&x?s.jsx(tt,{size:18}):null]})]})]}),s.jsx("aside",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0 lg:items-center lg:justify-center lg:overflow-y-auto lg:border-l lg:border-border lg:bg-muted",children:s.jsx(Ds,{href:_,orgId:o.id})})]})}function Yn(t){const e=P.c(11),{onPointerDown:n,onDoubleClick:l}=t,o=U(),{state:i,isMobile:r}=_e();if(r||i==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},u=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=u):(c=e[4],u=e[5]);let m;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==d?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:u}),e[6]=l,e[7]=n,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}const ot=240,Xn=400,Qn="sidebar.width";function Ce(t){return Math.max(ot,Math.min(Xn,t))}function Jn(){const t=P.c(11),[e,n]=ze(Qn,Zn),l=G.useRef(null);let o;t[0]!==n||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=Ce(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const g=b=>{const j=Ce(f+(b.clientX-m));x?.style.setProperty("--sidebar-width",`${j}px`)},h=b=>{const j=Ce(f+(b.clientX-m));n(j);for(const _ of p)_.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",h)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let r;t[3]!==n?(r=()=>{n(ot)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=Ce(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function Zn(t){return typeof t=="number"?Ce(t):ot}function ss(){return[]}function ns(t){const e=P.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let o;return e[1]!==n?(o=s.jsxs(Qe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(Je,{children:s.jsx(J,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function os(t){const e=P.c(18),{item:n}=t,{isMobile:l,setOpenMobile:o}=_e();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{q("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&o(!1)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const r=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=B(d),e[4]=d,e[5]=c):c=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==m?(f=s.jsx(V,{className:c,children:m},a),e[14]=n.key,e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function eo(t){const e=P.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Pt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(so),e[2]=n.group.items,e[3]=i):i=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(r=s.jsx(ns,{label:l,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=r):r=e[7],r}case"items":{let l;e[8]!==n.items?(l=n.items.map(to),e[8]=n.items,e[9]=l):l=e[9];let o;return e[10]!==l?(o=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=o):o=e[11],o}case"custom":return n.content}}function to(t){return s.jsx(os,{item:t},t.key)}function so(t){return s.jsx(os,{item:t},t.key)}function no(t){const e=P.c(17),{sections:n,footer:l,additionalContent:o,header:i,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==i?(c=i&&s.jsx(ks,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:i}),e[0]=i,e[1]=c):c=e[1];let u;e[2]!==a?(u=B("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=u):u=e[3];let m;e[4]!==n?(m=n.map(oo),e[4]=n,e[5]=m):m=e[5];let f;e[6]!==o?(f=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=f):f=e[7];let x;e[8]!==u||e[9]!==m||e[10]!==f?(x=s.jsxs(At,{className:u,children:[m,f]}),e[8]=u,e[9]=m,e[10]=f,e[11]=x):x=e[11];let p;return e[12]!==l||e[13]!==c||e[14]!==x||e[15]!==d?(p=s.jsxs(ws,{variant:d,children:[c,x,l]}),e[12]=l,e[13]=c,e[14]=x,e[15]=d,e[16]=p):p=e[16],p}function oo(t,e){return s.jsx(eo,{section:t},e)}function ls(t){const e=P.c(2);let n;return e[0]!==t?(n=s.jsx(no,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function ut(t){const e=P.c(18),{item:n,onClose:l}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=B(o),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==n||e[3]!==l?(r=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let u;return e[15]!==i||e[16]!==c?(u=s.jsx(V,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=u):u=e[17],u}function lo(t){const e=P.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let r;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(ut,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(ns,{label:o,defaultExpanded:i,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==l||e[12]!==n.items){let r;e[14]!==l?(r=a=>s.jsx(ut,{item:a,onClose:l},a.key),e[14]=l,e[15]=r):r=e[15],o=n.items.map(r),e[11]=l,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function io(t){const e=P.c(27),{sections:n,onClose:l,footer:o,additionalContent:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Be,{}),e[0]=r):r=e[0];let a;e[1]!==l?(a=s.jsx(st,{onNavigate:l}),e[1]=l,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=U();let u;e[4]!==c?(u=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{size:16}),e[6]=m):m=e[6];let f;e[7]!==l||e[8]!==u?(f=s.jsx(we,{onClick:l,"aria-label":u,children:m}),e[7]=l,e[8]=u,e[9]=f):f=e[9];let x;e[10]!==a||e[11]!==f?(x=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,f]}),e[10]=a,e[11]=f,e[12]=x):x=e[12];let p;if(e[13]!==l||e[14]!==n){let j;e[16]!==l?(j=(_,v)=>s.jsx(lo,{section:_,onClose:l},v),e[16]=l,e[17]=j):j=e[17],p=n.map(j),e[13]=l,e[14]=n,e[15]=p}else p=e[15];let g;e[18]!==i?(g=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[18]=i,e[19]=g):g=e[19];let h;e[20]!==g||e[21]!==p?(h=s.jsxs(At,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[p,g]}),e[20]=g,e[21]=p,e[22]=h):h=e[22];let b;return e[23]!==o||e[24]!==h||e[25]!==x?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[x,h,o]}),e[23]=o,e[24]=h,e[25]=x,e[26]=b):b=e[26],b}function ge(t){const e=P.c(26),{item:n,onClose:l}=t;let o;e[0]!==n.className?(o=B("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=o):o=e[1];const i=o;if(n.href){const u=n.external?"_blank":void 0,m=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let x;e[4]!==n.label?(x=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=x):x=e[5];let p;return e[6]!==i||e[7]!==n.href||e[8]!==l||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==x?(p=s.jsxs("a",{href:n.href,target:u,rel:m,className:i,onClick:l,children:[f,x]}),e[6]=i,e[7]=n.href,e[8]=l,e[9]=u,e[10]=m,e[11]=f,e[12]=x,e[13]=p):p=e[13],p}let r;e[14]!==n||e[15]!==l?(r=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==i||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:i,children:[a,d]}),e[21]=i,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function ro(){const t=P.c(4),e=U();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:n}),t[2]=n,t[3]=l):l=t[3],l}function ft(t){const e=P.c(38),{user:n,userImage:l,isImpersonating:o,isMobile:i}=t,r=U(),a=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=B("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let u;e[2]!==c||e[3]!==l?(u=s.jsx(He,{url:l,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=l,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==n?.name?(m=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let x;e[10]!==o?(x=o&&s.jsx(ro,{}),e[10]=o,e[11]=x):x=e[11];let p;e[12]!==f||e[13]!==x?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14];const g=n?.email;let h;e[15]!==g?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g}),e[15]=g,e[16]=h):h=e[16];let b;e[17]!==h||e[18]!==p?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,h]}),e[17]=h,e[18]=p,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{ce.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ue,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let C;e[28]!==y?(C=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=C):C=e[29];let N;e[30]!==v||e[31]!==C?(N=s.jsx(Ut,{delayDuration:300,children:s.jsxs(ye,{children:[v,C]})}),e[30]=v,e[31]=C,e[32]=N):N=e[32];let S;return e[33]!==b||e[34]!==N||e[35]!==d||e[36]!==u?(S=s.jsxs("div",{className:d,children:[u,b,N]}),e[33]=b,e[34]=N,e[35]=d,e[36]=u,e[37]=S):S=e[37],S}function pt(t){const e=P.c(35),{themeOptions:n,preferences:l,setPreferences:o,isMobile:i}=t,r=U(),a=i?"size-8":"size-7",d=i?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=B("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let u;if(e[2]!==a||e[3]!==l.theme||e[4]!==o||e[5]!==n){let y;e[7]!==a||e[8]!==l.theme||e[9]!==o?(y=C=>{const{value:N,icon:S,label:w}=C;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(k=>({...k,theme:N})),className:B(a,"rounded-md flex items-center justify-center transition-colors",l.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:S},N)},e[7]=a,e[8]=l.theme,e[9]=o,e[10]=y):y=e[10],u=n.map(y),e[2]=a,e[3]=l.theme,e[4]=o,e[5]=n,e[6]=u}else u=e[6];let m;e[11]!==u?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==l.enableSounds||e[14]!==r?(f=l.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=l.enableSounds,e[14]=r,e[15]=f):f=e[15];let x;e[16]!==o?(x=()=>o(ao),e[16]=o,e[17]=x):x=e[17];const p=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let g;e[18]!==a||e[19]!==p?(g=B(a,"rounded-md flex items-center justify-center transition-colors",p),e[18]=a,e[19]=p,e[20]=g):g=e[20];let h;e[21]!==l.enableSounds?(h=l.enableSounds?s.jsx(ln,{size:14}):s.jsx(rn,{size:14}),e[21]=l.enableSounds,e[22]=h):h=e[22];let b;e[23]!==f||e[24]!==x||e[25]!==g||e[26]!==h?(b=s.jsx("button",{type:"button","aria-label":f,onClick:x,className:g,children:h}),e[23]=f,e[24]=x,e[25]=g,e[26]=h,e[27]=b):b=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.120.0"]}),e[28]=j):j=e[28];let _;e[29]!==b?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==m?(v=s.jsxs("div",{className:c,children:[m,_]}),e[31]=_,e[32]=c,e[33]=m,e[34]=v):v=e[34],v}function ao(t){return{...t,enableSounds:!t.enableSounds}}function ht(t){const e=P.c(54),{user:n,userImage:l,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:u,close:m,isMobile:f}=t;if(f){let v;e[0]!==a||e[1]!==n||e[2]!==l?(v=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=l,e[3]=v):v=e[3];let y;if(e[4]!==m||e[5]!==o){let I;e[7]!==m?(I=M=>s.jsx(ge,{item:M,onClose:m},M.key),e[7]=m,e[8]=I):I=e[8],y=o.map(I),e[4]=m,e[5]=o,e[6]=y}else y=e[6];let C;e[9]!==m||e[10]!==r?(C=r&&s.jsx(ge,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=C):C=e[11];let N;e[12]!==m||e[13]!==i?(N=s.jsx(ge,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=N):N=e[14];let S;e[15]!==y||e[16]!==C||e[17]!==N?(S=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[y,C,N]})}),e[15]=y,e[16]=C,e[17]=N,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==u||e[21]!==d?(w=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:u,isMobile:!0}),e[19]=c,e[20]=u,e[21]=d,e[22]=w):w=e[22];let k;return e[23]!==v||e[24]!==S||e[25]!==w?(k=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,S,w]}),e[23]=v,e[24]=S,e[25]=w,e[26]=k):k=e[26],k}let x;e[27]!==a||e[28]!==n||e[29]!==l?(x=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=l,e[30]=x):x=e[30];let p;if(e[31]!==m||e[32]!==o){let v;e[34]!==m?(v=y=>s.jsx(ge,{item:y,onClose:m},y.key),e[34]=m,e[35]=v):v=e[35],p=o.map(v),e[31]=m,e[32]=o,e[33]=p}else p=e[33];let g;e[36]!==m||e[37]!==r?(g=r&&s.jsx(ge,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=g):g=e[38];let h;e[39]!==m||e[40]!==i?(h=s.jsx(ge,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=h):h=e[41];let b;e[42]!==p||e[43]!==g||e[44]!==h?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[p,g,h]}),e[42]=p,e[43]=g,e[44]=h,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==u||e[48]!==d?(j=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:u,isMobile:!1}),e[46]=c,e[47]=u,e[48]=d,e[49]=j):j=e[49];let _;return e[50]!==x||e[51]!==b||e[52]!==j?(_=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[x,b,j]})}),e[50]=x,e[51]=b,e[52]=j,e[53]=_):_=e[53],_}function Ve(){const t=P.c(99),e=U(),{data:n}=Ne.useSession(),{org:l}=Q(),o=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const a=xs(i)?.params.org,[d,c]=Mt(),u=$t(),{isAdmin:m}=hn(),[f,x]=G.useState(!1),p=n?.user,g=p?.image,h=!!n?.session?.impersonatedBy;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=()=>x(!1),t[1]=b):b=t[1];const j=b;let _;t[2]!==e?(_=e("common.accountPopover.preferences"),t[2]=e,t[3]=_):_=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Oe,{size:16}),t[4]=v):v=t[4];let y;t[5]!==o||t[6]!==a?(y=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=y):y=t[7];let C;t[8]!==_||t[9]!==y?(C={key:"preferences",label:_,icon:v,onClick:y},t[8]=_,t[9]=y,t[10]=C):C=t[10];let N;t[11]!==l||t[12]!==o||t[13]!==e?(N=l?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(Js,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:l.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(tn,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:l.slug}})}}]:[],t[11]=l,t[12]=o,t[13]=e,t[14]=N):N=t[14];let S;t[15]!==e?(S=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=S):S=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(en,{size:16}),t[17]=w):w=t[17];let k;t[18]!==S?(k={key:"terms",label:S,icon:w,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=S,t[19]=k):k=t[19];let I;t[20]!==e?(I=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=I):I=t[21];let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(on,{size:16}),t[22]=M):M=t[22];let z;t[23]!==I?(z={key:"privacy",label:I,icon:M,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=I,t[24]=z):z=t[24];let A;t[25]!==e?(A=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=A):A=t[26];let $;t[27]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(gs,{className:"w-4 h-4"}),t[27]=$):$=t[27];let R;t[28]!==A?(R={key:"github",label:A,icon:$,href:"https://github.com/decocms/studio",external:!0},t[28]=A,t[29]=R):R=t[29];let E;t[30]!==e?(E=e("common.accountPopover.community"),t[30]=e,t[31]=E):E=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pn,{size:16}),t[32]=O):O=t[32];let D;t[33]!==E?(D={key:"community",label:E,icon:O,href:"https://decocms.com/discord",external:!0},t[33]=E,t[34]=D):D=t[34];let L;t[35]!==e?(L=e("common.accountPopover.homepage"),t[35]=e,t[36]=L):L=t[36];let K;t[37]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Zs,{size:16}),t[37]=K):K=t[37];let Z;t[38]!==L?(Z={key:"homepage",label:L,icon:K,href:"https://decocms.com",external:!0},t[38]=L,t[39]=Z):Z=t[39];let ne;t[40]!==m||t[41]!==o||t[42]!==e?(ne=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Wt,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=m,t[41]=o,t[42]=e,t[43]=ne):ne=t[43];let de;t[44]!==z||t[45]!==R||t[46]!==D||t[47]!==Z||t[48]!==ne||t[49]!==C||t[50]!==N||t[51]!==k?(de=[C,...N,k,z,R,D,Z,...ne],t[44]=z,t[45]=R,t[46]=D,t[47]=Z,t[48]=ne,t[49]=C,t[50]=N,t[51]=k,t[52]=de):de=t[52];const oe=de;let ee;t[53]!==e?(ee=e("common.accountPopover.signOut"),t[53]=e,t[54]=ee):ee=t[54];let le;t[55]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(at,{size:16}),t[55]=le):le=t[55];let me;t[56]!==ee?(me={key:"logout",label:ee,icon:le,onClick:mo},t[56]=ee,t[57]=me):me=t[57];const Se=me;let ue;t[58]!==h||t[59]!==e?(ue=h?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(at,{size:16}),onClick:async()=>{const{error:lt}=await Ne.admin.stopImpersonating();if(lt){ce.error(lt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=h,t[59]=e,t[60]=ue):ue=t[60];const fe=ue;let pe;t[61]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(sn,{size:14}),t[61]=pe):pe=t[61];let ie;t[62]!==e?(ie=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=ie):ie=t[63];let X;t[64]!==ie?(X={value:"light",icon:pe,label:ie},t[64]=ie,t[65]=X):X=t[65];let he;t[66]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(nn,{size:14}),t[66]=he):he=t[66];let te;t[67]!==e?(te=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=te):te=t[68];let T;t[69]!==te?(T={value:"dark",icon:he,label:te},t[69]=te,t[70]=T):T=t[70];let F;t[71]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(We,{size:14}),t[71]=F):F=t[71];let W;t[72]!==e?(W=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=W):W=t[73];let H;t[74]!==W?(H={value:"system",icon:F,label:W},t[74]=W,t[75]=H):H=t[75];let re;t[76]!==X||t[77]!==T||t[78]!==H?(re=[X,T,H],t[76]=X,t[77]=T,t[78]=H,t[79]=re):re=t[79];const De=re;let Me;t[80]!==h||t[81]!==u||t[82]!==oe||t[83]!==d||t[84]!==c||t[85]!==Se||t[86]!==fe||t[87]!==De||t[88]!==p||t[89]!==g?(Me={user:p,userImage:g,menuItems:oe,signOutItem:Se,stopImpersonatingItem:fe,isImpersonating:h,themeOptions:De,preferences:d,setPreferences:c,close:j,isMobile:u},t[80]=h,t[81]=u,t[82]=oe,t[83]=d,t[84]=c,t[85]=Se,t[86]=fe,t[87]=De,t[88]=p,t[89]=g,t[90]=Me):Me=t[90];const Ie=Me;let Te;return t[91]!==h||t[92]!==u||t[93]!==f||t[94]!==Ie||t[95]!==e||t[96]!==p?.name||t[97]!==g?(Te=s.jsx(s.Fragment,{children:u?s.jsxs(Ys,{open:f,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:B("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",h&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:g,fallback:p?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Xs,{className:"h-[80dvh] p-0",children:[s.jsx(Qs,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(ht,{...Ie})]})]}):s.jsxs(Gt,{open:f,onOpenChange:x,children:[s.jsx(Bt,{asChild:!0,children:s.jsxs(Y,{tooltip:p?.name??e("common.accountPopover.defaultAccountLabel"),className:B("rounded-md",h&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:g,fallback:p?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ht,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:co,children:s.jsx(ht,{...Ie})})]})}),t[91]=h,t[92]=u,t[93]=f,t[94]=Ie,t[95]=e,t[96]=p?.name,t[97]=g,t[98]=Te):Te=t[98],Te}function co(t){return t.preventDefault()}function mo(){q("signed_out",{source:"account_popover"}),bs(),Ne.signOut()}const uo=["Browse and edit your Library files","Run your agents","Enable and call any MCP tool in this org"],fo="Connect: ";function po(){return typeof window>"u"?"unknown host":window.location.hostname}function ho(t){const e=P.c(45),{onClose:n}=t,{org:l}=Q();let o;e[0]!==l.slug?(o=gn(l.slug),e[0]=l.slug,e[1]=o):o=e[1];const i=o,r=bn(),[a,d]=G.useState(null),c=dt(),u=dt();let m;e[2]!==r||e[3]!==l.slug?(m=()=>{r.mutate({name:`${fo}Claude Code on ${po()}`,permissions:{"*":["*"]}},{onSuccess:R=>{const E=jn(l.slug,R.key);d(E),q("connect_studio_generate",{target:"claude-code"}),navigator.clipboard?.writeText(E).then(jo,bo)},onError:go})},e[2]=r,e[3]=l.slug,e[4]=m):m=e[4];const f=m;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"size-8 rounded-lg bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Vt,{size:17})}),e[5]=x):x=e[5];let p;e[6]!==l.name?(p=s.jsxs(Ze,{className:"flex items-center gap-2.5",children:[x,"Connect ",l.name," to Claude"]}),e[6]=l.name,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ot,{children:"Hand Claude this org's MCP endpoint. Once linked, Claude can:"}),e[8]=g):g=e[8];let h;e[9]!==p?(h=s.jsxs(Et,{children:[p,g]}),e[9]=p,e[10]=h):h=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("ul",{className:"flex flex-col gap-2 text-sm",children:uo.map(xo)}),e[11]=b):b=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ct,{size:15,className:"text-muted-foreground"}),e[12]=j):j=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[j,"Claude Code",s.jsx("span",{className:"ml-auto text-[11px] font-medium text-special uppercase tracking-wide",children:"Recommended"})]}),e[13]=_):_=e[13];let v;e[14]!==a||e[15]!==c||e[16]!==r.isPending||e[17]!==f?(v=s.jsxs("section",{className:"rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3",children:[_,a?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-lg border border-border bg-background p-3 max-h-32 overflow-y-auto",children:s.jsx("code",{className:"text-xs leading-relaxed break-all font-mono text-foreground/90 whitespace-pre-wrap",children:a})}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",onClick:()=>{c.handleCopy(a),q("connect_studio_copy",{target:"claude-code"}),ce.success("Command copied — paste it in your terminal")},children:[c.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),c.copied?"Copied":"Copy command"]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2",children:[s.jsx(Wt,{size:14,className:"text-warning shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-xs leading-relaxed text-foreground/80",children:["No login step — this command embeds a"," ",s.jsx("span",{className:"font-medium text-foreground",children:"full-access token"}),". Treat it like a password; revoke it any time in Settings → Connect."]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"One command, no browser login. We'll mint a scoped access token and embed it so Claude Code connects instantly."}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",disabled:r.isPending,onClick:f,children:[s.jsx(ct,{size:14}),r.isPending?"Generating…":"Generate connect command"]})]})]}),e[14]=a,e[15]=c,e[16]=r.isPending,e[17]=f,e[18]=v):v=e[18];let y,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[s.jsx(an,{size:15,className:"text-muted-foreground"}),"Claude Desktop or claude.ai"]}),C=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Add a custom connector in Settings → Connectors and paste this URL. Claude signs in with OAuth on first use."}),e[19]=y,e[20]=C):(y=e[19],C=e[20]);let N;e[21]!==i?(N=s.jsx("code",{className:"text-xs flex-1 min-w-0 truncate font-mono text-foreground/90",children:i}),e[21]=i,e[22]=N):N=e[22];let S;e[23]!==i||e[24]!==u?(S=()=>{u.handleCopy(i),q("connect_studio_copy",{target:"claude-connector"})},e[23]=i,e[24]=u,e[25]=S):S=e[25];let w;e[26]!==u.copied?(w=u.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),e[26]=u.copied,e[27]=w):w=e[27];let k;e[28]!==S||e[29]!==w?(k=s.jsx(be,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"Copy URL",onClick:S,children:w}),e[28]=S,e[29]=w,e[30]=k):k=e[30];let I;e[31]!==N||e[32]!==k?(I=s.jsxs("section",{className:"flex flex-col gap-2.5",children:[y,C,s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 pl-3 pr-1.5 py-1.5 min-w-0",children:[N,k]})]}),e[31]=N,e[32]=k,e[33]=I):I=e[33];let M;e[34]!==l.slug?(M={org:l.slug},e[34]=l.slug,e[35]=M):M=e[35];let z;e[36]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(tt,{size:12}),e[36]=z):z=e[36];let A;e[37]!==n||e[38]!==M?(A=s.jsx("div",{className:"flex items-center border-t border-border pt-3",children:s.jsx(be,{asChild:!0,variant:"link",size:"sm",className:"px-0 text-xs gap-1",children:s.jsxs(js,{to:"/$org/settings/connect",params:M,onClick:n,children:["More clients & API keys ",z]})})}),e[37]=n,e[38]=M,e[39]=A):A=e[39];let $;return e[40]!==v||e[41]!==I||e[42]!==A||e[43]!==h?($=s.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[h,b,v,I,A]}),e[40]=v,e[41]=I,e[42]=A,e[43]=h,e[44]=$):$=e[44],$}function xo(t){return s.jsxs("li",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"size-4 rounded-full bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Ke,{size:11,strokeWidth:3})}),s.jsx("span",{className:"text-foreground",children:t})]},t)}function go(t){return ce.error(t.message)}function bo(){return ce.success("Command ready — copy it below")}function jo(){return ce.success("Command copied — paste it in your terminal")}function vo(t){const e=P.c(6),{open:n,onOpenChange:l}=t;let o;e[0]!==l?(o=s.jsx(zt,{className:"max-w-lg gap-4",children:s.jsx(ho,{onClose:()=>l(!1)})}),e[0]=l,e[1]=o):o=e[1];let i;return e[2]!==l||e[3]!==n||e[4]!==o?(i=s.jsx(et,{open:n,onOpenChange:l,children:o}),e[2]=l,e[3]=n,e[4]=o,e[5]=i):i=e[5],i}function qe(t){const e=P.c(50),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,o=U(),i=vn(),[r,a]=G.useState(!1);let d,c;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online||e[4]!==o){const v=_n(i.capabilities,o);let y;e[7]!==i.online||e[8]!==o?(y=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectDesktop"),e[7]=i.online,e[8]=o,e[9]=y):y=e[9],d=y,c=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??o("header.linkedDesktopIndicator.desktopLinked")}),s.jsx("span",{className:"text-muted-foreground",children:v.length>0?o("header.linkedDesktopIndicator.availableCapabilities",{capabilities:v.join(", ")}):o("header.linkedDesktopIndicator.noCliAgents")})]}):s.jsx("span",{className:"text-xs",children:o("header.linkedDesktopIndicator.desktopDisconnected")}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=o,e[5]=d,e[6]=c}else d=e[5],c=e[6];const u=c;if(l==="full"){let v,y;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=()=>a(!0),y=s.jsx(We,{}),e[10]=v,e[11]=y):(v=e[10],y=e[11]);let C;e[12]!==d?(C=s.jsx("span",{children:d}),e[12]=d,e[13]=C):C=e[13];let N;e[14]!==i.online?(N=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[14]=i.online,e[15]=N):N=e[15];let S;e[16]!==d||e[17]!==C||e[18]!==N?(S=s.jsx(je,{asChild:!0,children:s.jsxs(Y,{tooltip:d,onClick:v,children:[y,C,N]})}),e[16]=d,e[17]=C,e[18]=N,e[19]=S):S=e[19];let w;e[20]!==u?(w=s.jsx(ve,{side:"right",children:u}),e[20]=u,e[21]=w):w=e[21];let k;e[22]!==S||e[23]!==w?(k=s.jsxs(ye,{children:[S,w]}),e[22]=S,e[23]=w,e[24]=k):k=e[24];let I;e[25]!==r?(I=s.jsx(mt,{open:r,onOpenChange:a}),e[25]=r,e[26]=I):I=e[26];let M;return e[27]!==I||e[28]!==k?(M=s.jsxs(s.Fragment,{children:[k,I]}),e[27]=I,e[28]=k,e[29]=M):M=e[29],M}let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),e[30]=m):m=e[30];let f;e[31]!==i.online||e[32]!==o?(f=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectYourDesktop"),e[31]=i.online,e[32]=o,e[33]=f):f=e[33];let x;e[34]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(We,{size:16}),e[34]=x):x=e[34];let p;e[35]!==i.online?(p=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[35]=i.online,e[36]=p):p=e[36];let g;e[37]!==f||e[38]!==p?(g=s.jsx(je,{asChild:!0,children:s.jsxs(we,{onClick:m,"aria-label":f,children:[x,p]})}),e[37]=f,e[38]=p,e[39]=g):g=e[39];let h;e[40]!==u?(h=s.jsx(ve,{side:"bottom",children:u}),e[40]=u,e[41]=h):h=e[41];let b;e[42]!==g||e[43]!==h?(b=s.jsxs(ye,{children:[g,h]}),e[42]=g,e[43]=h,e[44]=b):b=e[44];let j;e[45]!==r?(j=s.jsx(mt,{open:r,onOpenChange:a}),e[45]=r,e[46]=j):j=e[46];let _;return e[47]!==j||e[48]!==b?(_=s.jsxs(s.Fragment,{children:[b,j]}),e[47]=j,e[48]=b,e[49]=_):_=e[49],_}class yo extends G.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function _o(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function So(){const t=P.c(17),e=ae(),{org:n}=Q(),{hasDecoKey:l,balanceDollars:o}=Us();if(!l)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let r;t[2]!==o?(r=B(o!=null&&_o(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(cn,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let u;t[10]!==c?(u=s.jsx("span",{children:c}),t[10]=c,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==u?(m=s.jsx(J,{children:s.jsx(V,{children:s.jsxs(Y,{tooltip:i,className:r,onClick:a,children:[d,u]})})}),t[12]=i,t[13]=r,t[14]=a,t[15]=u,t[16]=m):m=t[16],m}function xt(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(yo,{children:s.jsx(G.Suspense,{fallback:null,children:s.jsx(So,{})})}),t[0]=e):e=t[0],e}function Co(){const t=P.c(14),e=U(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==i||t[12]!==d?(c=s.jsxs(Y,{tooltip:o,onClick:i,children:[r,d]}),t[10]=o,t[11]=i,t[12]=d,t[13]=c):c=t[13],c}function No(){const t=P.c(9),e=U(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==i?(a=s.jsx("button",{type:"button","aria-label":o,onClick:i,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=i,t[8]=a):a=t[8],a}function gt(){const t=P.c(33),e=U(),[n,l]=G.useState(!1),[o,i]=G.useState(!1);let r;t[0]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=r):r=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Kt,{}),t[2]=a):a=t[2];let d;t[3]!==e?(d=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=d):d=t[4];let c;t[5]!==d?(c=s.jsx("span",{children:d}),t[5]=d,t[6]=c):c=t[6];let u;t[7]!==r||t[8]!==c?(u=s.jsx(V,{children:s.jsx(qt,{trigger:s.jsxs(Y,{tooltip:r,children:[a,c]})})}),t[7]=r,t[8]=c,t[9]=u):u=t[9];let m;t[10]!==e?(m=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=m):m=t[11];let f,x;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(!0),x=s.jsx(xn,{}),t[12]=f,t[13]=x):(f=t[12],x=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let g;t[16]!==p?(g=s.jsx("span",{children:p}),t[16]=p,t[17]=g):g=t[17];let h;t[18]!==m||t[19]!==g?(h=s.jsx(V,{children:s.jsxs(Y,{tooltip:m,onClick:f,children:[x,g]})}),t[18]=m,t[19]=g,t[20]=h):h=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(V,{children:s.jsxs(Y,{tooltip:"Connect to Claude",onClick:()=>{q("connect_studio_opened",{source:"sidebar_footer"}),i(!0)},children:[s.jsx(Vt,{}),s.jsx("span",{children:"Connect to Claude"})]})}),t[21]=b):b=t[21];let j;t[22]!==h||t[23]!==u?(j=s.jsxs(J,{className:"gap-0.5",children:[u,h,b]}),t[22]=h,t[23]=u,t[24]=j):j=t[24];let _;t[25]!==n?(_=s.jsx(Ws,{open:n,onOpenChange:l,mode:"browse"}),t[25]=n,t[26]=_):_=t[26];let v;t[27]!==o?(v=s.jsx(vo,{open:o,onOpenChange:i}),t[27]=o,t[28]=v):v=t[28];let y;return t[29]!==j||t[30]!==_||t[31]!==v?(y=s.jsxs(s.Fragment,{children:[j,_,v]}),t[29]=j,t[30]=_,t[31]=v,t[32]=y):y=t[32],y}function bt(){const t=P.c(10),e=U();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Kt,{}),t[2]=l):l=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=s.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let r;return t[7]!==n||t[8]!==i?(r=s.jsx(J,{className:"gap-0.5",children:s.jsx(V,{children:s.jsx(qt,{trigger:s.jsxs(Y,{tooltip:n,children:[l,i]})})})}),t[7]=n,t[8]=i,t[9]=r):r=t[9],r}function ko(){const t=P.c(19),{state:e}=_e(),n=e==="collapsed",l=nt(),o=!l;if(n){let u;t[0]!==l?(u=l?s.jsx(bt,{}):s.jsx(gt,{}),t[0]=l,t[1]=u):u=t[1];let m;t[2]!==o?(m=o&&s.jsx(xt,{}),t[2]=o,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(V,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(qe,{})})}),t[4]=f):f=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(V,{children:s.jsx(Co,{})}),t[5]=x):x=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(J,{children:[f,x,s.jsx(V,{children:s.jsx(Ve,{})})]}),t[6]=p):p=t[6];let g;return t[7]!==u||t[8]!==m?(g=s.jsxs(Ge,{className:"px-2 pb-3 gap-1",children:[u,m,p]}),t[7]=u,t[8]=m,t[9]=g):g=t[9],g}let i;t[10]!==l?(i=l?s.jsx(bt,{}):s.jsx(gt,{}),t[10]=l,t[11]=i):i=t[11];let r;t[12]!==o?(r=o&&s.jsx(xt,{}),t[12]=o,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(V,{children:s.jsx(qe,{variant:"full"})}),t[14]=a):a=t[14];let d;t[15]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(J,{className:"gap-0.5",children:[a,s.jsx(V,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ve,{})}),s.jsx(No,{})]})})]}),t[15]=d):d=t[15];let c;return t[16]!==i||t[17]!==r?(c=s.jsxs(Ge,{className:"px-2 pb-3 gap-0.5",children:[i,r,d]}),t[16]=i,t[17]=r,t[18]=c):c=t[18],c}function wo(){const t=P.c(11),e=U(),n=ae(),{org:l}=Q(),{setOpenMobile:o}=_e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(J,{children:s.jsx(V,{children:s.jsx(Ve,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=r):r=t[2];let a;t[3]!==n||t[4]!==l.slug||t[5]!==o?(a=()=>{n({to:"/$org/settings",params:{org:l.slug}}),o(!1)},t[3]=n,t[4]=l.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Oe,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==r||t[9]!==a?(c=s.jsx(Ge,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(we,{"aria-label":r,onClick:a,children:d})]})}),t[8]=r,t[9]=a,t[10]=c):c=t[10],c}function jt(t){const e=P.c(15),{className:n,wrapperClassName:l,children:o}=t,[i,r]=G.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&r(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;r(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const u=c;let m;e[2]!==l?(m=B("relative",l),e[2]=l,e[3]=m):m=e[3];let f;e[4]!==o||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:u,className:n,children:o}),e[4]=o,e[5]=n,e[6]=f):f=e[6];const x=i?"opacity-100":"opacity-0";let p;e[7]!==x?(p=B("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=p):p=e[8];let g;e[9]!==p?(g=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=g):g=e[10];let h;return e[11]!==m||e[12]!==f||e[13]!==g?(h=s.jsxs("div",{className:m,children:[f,g]}),e[11]=m,e[12]=f,e[13]=g,e[14]=h):h=e[14],h}function Mo(t){const e=P.c(9),{virtualMcpId:n,size:l,showAutomationBadge:o}=t,i=l===void 0?"sm":l,r=U();let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(Io,{virtualMcpId:n,size:i}):s.jsx(ke,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==r?(d=o&&s.jsx("span",{"aria-label":r("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(Zt,{size:10,className:"text-white"})}),e[3]=o,e[4]=r,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function Io(t){const e=P.c(6),{virtualMcpId:n,size:l}=t,o=Yt(n);if(!o){let a;return e[0]!==l?(a=s.jsx(ke,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=o.icon??null;let r;return e[2]!==o.title||e[3]!==l||e[4]!==i?(r=s.jsx(ke,{icon:i,name:o.title,size:l}),e[2]=o.title,e[3]=l,e[4]=i,e[5]=r):r=e[5],r}function vt(t){const e=P.c(53),{open:n,onOpenChange:l}=t,[o,i]=G.useState(""),{org:r}=Q(),{setTaskId:a}=Qt(),d=Jt(),c=U();let u,m,f;e[0]!==r.id||e[1]!==o?(f=o.trim(),m=vs,u=It.globalSearch(r.id,f),e[0]=r.id,e[1]=o,e[2]=u,e[3]=m,e[4]=f):(u=e[2],m=e[3],f=e[4]);const x=n&&f.length>0;let p;e[5]!==d||e[6]!==f?(p=async()=>await d.call("GLOBAL_SEARCH",{query:f,limit:20}),e[5]=d,e[6]=f,e[7]=p):p=e[7];let g;e[8]!==u||e[9]!==x||e[10]!==p?(g={queryKey:u,enabled:x,queryFn:p,staleTime:1e4},e[8]=u,e[9]=x,e[10]=p,e[11]=g):g=e[11];const{data:h,isFetching:b}=m(g);let j;e[12]!==h?.items?(j=h?.items??[],e[12]=h?.items,e[13]=j):j=e[13];const _=j;let v;e[14]!==l?(v=L=>{L||i(""),l(L)},e[14]=l,e[15]=v):v=e[15];const y=v;let C;e[16]!==y||e[17]!==a?(C=L=>{y(!1),a(L.id,L.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=C):C=e[18];const N=C;let S;e[19]!==c?(S=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=S):S=e[20];let w;e[21]!==S?(w=s.jsx(Ze,{children:S}),e[21]=S,e[22]=w):w=e[22];let k;e[23]!==c?(k=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=k):k=e[24];let I;e[25]!==k?(I=s.jsx(Ot,{children:k}),e[25]=k,e[26]=I):I=e[26];let M;e[27]!==w||e[28]!==I?(M=s.jsxs(Et,{className:"sr-only",children:[w,I]}),e[27]=w,e[28]=I,e[29]=M):M=e[29];let z;e[30]!==c?(z=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=z):z=e[31];let A;e[32]!==o||e[33]!==z?(A=s.jsx($n,{value:o,onValueChange:i,placeholder:z}),e[32]=o,e[33]=z,e[34]=A):A=e[34];let $;e[35]!==N||e[36]!==b||e[37]!==_||e[38]!==c||e[39]!==f?($=f?b&&_.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):_.length===0?s.jsx(Pn,{children:c("tasksPanel.globalSearchDialog.noResults")}):_.map(L=>L.type==="thread"?s.jsxs(An,{value:`thread:${L.id}:${L.title}`,onSelect:()=>N(L),className:"gap-2.5",children:[s.jsx(Mo,{virtualMcpId:L.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:L.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.startTyping")}),e[35]=N,e[36]=b,e[37]=_,e[38]=c,e[39]=f,e[40]=$):$=e[40];let R;e[41]!==$?(R=s.jsx(zn,{children:$}),e[41]=$,e[42]=R):R=e[42];let E;e[43]!==A||e[44]!==R?(E=s.jsxs(On,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,R]}),e[43]=A,e[44]=R,e[45]=E):E=e[45];let O;e[46]!==M||e[47]!==E?(O=s.jsxs(zt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[M,E]}),e[46]=M,e[47]=E,e[48]=O):O=e[48];let D;return e[49]!==y||e[50]!==n||e[51]!==O?(D=s.jsx(et,{open:n,onOpenChange:y,children:O}),e[49]=y,e[50]=n,e[51]=O,e[52]=D):D=e[52],D}function To(t){return t==="ephemeral"||t.startsWith("thread:")}function is(t){const e=P.c(45),{task:n,isActive:l,onClick:o,onArchive:i,showAutomationBadge:r,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,u=U(),m=Rn(n.status),f=m.icon,x=n.metadata?.kind==="tool_call_run",p=Yt(x?void 0:n.virtual_mcp_id);let g;e[0]!==p?(g=Ks(p),e[0]=p,e[1]=g):g=e[1];const h=g;Ln(6e4);const b=r||!!n.trigger_id,j=n.id,_="button",v=0;let y;e[2]!==o?(y=K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),o())},e[2]=o,e[3]=y):y=e[3];const C=c?"-ml-4 pl-6":"pl-[7px]",N=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let S;e[4]!==C||e[5]!==N?(S=B("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",C,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=C,e[5]=N,e[6]=S):S=e[6];let w;e[7]!==x||e[8]!==a||e[9]!==p?.icon||e[10]!==p?.title?(w=a&&!x&&s.jsx(ke,{icon:p?.icon??null,name:p?.title??"?",size:"2xs"}),e[7]=x,e[8]=a,e[9]=p?.icon,e[10]=p?.title,e[11]=w):w=e[11];let k;e[12]!==b||e[13]!==u?(k=b&&s.jsx(Zt,{size:12,"aria-label":u("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=b,e[13]=u,e[14]=k):k=e[14];let I;e[15]!==u||e[16]!==n.title?(I=n.title||u("tasksPanel.taskRow.untitledTask"),e[15]=u,e[16]=n.title,e[17]=I):I=e[17];let M;e[18]!==I?(M=s.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=M):M=e[19];let z;e[20]!==k||e[21]!==M?(z=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[k,M]}),e[20]=k,e[21]=M,e[22]=z):z=e[22];let A;e[23]!==h||e[24]!==l||e[25]!==n.branch||e[26]!==n.updated_at?(A=n.updated_at&&s.jsxs("div",{className:B("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!To(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):h?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[h.owner,"/",h.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Gn(new Date(n.updated_at))})]}),e[23]=h,e[24]=l,e[25]=n.branch,e[26]=n.updated_at,e[27]=A):A=e[27];let $;e[28]!==z||e[29]!==A?($=s.jsxs("div",{className:"flex-1 min-w-0",children:[z,A]}),e[28]=z,e[29]=A,e[30]=$):$=e[30];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!d&&s.jsx("span",{className:B("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",i&&"group-hover/row:opacity-0"),"aria-label":u("tasksPanel.taskRow.statusLabel",{status:m.label}),children:s.jsx(f,{size:14,className:B(m.iconClassName,n.status==="in_progress"&&"animate-spin")})});let O;e[31]!==i||e[32]!==u?(O=i&&s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":u("tasksPanel.taskRow.archiveTask"),onClick:K=>{K.stopPropagation(),i()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ys,{size:14})})}),s.jsx(ve,{side:"right",children:u("tasksPanel.taskRow.archive")})]}),e[31]=i,e[32]=u,e[33]=O):O=e[33];let D;e[34]!==E||e[35]!==O?(D=s.jsxs("div",{className:R,children:[E,O]}),e[34]=E,e[35]=O,e[36]=D):D=e[36];let L;return e[37]!==o||e[38]!==$||e[39]!==D||e[40]!==y||e[41]!==S||e[42]!==w||e[43]!==n.id?(L=s.jsxs("div",{"data-task-id":j,role:_,tabIndex:v,onClick:o,onKeyDown:y,className:S,children:[w,$,D]}),e[37]=o,e[38]=$,e[39]=D,e[40]=y,e[41]=S,e[42]=w,e[43]=n.id,e[44]=L):L=e[44],L}const yt=["requires_action","in_progress","failed","expired","completed"];function Po(t){const e=new Map(yt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return yt.map(n=>({status:n,threads:e.get(n)}))}const Ao="sidebar.group.expanded.";function $o(t,e){const n=P.c(3),[l,o]=ze(`${Ao}${t}`,e);let i;return n[0]!==l||n[1]!==o?(i=[l,o],n[0]=l,n[1]=o,n[2]=i):i=n[2],i}function rs(t){const e=P.c(18),{onClick:n,isFetching:l,indented:o}=t,i=U();let r;e[0]!==i?(r=i("sidebar.showMoreButton.ariaLabel"),e[0]=i,e[1]=r):r=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=B("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==l?(c=l&&s.jsx(_s,{size:14,className:"animate-spin"}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==l||e[7]!==i?(u=i(l?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=l,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==u?(m=s.jsx("span",{children:u}),e[9]=u,e[10]=m):m=e[10];let f;return e[11]!==l||e[12]!==n||e[13]!==r||e[14]!==d||e[15]!==c||e[16]!==m?(f=s.jsxs("button",{type:"button","aria-label":r,onClick:n,disabled:l,className:d,children:[c,m]}),e[11]=l,e[12]=n,e[13]=r,e[14]=d,e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function zo(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Oo(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Ae=0;const Ye=[];function Eo(){for(;Ae<as&&Ye.length>0;){const t=Ye.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Ae++,t().then(e,n).finally(()=>{Ae--,Eo()})};Ae<as?l():Ye.push(l)})}const Ee=10;function _t(t,e,n,l,o){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const r={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return r.status=e,r}function Do(t,e,n,l){let o=0;for(const i of t)ds(i,e,n,l)&&o++;return o}function Le(t,e,n,l){return Do(t,e,n,l)}function Ro(t,e){return!!(t>=Ee||t===0&&e)}function St(t,e){return t<e}function Lo(t,e){return e===!1?!1:e===!0?!0:t}function ds(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const $e=new Map,Pe=new Map;function Fo(t,e){return e?t>=Ee?!0:null:!1}function Ct(t){return $e.get(t)}function Go(t,e){$e.set(t,e)}function Bo(t,e,n){const l=$e.get(t);if(l!==void 0){n(l);return}let o=Pe.get(t);o||(o=cs(e).then(i=>($e.set(t,i),Pe.delete(t),i)).catch(()=>(Pe.delete(t),Promise.reject(new Error("group probe failed")))),Pe.set(t,o)),o.then(n,()=>n(!1))}function Nt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ee,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ho(t,e,n,l,o){let i=0;for(const r of t)e.has(r.id)||ds(r,n,l,o)&&i++;return i}function Uo(t,e,n,l){const o=P.c(8),{org:i}=Q(),r=zo(i.id,t,e,n);let a;o[0]!==n?(a=Oo(n),o[0]=n,o[1]=a):a=o[1];const d=a,[c,u]=G.useState({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==r&&u({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});const m=wn(),{threads:f,hasMore:x}=Xt(),p=Le(f,t,e,n),g=Ro(p,x),h=Fo(p,x),b=Jt();if(c.identity===r&&c.serverHasMore===null){const N=h??Ct(r);N!==void 0&&u({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===r&&c.serverHasMore===null&&h===null&&Ct(r)===void 0&&c.probeSubscribedIdentity!==r&&(u(N=>N.identity===r?{...N,isProbing:!0,probeSubscribedIdentity:r}:N),Bo(r,async()=>{const N=_t(t,e,0,n,1),S=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:w}=Nt(S),k=Le(m.threads.get(),t,e,n);return w===void 0?!1:St(k,w)},N=>{u(S=>S.identity!==r?S:{...S,isProbing:!1,serverHasMore:N})}));const _=async function(){if(c.isFetching||c.isProbing||d)return;const S=r;u(w=>w.identity===S?{...w,isFetching:!0}:w);try{const w=Le(f,t,e,n),k=_t(t,e,w,n,Ee),I=await cs(()=>b.call("COLLECTION_THREADS_LIST",k)),{items:M,hasMore:z,totalCount:A}=Nt(I),$=new Set(f.map(Wo)),R=Ho(M,$,t,e,n),E=w;m.mergeThreads(M),u(O=>{if(O.identity!==S)return O;let D;return A!==void 0?D=St(E+R,A):D=M.length===0||R===0?!1:z,Go(S,D),{...O,isFetching:!1,serverHasMore:D}})}catch(w){const k=w,I=k instanceof Error?k.message:String(k);ce.error(`Could not load more tasks: ${I}`),u(M=>M.identity===S?{...M,isFetching:!1}:M)}},v=c.isFetching||c.isProbing,y=!d&&!v&&Lo(g,c.serverHasMore);let C;return o[2]!==v||o[3]!==_||o[4]!==y||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(C={hasMore:y,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:_},o[2]=v,o[3]=_,o[4]=y,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=C):C=o[7],C}function Wo(t){return t.id}function Ko(t){const e=P.c(20),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,{isFetching:c,isProbing:u,loadMore:m,hasMore:f,serverHasMore:x}=Uo("status",n,d),[p,g]=G.useState(!1);!p&&l.length===0&&x===!0&&!c&&!u&&(g(!0),queueMicrotask(()=>{m()}));let h;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==i||e[5]!==l){let _;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r||e[11]!==i?(_=v=>s.jsx(is,{task:v,isActive:o===v.id,onClick:()=>i(v),onArchive:a&&v.created_by===d.currentUserId?()=>r(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=i,e[12]=_):_=e[12],h=l.map(_),e[0]=o,e[1]=a,e[2]=d,e[3]=r,e[4]=i,e[5]=l,e[6]=h}else h=e[6];let b;e[13]!==f||e[14]!==c||e[15]!==m?(b=(f||c)&&s.jsx(rs,{onClick:()=>{m()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=m,e[16]=b):b=e[16];let j;return e[17]!==h||e[18]!==b?(j=s.jsxs(s.Fragment,{children:[h,b]}),e[17]=h,e[18]=b,e[19]=j):j=e[19],j}function Vo(t){const e=P.c(36),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,c=Fn[n],u=c.icon,[m,f]=$o(`status-${n}`,!1);let x;e[0]!==m||e[1]!==f?(x=function(){f(!m)},e[0]=m,e[1]=f,e[2]=x):x=e[2];const p=x;let g;e[3]!==p?(g=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),p())},e[3]=p,e[4]=g):g=e[4];let h;e[5]!==u||e[6]!==c.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(u,{size:12,className:c.iconClassName})}),e[5]=u,e[6]=c.iconClassName,e[7]=h):h=e[7];let b;e[8]!==m?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(Bn,{size:14}):s.jsx(Hn,{size:14})}),e[8]=m,e[9]=b):b=e[9];let j;e[10]!==h||e[11]!==b?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,b]}),e[10]=h,e[11]=b,e[12]=j):j=e[12];let _;e[13]!==c.label?(_=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=_):_=e[14];let v;e[15]!==l.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let y;e[17]!==m||e[18]!==p||e[19]!==g||e[20]!==j||e[21]!==_||e[22]!==v?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:p,onKeyDown:g,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,_,v]}),e[17]=m,e[18]=p,e[19]=g,e[20]=j,e[21]=_,e[22]=v,e[23]=y):y=e[23];let C;e[24]!==o||e[25]!==a||e[26]!==m||e[27]!==d||e[28]!==r||e[29]!==i||e[30]!==n||e[31]!==l?(C=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Ko,{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=m,e[27]=d,e[28]=r,e[29]=i,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==y||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,C]}),e[33]=y,e[34]=C,e[35]=N):N=e[35],N}function kt(t){const e=P.c(38),{threads:n,groupBy:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:u,filtersActive:m}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Dn,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const b=m?"No chats match your filters":"No chats yet";let j;return e[1]!==b?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=j):j=e[2],j}const f=n.length>1||d;if(l==="status"){let h;if(e[3]!==o||e[4]!==f||e[5]!==a||e[6]!==r||e[7]!==i||e[8]!==n){let j;e[10]!==o||e[11]!==f||e[12]!==a||e[13]!==r||e[14]!==i?(j=_=>s.jsx(Vo,{status:_.status,threads:_.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:f,filters:a},_.status),e[10]=o,e[11]=f,e[12]=a,e[13]=r,e[14]=i,e[15]=j):j=e[15],h=Po(n).map(j),e[3]=o,e[4]=f,e[5]=a,e[6]=r,e[7]=i,e[8]=n,e[9]=h}else h=e[9];let b;return e[16]!==h?(b=s.jsx(s.Fragment,{children:h}),e[16]=h,e[17]=b):b=e[17],b}let x;if(e[18]!==o||e[19]!==f||e[20]!==a||e[21]!==r||e[22]!==i||e[23]!==n){let h;e[25]!==o||e[26]!==f||e[27]!==a||e[28]!==r||e[29]!==i?(h=b=>s.jsx(is,{task:b,isActive:o===b.id,onClick:()=>i(b),onArchive:f&&b.created_by===a.currentUserId?()=>r(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=o,e[26]=f,e[27]=a,e[28]=r,e[29]=i,e[30]=h):h=e[30],x=n.map(h),e[18]=o,e[19]=f,e[20]=a,e[21]=r,e[22]=i,e[23]=n,e[24]=x}else x=e[24];let p;e[31]!==d||e[32]!==c||e[33]!==u?(p=(d||c)&&s.jsx(rs,{onClick:u,isFetching:c}),e[31]=d,e[32]=c,e[33]=u,e[34]=p):p=e[34];let g;return e[35]!==x||e[36]!==p?(g=s.jsxs(s.Fragment,{children:[x,p]}),e[35]=x,e[36]=p,e[37]=g):g=e[37],g}function qo(t,e,n){if(!n)return;const l=t.findIndex(o=>o.id===e);if(l!==-1){for(let o=l+1;o<t.length;o++){const i=t[o];if(i?.created_by===n)return i}for(let o=l-1;o>=0;o--){const i=t[o];if(i?.created_by===n)return i}}}function wt(t){const e=P.c(17),{label:n,onClick:l,active:o,children:i}=t,[r,a]=G.useState(!1);let d,c,u,m;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),u=()=>a(!0),m=()=>a(!1),e[0]=d,e[1]=c,e[2]=u,e[3]=m):(d=e[0],c=e[1],u=e[2],m=e[3]);const f=o&&"bg-sidebar-accent text-foreground";let x;e[4]!==f?(x=B("md:size-[34px] rounded-lg",f),e[4]=f,e[5]=x):x=e[5];let p;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(p=s.jsx(je,{asChild:!0,children:s.jsx(we,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:u,onBlur:m,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=p):p=e[10];let g;e[11]!==n?(g=s.jsx(ve,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let h;return e[13]!==r||e[14]!==p||e[15]!==g?(h=s.jsxs(ye,{open:r,children:[p,g]}),e[13]=r,e[14]=p,e[15]=g,e[16]=h):h=e[16],h}function Fe(t){const e=P.c(13),{label:n,value:l,onChange:o,options:i}=t;let r;e[0]!==n?(r=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==o?(a=m=>m&&o(m),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Yo),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Nn,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let u;return e[10]!==r||e[11]!==c?(u=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r,c]}),e[10]=r,e[11]=c,e[12]=u):u=e[12],u}function Yo(t){return s.jsxs(Cn,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ms({onNavigate:t}={}){const e=U(),{data:n}=Ne.useSession(),l=n?.user?.id,{org:o}=Q(),i=Rt({connectionId:Lt,orgId:o.id,orgSlug:o.slug}),r=rt(o.id).id,a=kn(),{threads:d,hasMore:c,isFetchingMore:u,fetchNextPage:m}=Xt(),f=d.filter(T=>!T.hidden),{hide:x,setScope:p}=Mn(),g=ae(),{setTaskId:h,createNewTask:b}=Qt(),j=Ss({strict:!1}),_=Tt({strict:!1}),v=j.taskId??null,y=_.virtualmcpid??d.find(T=>T.id===v)?.virtual_mcp_id??null,C=()=>{t?.()},N=[...f].sort((T,F)=>(F.updated_at??"").localeCompare(T.updated_at??"")),[S,w]=G.useState("all"),[k,I]=G.useState("flat"),[M,z]=ze("sidebar-threads-scope-all",!1),[A,$]=G.useState(!1),[R,E]=G.useState(!1),O={type:S,member:"mine",currentUserId:l??null},D={};M||(D.created_by="me"),p(D);const L=T=>l?T.filter(F=>F.created_by===l):[],K=T=>S==="automation"?T.filter(F=>!!F.trigger_id):S==="manual"?T.filter(F=>!F.trigger_id):T,Z=L(N),ne=K(Z),de=K(N),oe=M?de:ne,ee=T=>{if(l&&T.created_by&&T.created_by!==l)return;const F=T.id===v;if(x(T.id),Tn(T.id),!F)return;const W=qo(oe,T.id,l);C(),W?h(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},le=T=>{C(),h(T.id,T.virtual_mcp_id)},me=async T=>{try{const F=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((F.structuredContent??F).items?.length??0)===0}catch{return!1}},Se=async()=>{const T=y??r;q("sidebar_new_thread_clicked",{virtual_mcp_id:T});const F=Z.find(W=>W.virtual_mcp_id===T&&W.title==="New chat");if(F&&await me(F.id)){C(),h(F.id,T);return}C(),b(T)},{state:ue,isMobile:fe,toggleSidebar:pe}=_e();if(ue==="collapsed"&&!fe){const T=rt(o.id),F=new Map((a??[]).map(H=>[H.id,H])),W=H=>(H?F.get(H):void 0)??(H===r?T:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(Vs,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(Y,{tooltip:o.name,children:s.jsx(qs,{org:o,size:"sm"})})})}),s.jsxs(J,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(V,{children:s.jsx(Y,{"aria-label":e("sidebar.taskGroupsList.toggleSidebar"),tooltip:e("sidebar.taskGroupsList.toggleSidebar"),onClick:pe,children:s.jsx(Ft,{size:16})})}),oe.map(H=>{const re=W(H.virtual_mcp_id);return s.jsx(V,{children:s.jsx(Y,{"aria-label":H.title||e("sidebar.taskGroupsList.newChat"),tooltip:H.title||e("sidebar.taskGroupsList.newChat"),isActive:H.id===v,onClick:()=>le(H),children:s.jsx(ke,{icon:re?.icon??null,name:re?.title??"Agent",size:"xs"})})},H.id)})]})]})}const X=k!=="flat"||S!=="all"||M===!0,he=s.jsxs(Gt,{children:[s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(we,{"aria-label":e("sidebar.taskGroupsList.filterChats"),active:X,className:"md:size-[34px] rounded-lg",children:[s.jsx(Sn,{size:16}),X&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ve,{side:"bottom",children:e("sidebar.taskGroupsList.filterChats")})]}),s.jsxs(Ht,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterView"),value:k,onChange:T=>{q("tasks_panel_group_by_changed",{to_value:T}),I(T)},options:[{value:"flat",label:e("sidebar.taskGroupsList.viewList"),icon:s.jsx(dn,{size:13})},{value:"status",label:e("sidebar.taskGroupsList.viewStatus"),icon:s.jsx(mn,{size:13})}]}),s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterType"),value:S,onChange:T=>{q("tasks_panel_filter_changed",{to_value:T}),w(T)},options:[{value:"all",label:e("sidebar.taskGroupsList.typeAll")},{value:"manual",label:e("sidebar.taskGroupsList.typeChats")},{value:"automation",label:e("sidebar.taskGroupsList.typeAuto")}]}),s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterScope"),value:M?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:e("sidebar.taskGroupsList.scopeMine")},{value:"team",label:e("sidebar.taskGroupsList.scopeTeam")}]})]})]}),te=T=>s.jsx(Ut,{delayDuration:300,children:s.jsxs("div",{className:B("shrink-0 flex items-center justify-between",T?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(es,{className:"md:size-[34px] rounded-lg"}),he]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(wt,{label:e("sidebar.taskGroupsList.searchChats"),onClick:()=>{q("tasks_panel_search_opened"),E(!0),$(!0)},children:s.jsx(un,{size:16})}),s.jsx(wt,{label:e("sidebar.taskGroupsList.newChat"),onClick:()=>{Se()},children:s.jsx(fn,{size:16})})]})]})});return fe?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!0),s.jsx(jt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(kt,{threads:oe,groupBy:k,activeTaskId:v,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:u,onLoadMore:()=>{m()},filtersActive:X})}),R&&s.jsx(vt,{open:A,onOpenChange:$})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(jt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(kt,{threads:oe,groupBy:k,activeTaskId:v,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:u,onLoadMore:()=>{m()},filtersActive:X})})}),R&&s.jsx(vt,{open:A,onOpenChange:$})]})}const Xo=5,Qo=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function us(){const t=P.c(3),{state:e}=_e();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Xo}).map(el)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"})]}),s.jsx(se,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Qo.map(Jo)})]}),t[2]=l):l=t[2],l}function Jo(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(se,{className:"size-5 rounded-full shrink-0"}),s.jsx(se,{className:B("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(Zo)})]},e)}function Zo(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(se,{className:"h-3 flex-1 rounded-sm"})},e)}function el(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function tl(){const t=P.c(2);if(nt()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Be,{showName:!0}),t[0]=l):l=t[0],l}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(Be,{}),s.jsx(st,{})]}),t[1]=n):n=t[1],n}function sl(){const t=P.c(5),e=ss();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ko,{}),l=s.jsx(tl,{}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:s.jsx(us,{}),children:s.jsx(ms,{})})}),t[2]=o):o=t[2];let i;return t[3]!==e?(i=s.jsx(ts,{children:s.jsx(ls,{sections:e,footer:n,header:l,additionalContent:o})}),t[3]=e,t[4]=i):i=t[4],i}function nl(t){const e=P.c(8),{onClose:n}=t,l=ss();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(wo,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(us,{}),e[1]=i):i=e[1];let r;e[2]!==n?(r=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:i,children:s.jsx(ms,{onNavigate:n})})}),e[2]=n,e[3]=r):r=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==r?(a=s.jsx(ts,{children:s.jsx(io,{sections:l,onClose:n,footer:o,additionalContent:r})}),e[4]=n,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}const ol="sidebar.open";function ll(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ns,{}),t[0]=e):e=t[0],e}function Mr(){const t=P.c(37),e=$t(),n=nt();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{connect:o,siteUrl:i}=Tt(l),r=o==="1",[a,d]=ze(ol,!1),{width:c,wrapperRef:u,onStartResize:m,resetWidth:f}=Jn(),x=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(es,{}),t[1]=p):p=t[1];let g;t[2]!==n?(g=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(st,{})}),t[2]=n,t[3]=g):g=t[3];let h,b,j,_,v;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(qe,{}),b=s.jsx(xe.TogglesSlot,{}),j=s.jsx(xe.TabsSlot,{className:"shrink-0"}),_=s.jsx(xe.CenterSlot,{}),v=s.jsx(xe.RightSlot,{}),t[4]=h,t[5]=b,t[6]=j,t[7]=_,t[8]=v):(h=t[4],b=t[5],j=t[6],_=t[7],v=t[8]);let y;t[9]!==g?(y=s.jsx(xe.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[p,g,h,b,j,_,v]})}),t[9]=g,t[10]=y):y=t[10];const C=y;let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={background:"transparent",containerType:"inline-size"},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ms,{className:"flex flex-col min-h-0",style:N,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(G.Suspense,{fallback:s.jsx(ll,{}),children:s.jsx(Cs,{})})})})}),t[12]=S):S=t[12];const w=S,k=x&&C,I=`${c}px`;let M;t[13]!==I?(M={"--sidebar-width":I,"--sidebar-width-icon":"3.125rem"},t[13]=I,t[14]=M):M=t[14];const z=M;let A;t[15]!==e||t[16]!==m||t[17]!==f?(A=!e&&s.jsxs(s.Fragment,{children:[s.jsx(sl,{}),s.jsx(Yn,{onPointerDown:m,onDoubleClick:f})]}),t[15]=e,t[16]=m,t[17]=f,t[18]=A):A=t[18];let $;t[19]!==z||t[20]!==A||t[21]!==u?($=s.jsxs(Is,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:z,children:[A,w]}),t[19]=z,t[20]=A,t[21]=u,t[22]=$):$=t[22];let R;t[23]!==e?(R=e&&s.jsx(En,{renderSidebar:il}),t[23]=e,t[24]=R):R=t[24];let E;t[25]!==i||t[26]!==r?(E=r&&s.jsx(Un,{siteUrl:i}),t[25]=i,t[26]=r,t[27]=E):E=t[27];let O;t[28]!==k||t[29]!==$||t[30]!==R||t[31]!==E?(O=s.jsx(yn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,$,R,E]})}),t[28]=k,t[29]=$,t[30]=R,t[31]=E,t[32]=O):O=t[32];let D;return t[33]!==d||t[34]!==a||t[35]!==O?(D=s.jsx(In,{children:s.jsx(xe.Provider,{children:s.jsx(Ts,{open:a,onOpenChange:d,children:O})})}),t[33]=d,t[34]=a,t[35]=O,t[36]=D):D=t[36],D}function il(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(nl,{onClose:e})})})}export{Mr as default};