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
@@ -0,0 +1,8 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DX-8pprv.js","assets/index-QzdsfBYd.js","assets/index-BkzI2YJo.css","assets/ArrowUp-zrMcuXAr.js","assets/chat-context-DG5VMA6B.js","assets/autosend-BeIUwx1c.js","assets/hooks-CxPB8UeZ.js","assets/use-mcp-client-BpYZJj4o.js","assets/auth-BbZNerdw.js","assets/decopilot-sse-pool-DWTCLkf7.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-BhhcZfev.js","assets/use-virtual-mcp-vNY0_cuG.js","assets/use-ai-providers-iWGeiPtA.js","assets/location-BpLtHjTZ.js","assets/tab-id-BijBBRwE.js","assets/use-decopilot-events-BYrGmZOI.js","assets/use-organization-settings-D2HSrnf_.js","assets/automation-runs-qvWRqyqv.js","assets/select-BL9zv-JP.js","assets/tooltip-D0dd9ydB.js","assets/Check-K9ygl0O6.js","assets/ChevronDown-ivzZdE8w.js","assets/ChevronUp-DtesMDJI.js","assets/useInfiniteQuery-aIQ9VGjU.js","assets/use-infinite-scroll-Dl1pnFE_.js","assets/use-connection-B_ydhIaR.js","assets/card-CsVINvzI.js","assets/sidebar-BAaF24ye.js","assets/LayoutLeft-BPQ9stJD.js","assets/use-mobile-CRkRo6zy.js","assets/X-DjQw217D.js","assets/table-BsyOuaNT.js","assets/empty-state-B7ZzKn6B.js","assets/use-members-CTrDSEbl.js","assets/use-org-auth-client-C7NIGHa2.js","assets/use-clock-tick-BqpT3lz9.js","assets/AlertCircle-BVcbGU63.js","assets/CheckCircle-Ddtle1Hu.js","assets/DotsVertical-0w0ZkjcP.js","assets/agent-icon-B2LgmiRt.js","assets/Tool01-zKnvH-kk.js","assets/Settings02-BrQ1R_C3.js","assets/Tool02-a1QDD1BE.js","assets/ArrowRight-CKlvyIoh.js","assets/ArrowUpRight-BRtGTw6u.js","assets/TrendUp01-DbtFTYSl.js","assets/ZapSquare-CqrPlIO3.js","assets/ZoomOut-CAsxnm2x.js","assets/Users03-B2Rmdg8K.js","assets/ChevronRight-wehtSt4J.js","assets/Stars02-Rv7Zpq5p.js","assets/Copy01-B2yggp1R.js","assets/Globe01-dnwQ58ni.js","assets/Eye-CZVpzZj3.js","assets/FilterLines-xmnqgD9Q.js","assets/Star01-DkiTL7fS.js","assets/Globe04-C5N1Fi_a.js","assets/SwitchHorizontal01-YOHN8l_Y.js","assets/HardDrive-BP9_iF3o.js","assets/Image01-CTFJ4q_z.js","assets/Key01-DXv7srOu.js","assets/XCircle-BNVPuHya.js","assets/LinkExternal01-BktZyAnv.js","assets/LogOut01-BDBTSoW6.js","assets/Monitor01-7QFBOkji.js","assets/Sun-DIwJT6kw.js","assets/Package-D8m71yLY.js","assets/Palette-DWy3dzj0.js","assets/Play-lriwSM0x.js","assets/Plus-DQlLKoK7.js","assets/SearchLg-CoOX4SoC.js","assets/SearchMd-Dg6mSNN_.js","assets/Shield01-BeZ6Sg4x.js","assets/Stars01-DTVv_6xg.js","assets/Trash01-CvmXP6ap.js","assets/Upload01-Ur6u-B1R.js","assets/User01-ELT05I_C.js","assets/Users01-DmKZlyCu.js","assets/XClose-BO1Lwhh7.js","assets/Zap-C4HzUZ29.js","assets/use-automations-DbG3Rylz.js","assets/useSuspenseInfiniteQuery-TkWZQEXd.js","assets/avatar-B1FBqiPq.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DKPJm23R.js","assets/file-type-icon-Cg3Nm1XZ.js","assets/dialog-C7PMQncq.js","assets/monaco-editor-CTTjzlzK.js","assets/index-Cb8ogyWE.js","assets/index-DEfykvQ6.js","assets/calendar-BYOoZCNu.js","assets/shell-layout-3WAcXYR2.js","assets/required-auth-layout-Bf2ygqfO.js","assets/use-org-sso-C3FJc_XM.js","assets/integration-icon-DB0SNVRE.js","assets/use-navigate-to-agent-D7z6mwyi.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-BOEksfko.js","assets/form-zrd7LYxu.js","assets/label-DNCggKDl.js","assets/input-P-LUerq4.js","assets/drawer-D1Kw_X2C.js","assets/collection-search-HTEknyDM.js","assets/tabs-BQp4xLjw.js","assets/toggle-group-C9YlqJGO.js","assets/use-deco-credits-CaUme1US.js","assets/popover-1ACpRRoe.js","assets/alert-dialog-BsAEBtVk.js","assets/toolbar-icon-button-DEXhPEY6.js","assets/skeleton-onz47XQi.js","assets/use-registry-app-Cy2XVJ8o.js","assets/use-mcp-tools-l53r1zOu.js","assets/github-repo-picker-CcvybfZV.js","assets/use-debounced-value-Jiqdx_qI.js","assets/authenticate-and-persist-oauth-BUz0jLWA.js","assets/mcp-oauth-aEWbqsXM.js","assets/extract-connection-data-wIgwD813.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/github-repo-scope-DjMZbiKa.js","assets/connection-card-CChyV7In.js","assets/use-registry-connections-xT5_Tp16.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-CkyHXuQm.js","assets/connection-form-helpers-BsaAWJ8U.js","assets/collection-tabs-Cu0giObB.js","assets/badge-8mmmFMes.js","assets/connect-desktop-dialog-CVLI9IFZ.js","assets/select-model-C52p56Qc.js","assets/checkbox-CAW6yy-f.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-DidGbszQ.js","assets/index-BGtGWsgH.js","assets/toolbar-DYjFUHXX.js","assets/dropdown-menu-C3car2Q8.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-yNgZe7Tt.js","assets/deco-site-production-url-CaKZ7xBn.js","assets/use-capability-BxZIF_3J.js","assets/pt-BR-CLy76QW2.js","assets/use-mcp-auth-status-C48HeCw9.js","assets/use-debounced-autosave-O_qaz61i.js","assets/index-CPojIfJr.js","assets/search-input-CzVqrwgl.js","assets/switch-m3W7oBlX.js","assets/use-secrets-Dlwxdo4W.js","assets/command-BYmAVtGu.js","assets/index-DSvM3i2U.js","assets/useQueries-CP5a8Gkq.js","assets/use-file-configs-D378SSra.js","assets/automation-list-row-CnMPr30w.js","assets/get-initials-D-f_fDFw.js","assets/index-CiP0VfIv.css"])))=>i.map(i=>d[i]);
2
+ import{G as Ws,r as B,c as q,x as Xs,K as vt,F as He,n as Nt,a as Js,o as Zt,t as Dt,_ as Zs,m as V,j as s,e as Tt,b as te,B as ke,E as en,d as js,p as ds,k as es,u as tn,aK as sn}from"./index-QzdsfBYd.js";import{g as Re}from"./get-initials-D-f_fDFw.js";import{A as Pe}from"./avatar-B1FBqiPq.js";import{au as ks,U as nn,e as Ns,av as an,h as vs,aw as ln,as as Qt,an as Ss,ax as rn,X as _t,n as Ds,ar as on}from"./agent-icon-B2LgmiRt.js";import{i as cn}from"./SwitchHorizontal01-YOHN8l_Y.js";import{s as ts}from"./Plus-DQlLKoK7.js";import{a as Et,P as At,b as $t}from"./popover-1ACpRRoe.js";import{W as dn,m as us,S as ws,C as _s,g as un,u as fn,h as mn,a as gn}from"./use-mcp-client-BpYZJj4o.js";import{u as xn,G as Cs}from"./use-registry-app-Cy2XVJ8o.js";import{d as ss,e as ns,b as as,h as pn,a as hn,c as yn}from"./dialog-C7PMQncq.js";import{b as bn,u as jn}from"./use-connection-B_ydhIaR.js";import{g as kn}from"./github-repo-scope-DjMZbiKa.js";import{a as Nn}from"./authenticate-and-persist-oauth-BUz0jLWA.js";import{e as vn}from"./extract-connection-data-wIgwD813.js";import{u as Is}from"./use-members-CTrDSEbl.js";import{u as Lt}from"./studio-tools-BhhcZfev.js";import{t as Sn,T as Dn,S as Le}from"./decopilot-sse-pool-DWTCLkf7.js";import{u as wn}from"./use-decopilot-events-BYrGmZOI.js";import{a as _n}from"./format-time-BnbuEtat.js";import{i as Bs}from"./AlertCircle-BVcbGU63.js";import{i as ls}from"./CheckCircle-Ddtle1Hu.js";import{i as Cn}from"./DotsVertical-0w0ZkjcP.js";import{s as In}from"./Eye-CZVpzZj3.js";import{a as St,D as Ot,b as zt,c as Ft}from"./dropdown-menu-C3car2Q8.js";import{P as Yt,a as Bn,D as Tn,j as En,k as An,C as $n,c as On}from"./calendar-BYOoZCNu.js";import{u as zn}from"./use-copy-DKPJm23R.js";import{i as Fn}from"./Check-K9ygl0O6.js";import{i as Rn}from"./ChevronRight-wehtSt4J.js";import{a as Pn}from"./Copy01-B2yggp1R.js";import{i as Ln}from"./Globe01-dnwQ58ni.js";import{n as Ts}from"./LinkExternal01-BktZyAnv.js";import{i as fs}from"./X-DjQw217D.js";import{b as Es,C as As,a as Ye,e as Rt,d as $s,c as Os}from"./command-BYmAVtGu.js";import{s as Ht}from"./User01-ELT05I_C.js";import{g as Mn,b as qn,e as Kn,f as Un,a as Gn,D as Qn}from"./drawer-D1Kw_X2C.js";import{t as rs}from"./ChevronDown-ivzZdE8w.js";import{i as zs}from"./FilterLines-xmnqgD9Q.js";import{s as Vn}from"./TrendUp01-DbtFTYSl.js";import{u as Yn}from"./shell-layout-3WAcXYR2.js";import{b as Hn}from"./hooks-CxPB8UeZ.js";import{u as Wn}from"./use-organization-settings-D2HSrnf_.js";import{i as Fs}from"./ArrowRight-CKlvyIoh.js";import{f as Xn}from"./tab-id-BijBBRwE.js";import{u as Wt}from"./companions-core-C84CnqsZ.js";function Jn(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 ar="__home__";function os(t,e){return Ws.chatDraft(t,e)}function Zn(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 ea(t,e,n,o,a){const l=os(e,n);if(Jn(o)){t.removeItem(l);return}const r={tiptapDoc:o,updatedAt:Date.now()},c=JSON.stringify(r);try{t.setItem(l,c)}catch(d){if(ta(d)){const x=new TextEncoder().encode(c).byteLength;a?.onQuotaExceeded?.({docSizeBytes:x});return}throw d}}function lr(t,e,n){const o=os(e,n),a=t.getItem(o),l=Zn(a);return a!==null&&l===null&&t.removeItem(o),l}function rr(t,e,n){t.removeItem(os(e,n))}function ta(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}function sa(t){var e;const{char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:c}=t,d=o&&!a,x=An(n),h=new RegExp(`\\s${x}$`),i=r?"^":"",f=a?"":x,g=d?new RegExp(`${i}${x}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${i}(?:^)?${x}[^\\s${f}]*`,"gm"),y=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!y)return null;const m=c.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 v=m+p.index;let j=v+p[0].length;return d&&h.test(y.slice(j-1,j+1))&&(p[0]+=" ",j+=1),v<c.pos&&j>=c.pos?{range:{from:v,to:j},query:p[0].slice(n.length),text:p[0]}:null}var na=new Yt("suggestion");function aa({pluginKey:t=na,editor:e,char:n="@",allowSpaces:o=!1,allowToIncludeChar:a=!1,allowedPrefixes:l=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:d="suggestion",decorationContent:x="",decorationEmptyClass:h="is-empty",command:i=()=>null,items:f=()=>[],render:g=()=>({}),allow:y=()=>!0,findSuggestionMatch:m=sa,shouldShow:p}){let b;const u=g?.(),v=()=>{const k=e.state.selection.$anchor.pos,S=e.view.coordsAtPos(k),{top:w,right:T,bottom:I,left:C}=S;try{return new DOMRect(C,w,T-C,I-w)}catch{return null}},j=(k,S)=>S?()=>{const w=t.getState(e.state),T=w?.decorationId,I=k.dom.querySelector(`[data-decoration-id="${T}"]`);return I?.getBoundingClientRect()||null}:v;function D(k,S){var w;try{const I=t.getState(k.state),C=I?.decorationId?k.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=>i({editor:e,range:I?.range||{from:0,to:0},props:U}),decorationNode:C,clientRect:j(k,C)};(w=u?.onExit)==null||w.call(u,O)}catch{}const T=k.state.tr.setMeta(S,{exit:!0});k.dispatch(T)}const N=new Bn({key:t,view(){return{update:async(k,S)=>{var w,T,I,C,O,U,K;const _=(w=this.key)==null?void 0:w.getState(S),E=(T=this.key)==null?void 0:T.getState(k.state),A=_.active&&E.active&&_.range.from!==E.range.from,G=!_.active&&E.active,Y=_.active&&!E.active,R=!G&&!Y&&_.query!==E.query,H=G||A&&R,X=R||A,J=Y||A&&R;if(!H&&!X&&!J)return;const W=J&&!H?_:E,P=k.dom.querySelector(`[data-decoration-id="${W.decorationId}"]`);b={editor:e,range:W.range,query:W.query,text:W.text,items:[],command:F=>i({editor:e,range:W.range,props:F}),decorationNode:P,clientRect:j(k,P)},H&&((I=u?.onBeforeStart)==null||I.call(u,b)),X&&((C=u?.onBeforeUpdate)==null||C.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 k;b&&((k=u?.onExit)==null||k.call(u,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(k,S,w,T){const{isEditable:I}=e,{composing:C}=e.view,{selection:O}=k,{empty:U,from:K}=O,_={...S},E=k.getMeta(t);if(E&&E.exit)return _.active=!1,_.decorationId=null,_.range={from:0,to:0},_.query=null,_.text=null,_;if(_.composing=C,I&&(U||e.view.composing)){(K<S.range.from||K>S.range.to)&&!C&&!S.composing&&(_.active=!1);const A=m({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:S.active})&&(!p||p({editor:e,range:A.range,query:A.query,text:A.text,transaction:k}))?(_.active=!0,_.decorationId=S.decorationId?S.decorationId:G,_.range=A.range,_.query=A.query,_.text=A.text):_.active=!1}else _.active=!1;return _.active||(_.decorationId=null,_.range={from:0,to:0},_.query=null,_.text=null),_}},props:{handleKeyDown(k,S){var w,T,I,C;const{active:O,range:U}=N.getState(k.state);if(!O)return!1;if(S.key==="Escape"||S.key==="Esc"){const _=N.getState(k.state),E=(w=b?.decorationNode)!=null?w:null,A=E??(_?.decorationId?k.dom.querySelector(`[data-decoration-id="${_.decorationId}"]`):null);if(((T=u?.onKeyDown)==null?void 0:T.call(u,{view:k,event:S,range:_.range}))||!1)return!0;const Y={editor:e,range:_.range,query:_.query,text:_.text,items:[],command:R=>i({editor:e,range:_.range,props:R}),decorationNode:A,clientRect:A?()=>A.getBoundingClientRect()||null:null};return(I=u?.onExit)==null||I.call(u,Y),D(k,t),!0}return((C=u?.onKeyDown)==null?void 0:C.call(u,{view:k,event:S,range:U}))||!1},decorations(k){const{active:S,range:w,decorationId:T,query:I}=N.getState(k);if(!S)return null;const C=!I?.length,O=[d];return C&&O.push(h),Tn.create(k.doc,[En.inline(w.from,w.to,{nodeName:c,class:O.join(" "),"data-decoration-id":T,"data-decoration-content":x})])}}});return N}function la(t){const e=q.c(24),{editor:n,query:o,items:a,onSelect:l,onClose:r}=t,[c,d]=B.useState(0),x=B.useRef(a),h=B.useRef(c),i=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 m;e[1]!==g?(m=[g],e[1]=g,e[2]=m):m=e[2],B.useEffect(y,m);let p,b;e[3]!==a.length||e[4]!==c?(p=()=>{c>=a.length&&a.length>0&&d(0)},b=[a.length,c],e[3]=a.length,e[4]=c,e[5]=p,e[6]=b):(p=e[5],b=e[6]),B.useEffect(p,b);let u,v;e[7]!==a?(u=()=>{x.current=a},v=[a],e[7]=a,e[8]=u,e[9]=v):(u=e[8],v=e[9]),B.useEffect(u,v);let j,D;e[10]!==c?(j=()=>{h.current=c},D=[c],e[10]=c,e[11]=j,e[12]=D):(j=e[11],D=e[12]),B.useEffect(j,D);let N,k;e[13]!==l?(k=()=>{i.current=l},N=[l],e[13]=l,e[14]=N,e[15]=k):(N=e[14],k=e[15]),B.useEffect(k,N);let S,w;e[16]!==r?(S=()=>{f.current=r},w=[r],e[16]=r,e[17]=S,e[18]=w):(S=e[17],w=e[18]),B.useEffect(S,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=x.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=h.current;return R!==-1&&A[R]&&i.current?.(A[R],R),!0}case"Escape":return E.preventDefault(),f.current?.(),!0;default:return!1}},_=E=>{K(E)};return U.addEventListener("keydown",_,!0),()=>{U?.removeEventListener("keydown",_,!0)}},I=[n],e[19]=n,e[20]=T,e[21]=I):(T=e[20],I=e[21]),B.useEffect(T,I);const C=a.length?c:void 0;let O;return e[22]!==C?(O={selectedIndex:C,setSelectedIndex:d},e[22]=C,e[23]=O):O=e[23],O}function ra(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 oa=B.createContext(void 0);function ia(){const t=B.useContext(oa);if(!t)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return t}function or(t){const e=q.c(16),{editor:n,char:o,pluginKey:a,allow:l,onOpenChange:r}=t;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=c):c=e[0];const[d,x]=B.useReducer(ra,c);let h;e[1]!==r?(h=m=>{r?.(m)},e[1]=r,e[2]=h):h=e[2];const i=B.useEffectEvent(h);let f;e[3]!==o||e[4]!==l||e[5]!==n||e[6]!==i||e[7]!==a?(f=()=>{if(n?.isDestroyed)return;const m=a instanceof Yt?a:new Yt(a);n.state.plugins.find(u=>u.spec.key===m)&&n.unregisterPlugin(m);const b=aa({pluginKey:m,editor:n,char:o,allow(u){const v=n.state.doc.resolve(u.range.from);for(let j=v.depth;j>0;j--)if(v.node(j).type.name==="image")return!1;return!(l&&!l(u))},command(){},render:()=>({onStart:u=>{x({type:"ON_START",payload:{element:u.decorationNode??null,query:u.query,range:u.range}}),i(!0)},onUpdate:u=>{x({type:"ON_UPDATE",payload:{element:u.decorationNode??null,query:u.query,range:u.range}})},onKeyDown:u=>u.event.key==="Escape"?(x({type:"ON_EXIT"}),!0):!1,onExit:()=>{x({type:"ON_EXIT"}),i(!1)}}),items:ca});return n.registerPlugin(b),()=>{n?.isDestroyed||n.unregisterPlugin(m)}},e[3]=o,e[4]=l,e[5]=n,e[6]=i,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,x,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:x},e[14]=d,e[15]=y):y=e[15],y}function ca(){return[]}function ir({editor:t,queryKey:e,queryFn:n,onSelect:o}){const{state:a,dispatch:l}=ia(),r=B.useDeferredValue(a.query),{data:c}=Xs({queryKey:vt.suggestionItems(e,a.open,r),queryFn:()=>a.open?n({query:r}):[]}),d=()=>{l({type:"ON_EXIT"})},x=async(i,f)=>{if(!(a.selectedItem!==null||!a.range)){l({type:"SET_SELECTED_ITEM",payload:i});try{const{view:g}=t,m=g.state.selection.$to.nodeAfter?.text?.startsWith(" "),p=a.range?{...a.range}:{from:0,to:0};m&&a.range&&(p.to+=1),await o({range:p,item:i})===!1?l({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:h}=la({editor:t,query:r,items:c,onSelect:x,onClose:d});return{selectedItem:a.selectedItem,items:c,selectedIndex:h,close:d,onSelect:x}}function da(t){return t?t.run_in_progress?"generating":t.scanned_at?"ready":"none":"none"}const ua=2e4;function fa(t){if(typeof t!="string"||!t)return null;try{return new URL(t).hostname||null}catch{return null}}function ma(){const t=q.c(17),{org:e}=He(),n=dn.COMMERCE_DISCOVERY(e.id);let o;t[0]!==e.id||t[1]!==e.slug?(o=us({connectionId:ws,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 v=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}});return Wt(v)}}).data?.item??null,{data:c}=Nt({...us({connectionId:n,orgId:e.id,orgSlug:e.slug}),enabled:!!r}),d=vt.commerceDiscoveryDiagnostic(e.id,n),x=!!c;let h;t[3]!==c?(h=async()=>{if(!c)throw new Error("cdClient not ready");const v=await c.callTool({name:_s,arguments:{}});return Wt(v).diagnostic??null},t[3]=c,t[4]=h):h=t[4];let i;t[5]!==d||t[6]!==x||t[7]!==h?(i={queryKey:d,enabled:x,retry:1,refetchInterval:ga,queryFn:h},t[5]=d,t[6]=x,t[7]=h,t[8]=i):i=t[8];const f=Nt(i),g=f.data??null,y=f.isSuccess,m=r?.metadata?.siteUrl;let p;t[9]!==m?(p=fa(m),t[9]=m,t[10]=p):p=t[10];const b=c??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 ga(t){return t.state.status!=="error"&&da(t.state.data)==="generating"?ua:!1}function xa(t,e){return{to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:un(t.id),main:Xn(e,_s)}}}function pa(t){const{org:e}=He(),{data:n}=Js.useSession(),o=bn(),a=Zt(),l=fn({connectionId:ws,orgId:e.id,orgSlug:e.slug}),[r,c]=B.useState(!1),d=xn(t,{enabled:!1});return{connect:async()=>{if(!(r||!n?.user?.id||!e)){c(!0);try{const h=d.data??(await d.refetch()).data;if(!h){Dt.error("Could not find this integration in the registry");return}const i=vn(h,e.id,n.user.id,{remoteIndex:0});if(!i.connection_url){Dt.error("This integration has no connection method available");return}const f=i.app_name?await ha(l,i.app_name):null,g=!f,y=f?.id??(await o.create.mutateAsync(i)).id,m=await Nn({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:p=>o.update.mutateAsync({id:y,data:{connection_token:p}}).then(()=>{})});if(m.ran&&!m.ok){if(g)try{await o.delete.mutateAsync(y)}catch{}Dt.error(`Authentication failed: ${m.error??"no token"}`);return}Zs(a,e.id),Dt.success(g?"Connected successfully":"Already connected")}catch(h){Dt.error(`Failed to connect: ${h instanceof Error?h.message:String(h)}`)}finally{c(!1)}}},isConnecting:r}}async function ha(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 Qe(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 c;return e[4]!==a||e[5]!==l||e[6]!==r?(c=s.jsx("img",{src:mn,alt:"Super Agent",width:a,height:a,style:l,className:r}),e[4]=a,e[5]=l,e[6]=r,e[7]=c):c=e[7],c}const ms=()=>0;function ya(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 c=B.useRef(null),d=B.useRef(n),x=B.useRef(e);(!c.current||d.current!==n||x.current!==e)&&(d.current=n,x.current=e,c.current=i=>{if(!n||!e)return()=>{};const f=g=>{let y;try{y=JSON.parse(g.data)}catch{return}y.data&&(g.type===Dn?r.current?.(y.data.id):l.current(y.data)),i()};return Sn.subscribe(e,f)}),B.useSyncExternalStore(c.current,ms,ms)}function ba(){const t=q.c(27),{org:e,locator:n}=He(),o=Lt(),a=Zt();let l;t[0]!==n?(l=vt.taskBoardItems(n),t[0]=n,t[1]=l):l=t[1];const r=l;let c;t[2]!==o?(c=async()=>(await o.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=o,t[3]=c):c=t[3];let d;t[4]!==r||t[5]!==c?(d={queryKey:r,queryFn:c},t[4]=r,t[5]=c,t[6]=d):d=t[6];const x=Nt(d);let h,i;t[7]!==a||t[8]!==r?(h=b=>{a.setQueryData(r,u=>{const v=u??[],j=b;return v.some(D=>D.id===j.id)?v.map(D=>D.id===j.id?j:D):[j,...v]})},i=b=>{a.setQueryData(r,u=>u?.filter(v=>v.id!==b))},t[7]=a,t[8]=r,t[9]=h,t[10]=i):(h=t[9],i=t[10]);let f;t[11]!==e.slug||t[12]!==h||t[13]!==i?(f={orgSlug:e.slug,onUpdate:h,onDelete:i},t[11]=e.slug,t[12]=h,t[13]=i,t[14]=f):f=t[14],ya(f);let g;t[15]!==a||t[16]!==r?(g=b=>{const u=b.subject,v=b.data.status;a.setQueryData(r,j=>j?.map(D=>D.threads.some(N=>N.threadId===u)?{...D,threads:D.threads.map(N=>N.threadId===u?{...N,status:v}:N)}:D))},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],wn(y);let m;t[21]!==x.data?(m=x.data??[],t[21]=x.data,t[22]=m):m=t[22];let p;return t[23]!==x.error||t[24]!==x.isLoading||t[25]!==m?(p={items:m,isLoading:x.isLoading,error:x.error},t[23]=x.error,t[24]=x.isLoading,t[25]=m,t[26]=p):p=t[26],p}function ja(){const t=q.c(36),{locator:e}=He(),n=Lt(),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 c=r;let d;t[5]!==n?(d=k=>n.call("TASK_BOARD_ITEM_CREATE",k),t[5]=n,t[6]=d):d=t[6];let x;t[7]!==c||t[8]!==d?(x={mutationFn:d,onSuccess:c},t[7]=c,t[8]=d,t[9]=x):x=t[9];const h=Tt(x);let i;t[10]!==n?(i=k=>n.call("TASK_BOARD_ITEM_UPDATE",k),t[10]=n,t[11]=i):i=t[11];let f,g;t[12]!==o||t[13]!==l?(f=async k=>{await o.cancelQueries({queryKey:l});const S=o.getQueryData(l);return o.setQueryData(l,w=>w?.map(T=>T.id===k.id?{...T,...k}:T)),{previous:S}},g=(k,S,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]!==c||t[17]!==i||t[18]!==f||t[19]!==g?(y={mutationFn:i,onMutate:f,onError:g,onSettled:c},t[16]=c,t[17]=i,t[18]=f,t[19]=g,t[20]=y):y=t[20];const m=Tt(y);let p;t[21]!==n?(p=k=>n.call("TASK_BOARD_ITEM_DELETE",{id:k}),t[21]=n,t[22]=p):p=t[22];let b;t[23]!==c||t[24]!==p?(b={mutationFn:p,onSuccess:c},t[23]=c,t[24]=p,t[25]=b):b=t[25];const u=Tt(b);let v;t[26]!==n?(v=k=>n.call("TASK_BOARD_ITEM_UPDATE",k),t[26]=n,t[27]=v):v=t[27];let j;t[28]!==c||t[29]!==v?(j={mutationFn:v,onSuccess:c},t[28]=c,t[29]=v,t[30]=j):j=t[30];const D=Tt(j);let N;return t[31]!==h||t[32]!==D||t[33]!==u||t[34]!==m?(N={create:h,update:m,remove:u,link:D},t[31]=h,t[32]=D,t[33]=u,t[34]=m,t[35]=N):N=t[35],N}function Xt(t){return t.threads.some(e=>e.status==="requires_action")}function ka(t){return t.threads[0]}const Rs=["triage","todo","in_progress","in_review","done"],ze={triage:{labelKey:"taskBoard.config.statusBacklog",icon:Bs,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:Cn,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:ks,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:In,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:ls,iconClassName:"text-success"}},Ps=["none","low","medium","high","urgent"],Fe={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 Na(t){const e=q.c(10),{locator:n}=He(),o=Lt();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 c;return e[6]!==a||e[7]!==l||e[8]!==r?(c={queryKey:a,enabled:l,queryFn:r},e[6]=a,e[7]=l,e[8]=r,e[9]=c):c=e[9],Nt(c)}function Ls(t){const e=q.c(27),{members:n,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Es,{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(As,{children:"No members found."}),e[1]=l):l=e[1];let r;e[2]!==o?(r=()=>o(Le),e[2]=o,e[3]=r):r=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qe,{size:16}),d=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let x;e[6]!==r?(x=s.jsxs(Ye,{value:"Super Agent",onSelect:r,className:"gap-2",children:[c,d]}),e[6]=r,e[7]=x):x=e[7];let h;e[8]!==o?(h=()=>o(null),e[8]=o,e[9]=h):h=e[9];let i,f;e[10]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),f=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[10]=i,e[11]=f):(i=e[10],f=e[11]);let g;e[12]!==h?(g=s.jsxs(Ye,{value:"Unassigned",onSelect:h,className:"gap-2",children:[i,f]}),e[12]=h,e[13]=g):g=e[13];let y;e[14]!==g||e[15]!==x?(y=s.jsxs(Rt,{children:[x,g]}),e[14]=g,e[15]=x,e[16]=y):y=e[16];let m;if(e[17]!==n||e[18]!==o){let u;e[20]!==o?(u=v=>s.jsxs(Ye,{value:v.user?.name??v.userId,onSelect:()=>o(v.userId),className:"gap-2",children:[s.jsx(Pe,{url:v.user?.image??void 0,fallback:Re(v.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:v.user?.name??v.userId})]},v.userId),e[20]=o,e[21]=u):u=e[21],m=n.map(u),e[17]=n,e[18]=o,e[19]=m}else m=e[19];let p;e[22]!==m?(p=s.jsx(Rt,{heading:"Members",children:m}),e[22]=m,e[23]=p):p=e[23];let b;return e[24]!==y||e[25]!==p?(b=s.jsxs($s,{children:[a,s.jsxs(Os,{children:[l,y,p]})]}),e[24]=y,e[25]=p,e[26]=b):b=e[26],b}function va(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function gs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Sa=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 Da(t){const e=q.c(201),{open:n,onClose:o,item:a,defaultStatus:l,onSubmit:r,onDelete:c,onOpenThread:d,onNewChat:x,isSaving:h}=t,i=te(),{data:f}=Is(),g=f?.data?.members??[],{handleCopy:y,copied:m}=zn(),[p,b]=B.useState(a?.title??""),[u,v]=B.useState(a?.description??""),[j,D]=B.useState(a?.status??l??"triage"),[N,k]=B.useState(a?.priority??"medium"),[S,w]=B.useState(a?.assigneeId??null),T=a?.dueDate;let I;e[0]!==T?(I=gs(T),e[0]=T,e[1]=I):I=e[1];const[C,O]=B.useState(I),[U,K]=B.useState(!1),[_,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??""),v(a?.description??""),D(a?.status??l??"triage"),k(a?.priority??"medium"),w(a?.assigneeId??null),O(gs(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]!==S||e[16]!==u||e[17]!==C||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:S,dueDate:C?va(C):null})},e[15]=S,e[16]=u,e[17]=C,e[18]=r,e[19]=N,e[20]=j,e[21]=p,e[22]=H):H=e[22];const X=H,J=S===Le;let W;e[23]!==S?(W=$=>$.userId===S,e[23]=S,e[24]=W):W=e[24];const P=g.find(W),F=a?.assignedBy?g.find($=>$.userId===a.assignedBy):void 0,Z=ze[j].icon,ee=ns;let z;e[25]!==R?(z=$=>!$&&R(),e[25]=R,e[26]=z):z=e[26];const L=ss,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]",Ne="hidden";let ne;e[27]!==a||e[28]!==i?(ne=i(a?"taskBoard.taskDialog.editTaskTitle":"taskBoard.taskDialog.newTaskTitle"),e[27]=a,e[28]=i,e[29]=ne):ne=e[29];let ae;e[30]!==ne?(ae=s.jsx(as,{className:"sr-only",children:ne}),e[30]=ne,e[31]=ae):ae=e[31];let le;e[32]!==i?(le=i("taskBoard.taskDialog.closeAriaLabel"),e[32]=i,e[33]=le):le=e[33];let ie;e[34]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(fs,{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 Me="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let ve;e[38]===Symbol.for("react.memo_cache_sentinel")?(ve=$=>{b($.target.value),$.target.style.height="auto",$.target.style.height=`${$.target.scrollHeight}px`},e[38]=ve):ve=e[38];let de;e[39]!==i?(de=i("taskBoard.taskDialog.taskTitlePlaceholder"),e[39]=i,e[40]=de):de=e[40];let ue;e[41]!==de||e[42]!==p?(ue=s.jsx("textarea",{ref:_a,value:p,onChange:ve,onKeyDown:wa,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 $e;e[44]===Symbol.for("react.memo_cache_sentinel")?($e=$=>v($.target.value),e[44]=$e):$e=e[44];let M;e[45]!==i?(M=i("taskBoard.taskDialog.descriptionPlaceholder"),e[45]=i,e[46]=M):M=e[46];let re;e[47]!==u||e[48]!==M?(re=s.jsx("textarea",{value:u,onChange:$e,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]!==m||e[51]!==u||e[52]!==y||e[53]!==i?(oe=u&&s.jsx(ke,{type:"button",variant:"ghost",size:"icon","aria-label":i("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:m?s.jsx(Fn,{size:14}):s.jsx(Pn,{size:14})}),e[50]=m,e[51]=u,e[52]=y,e[53]=i,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];let fe;e[58]!==u||e[59]!==a||e[60]!==d?(fe=a?.id&&s.jsx(Ea,{item:a,description:u,onOpenThread:d}),e[58]=u,e[59]=a,e[60]=d,e[61]=fe):fe=e[61];const Ve=a&&a.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-3",children:a.threads.map($=>s.jsx(Ia,{thread:$,startedBy:F??P,onOpen:d},$.threadId))});let Se;e[62]!==ue||e[63]!==Ce||e[64]!==fe||e[65]!==Ve?(Se=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,fe,Ve]}),e[62]=ue,e[63]=Ce,e[64]=fe,e[65]=Ve,e[66]=Se):Se=e[66];const cs="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 Oe;e[67]!==i?(Oe=i("taskBoard.taskDialog.propertiesLabel"),e[67]=i,e[68]=Oe):Oe=e[68];let De;e[69]!==Oe?(De=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:Oe}),e[69]=Oe,e[70]=De):De=e[70];const qe="flex flex-wrap gap-2 sm:flex-col",Ie=ze[j];let me;e[71]!==Z||e[72]!==Ie.iconClassName?(me=s.jsx(Z,{size:16,className:Ie.iconClassName}),e[71]=Z,e[72]=Ie.iconClassName,e[73]=me):me=e[73];const Be=ze[j];let Te;e[74]!==i||e[75]!==Be.labelKey?(Te=i(Be.labelKey),e[74]=i,e[75]=Be.labelKey,e[76]=Te):Te=e[76];let we;e[77]!==me||e[78]!==Te?(we=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:wt,children:[me,Te]})}),e[77]=me,e[78]=Te,e[79]=we):we=e[79];let ge;e[80]!==i?(ge=Rs.map($=>{const Hs=ze[$].icon;return s.jsxs(St,{onSelect:()=>D($),className:"gap-2",children:[s.jsx(Hs,{size:16,className:ze[$].iconClassName}),i(ze[$].labelKey)]},$)}),e[80]=i,e[81]=ge):ge=e[81];let xe;e[82]!==ge?(xe=s.jsx(zt,{align:"start",className:"w-44",children:ge}),e[82]=ge,e[83]=xe):xe=e[83];let Ee;e[84]!==we||e[85]!==xe?(Ee=s.jsxs(Ft,{children:[we,xe]}),e[84]=we,e[85]=xe,e[86]=Ee):Ee=e[86];const Ke=N==="none"&&"text-muted-foreground";let pe;e[87]!==Ke?(pe=V(wt,Ke),e[87]=Ke,e[88]=pe):pe=e[88];let he;e[89]!==N||e[90]!==i?(he=N==="none"?s.jsxs(s.Fragment,{children:[s.jsx(nn,{size:16}),i("taskBoard.taskDialog.setPriorityButton")]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:V("size-2 rounded-full",Fe[N].dotClassName)}),i(Fe[N].labelKey)]}),e[89]=N,e[90]=i,e[91]=he):he=e[91];let ye;e[92]!==pe||e[93]!==he?(ye=s.jsx(Ot,{asChild:!0,children:s.jsx("button",{type:"button",className:pe,children:he})}),e[92]=pe,e[93]=he,e[94]=ye):ye=e[94];let _e;e[95]!==i?(_e=Ps.map($=>s.jsxs(St,{onSelect:()=>k($),children:[s.jsx("span",{className:V("size-2 rounded-full",Fe[$].dotClassName)}),i(Fe[$].labelKey)]},$)),e[95]=i,e[96]=_e):_e=e[96];let be;e[97]!==_e?(be=s.jsx(zt,{align:"start",className:"w-40",children:_e}),e[97]=_e,e[98]=be):be=e[98];let je;e[99]!==ye||e[100]!==be?(je=s.jsxs(Ft,{children:[ye,be]}),e[99]=ye,e[100]=be,e[101]=je):je=e[101];const Ue="flex flex-col",Ae=At,Q=!0,Ge=Et,Vs=!0,Ys="button",qt=!S&&"text-muted-foreground";let We;e[102]!==qt?(We=V(wt,qt),e[102]=qt,e[103]=We):We=e[103];const Kt=J&&F?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(Pe,{url:F.user?.image??void 0,fallback:Re(F.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:F.user?.name??i("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(Pe,{url:F.user?.image??void 0,fallback:Re(F.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Qe,{size:16,className:"ring-2 ring-background"})]}),i("taskBoard.taskDialog.superAgentLabel")]})]}):J?s.jsxs(s.Fragment,{children:[s.jsx(Qe,{size:16}),i("taskBoard.taskDialog.superAgentLabel")]}):P?s.jsxs(s.Fragment,{children:[s.jsx(Pe,{url:P.user?.image??void 0,fallback:Re(P.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:P.user?.name??i("taskBoard.taskDialog.unassignedLabel")})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ns,{size:16,className:"text-muted-foreground"}),i("taskBoard.taskDialog.assignButton")]});let Xe;e[104]!==We||e[105]!==Kt?(Xe=s.jsx("button",{type:Ys,className:We,children:Kt}),e[104]=We,e[105]=Kt,e[106]=Xe):Xe=e[106];let Je;e[107]!==Ge||e[108]!==Xe?(Je=s.jsx(Ge,{asChild:Vs,children:Xe}),e[107]=Ge,e[108]=Xe,e[109]=Je):Je=e[109];let Ze;e[110]!==w||e[111]!==E?(Ze=$=>{w($),E(!1)},e[110]=w,e[111]=E,e[112]=Ze):Ze=e[112];let et;e[113]!==g||e[114]!==Ze?(et=s.jsx($t,{align:"start",className:"w-56 p-0",children:s.jsx(Ls,{members:g,onSelect:Ze})}),e[113]=g,e[114]=Ze,e[115]=et):et=e[115];let tt;e[116]!==Ae||e[117]!==_||e[118]!==E||e[119]!==Je||e[120]!==et?(tt=s.jsxs(Ae,{open:_,onOpenChange:E,modal:Q,children:[Je,et]}),e[116]=Ae,e[117]=_,e[118]=E,e[119]=Je,e[120]=et,e[121]=tt):tt=e[121];let st;e[122]!==F||e[123]!==J||e[124]!==i?(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(Qe,{size:16}),i("taskBoard.taskDialog.superAgentLabel")]})]}),e[122]=F,e[123]=J,e[124]=i,e[125]=st):st=e[125];let nt;e[126]!==tt||e[127]!==st?(nt=s.jsxs("div",{className:Ue,children:[tt,st]}),e[126]=tt,e[127]=st,e[128]=nt):nt=e[128];const Ut=!C&&"text-muted-foreground";let at;e[129]!==Ut?(at=V(wt,Ut),e[129]=Ut,e[130]=at):at=e[130];let Ct;e[131]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(_t,{size:16,className:"text-muted-foreground"}),e[131]=Ct):Ct=e[131];let lt;e[132]!==C||e[133]!==i?(lt=C?Sa.format(C):i("taskBoard.taskDialog.dueDateLabel"),e[132]=C,e[133]=i,e[134]=lt):lt=e[134];let rt;e[135]!==C||e[136]!==O||e[137]!==i?(rt=C&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":i("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(fs,{size:12})}),e[135]=C,e[136]=O,e[137]=i,e[138]=rt):rt=e[138];let ot;e[139]!==at||e[140]!==lt||e[141]!==rt?(ot=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:at,children:[Ct,lt,rt]})}),e[139]=at,e[140]=lt,e[141]=rt,e[142]=ot):ot=e[142];const Gt=C??void 0;let it;e[143]!==O||e[144]!==K?(it=$=>{O($??null),$&&K(!1)},e[143]=O,e[144]=K,e[145]=it):it=e[145];let ct;e[146]!==Gt||e[147]!==it?(ct=s.jsx($t,{className:"w-auto p-0",align:"start",children:s.jsx($n,{mode:"single",selected:Gt,onSelect:it,initialFocus:!0})}),e[146]=Gt,e[147]=it,e[148]=ct):ct=e[148];let dt;e[149]!==U||e[150]!==K||e[151]!==ot||e[152]!==ct?(dt=s.jsxs(At,{open:U,onOpenChange:K,children:[ot,ct]}),e[149]=U,e[150]=K,e[151]=ot,e[152]=ct,e[153]=dt):dt=e[153];let ut;e[154]!==Ee||e[155]!==je||e[156]!==nt||e[157]!==dt?(ut=s.jsxs("div",{className:qe,children:[Ee,je,nt,dt]}),e[154]=Ee,e[155]=je,e[156]=nt,e[157]=dt,e[158]=ut):ut=e[158];let ft;e[159]!==De||e[160]!==ut?(ft=s.jsxs("div",{className:cs,children:[De,ut]}),e[159]=De,e[160]=ut,e[161]=ft):ft=e[161];let mt;e[162]!==Se||e[163]!==ft?(mt=s.jsxs("div",{className:Me,children:[Se,ft]}),e[162]=Se,e[163]=ft,e[164]=mt):mt=e[164];let gt;e[165]!==a||e[166]!==c||e[167]!==i?(gt=a&&c?s.jsx(ke,{variant:"ghost",size:"icon","aria-label":i("taskBoard.taskDialog.deleteTaskAriaLabel"),className:"size-10 text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(an,{size:16})}):s.jsx("span",{}),e[165]=a,e[166]=c,e[167]=i,e[168]=gt):gt=e[168];let xt;e[169]!==a||e[170]!==x||e[171]!==i?(xt=a&&x&&s.jsxs(ke,{variant:"outline",size:"sm",onClick:x,children:[s.jsx(vs,{size:16}),i("taskBoard.taskDialog.newChatButton")]}),e[169]=a,e[170]=x,e[171]=i,e[172]=xt):xt=e[172];let pt;e[173]!==h||e[174]!==p?(pt=!p.trim()||h,e[173]=h,e[174]=p,e[175]=pt):pt=e[175];let It;e[176]===Symbol.for("react.memo_cache_sentinel")?(It=s.jsx(ts,{size:16}),e[176]=It):It=e[176];let ht;e[177]!==a||e[178]!==i?(ht=i(a?"taskBoard.taskDialog.saveButton":"taskBoard.taskDialog.createTaskButton"),e[177]=a,e[178]=i,e[179]=ht):ht=e[179];let yt;e[180]!==X||e[181]!==pt||e[182]!==ht?(yt=s.jsxs(ke,{size:"sm",disabled:pt,onClick:X,children:[It,ht]}),e[180]=X,e[181]=pt,e[182]=ht,e[183]=yt):yt=e[183];let bt;e[184]!==xt||e[185]!==yt?(bt=s.jsxs("div",{className:"flex items-center gap-2",children:[xt,yt]}),e[184]=xt,e[185]=yt,e[186]=bt):bt=e[186];let jt;e[187]!==gt||e[188]!==bt?(jt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[gt,bt]}),e[187]=gt,e[188]=bt,e[189]=jt):jt=e[189];let kt;e[190]!==L||e[191]!==ae||e[192]!==ce||e[193]!==mt||e[194]!==jt?(kt=s.jsxs(L,{className:se,closeButtonClassName:Ne,children:[ae,ce,mt,jt]}),e[190]=L,e[191]=ae,e[192]=ce,e[193]=mt,e[194]=jt,e[195]=kt):kt=e[195];let Bt;return e[196]!==ee||e[197]!==n||e[198]!==z||e[199]!==kt?(Bt=s.jsx(ee,{open:n,onOpenChange:z,children:kt}),e[196]=ee,e[197]=n,e[198]=z,e[199]=kt,e[200]=Bt):Bt=e[200],Bt}function wa(t){t.key==="Enter"&&t.preventDefault()}function _a(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Ca(t,e){switch(t){case"failed":return{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:rn};case"requires_action":return{label:e("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:Ss};case"in_progress":return{label:e("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:ks,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:ls};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:Bs};default:return t}}function Ia(t){const e=q.c(24),{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 c=n.status?Ca(n.status,l):null,d=n.lastMessage;let x;e[5]!==a||e[6]!==n?(x=()=>a?.(n),e[5]=a,e[6]=n,e[7]=x):x=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Qe,{size:16,className:"shrink-0"}),e[8]=h):h=e[8];let i;e[9]!==l||e[10]!==n.title?(i=n.title||l("taskBoard.taskDialog.superAgentDefaultName"),e[9]=l,e[10]=n.title,e[11]=i):i=e[11];let f;e[12]!==i?(f=s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:i}),e[12]=i,e[13]=f):f=e[13];let g;e[14]!==o||e[15]!==l?(g=o&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"shrink-0 text-sm text-muted-foreground/50",children:l("taskBoard.taskDialog.startedByLabel")}),s.jsx(Pe,{url:o.user?.image??void 0,fallback:Re(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[14]=o,e[15]=l,e[16]=g):g=e[16];let y;e[17]!==a||e[18]!==l?(y=a&&s.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-1 text-xs text-muted-foreground/60 group-hover:text-foreground",children:[l("taskBoard.taskDialog.openThreadHint"),s.jsx(Rn,{size:14})]}),e[17]=a,e[18]=l,e[19]=y):y=e[19];let m;e[20]!==f||e[21]!==g||e[22]!==y?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[h,f,g,y]}),e[20]=f,e[21]=g,e[22]=y,e[23]=m):m=e[23],r=s.jsxs("button",{type:"button",disabled:!a,onClick:x,className:"group flex w-full flex-col gap-2 rounded-xl bg-card p-4 text-left card-shadow transition-colors enabled:hover:bg-muted/60 disabled:cursor-default",children:[m,c&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:V("flex shrink-0 items-center gap-1.5",c.className),children:[s.jsx(c.icon,{size:15,className:V(c.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:c.label})]}),d&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:d})]})]}),e[0]=a,e[1]=o,e[2]=l,e[3]=n,e[4]=r}else r=e[4];return r}function Ba(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:ln}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:Qt}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:Qt}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:Qt}}function Ta(t){if(!t)return[];const e=[],n=new Set;for(const o of t.matchAll(/https?:\/\/[^\s)]+/g)){const a=o[0];n.has(a)||(n.add(a),e.push({url:a,label:a}))}return e}function Ea(t){const e=q.c(18),{item:n,description:o,onOpenThread:a}=t,l=te(),{data:r}=Na(n.id);let c,d;if(e[0]!==o||e[1]!==n.threads||e[2]!==a||e[3]!==r||e[4]!==l){d=Symbol.for("react.early_return_sentinel");e:{const x=Ta(o);if((!r||r.length===0)&&x.length===0){d=null;break e}let h,i,f;if(e[7]!==n.threads||e[8]!==a||e[9]!==r||e[10]!==l){const g=a?n.threads.find($a):void 0;h="flex flex-col gap-1 pb-2";let y;e[14]!==l?(y=l("taskBoard.taskDialog.linksLabel"),e[14]=l,e[15]=y):y=e[15],e[16]!==y?(i=s.jsx("span",{className:"mb-1 text-xs font-medium text-muted-foreground",children:y}),e[16]=y,e[17]=i):i=e[17],f=(r??[]).map(m=>{const p=Ba(m,l);return s.jsxs("div",{className:"flex items-center gap-3 rounded-xl bg-card p-3 card-shadow",children:[s.jsxs("a",{href:m.url,target:"_blank",rel:"noreferrer",className:"group flex min-w-0 flex-1 items-center gap-3",children:[s.jsx(Cs,{className:"size-4 shrink-0 text-foreground"}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:m.title??`${m.repoOwner}/${m.repoName}`}),s.jsxs("span",{className:V("flex shrink-0 items-center gap-1 text-xs font-medium",p.className),children:[s.jsx(p.icon,{size:13}),p.label]}),s.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:["#",m.number]}),s.jsx(Ts,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]}),g&&s.jsxs(ke,{type:"button",variant:"outline",size:"sm",className:"h-7 shrink-0 gap-1.5 px-2",title:l("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>a?.(g),children:[s.jsx(vs,{size:13}),l("taskBoard.taskDialog.openPreviewButton")]})]},m.url)}),e[7]=n.threads,e[8]=a,e[9]=r,e[10]=l,e[11]=h,e[12]=i,e[13]=f}else h=e[11],i=e[12],f=e[13];c=s.jsxs("div",{className:h,children:[i,f,x.map(Aa)]})}e[0]=o,e[1]=n.threads,e[2]=a,e[3]=r,e[4]=l,e[5]=c,e[6]=d}else c=e[5],d=e[6];return d!==Symbol.for("react.early_return_sentinel")?d:c}function Aa(t){return s.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-2 rounded-md px-1 py-1.5 transition-colors hover:bg-muted",children:[s.jsx(Ln,{size:15,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:t.label}),s.jsx(Ts,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function $a(t){return t.hasPreview&&t.virtualMcpId}function Oa(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__",Pt={assignee:null,priority:null,due:null};function za(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Fa(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Ra=864e5;function Pa(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 La(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"&&!Pa(n,o)||e.due==="week"&&(n<o||n>o+7*Ra))return!1}return!0}const xs={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function Mt(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 Ma(t){const e=q.c(95),{value:n,members:o,onChange:a,block:l}=t,r=te(),[c,d]=B.useState(!1);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ht,{size:14,className:"shrink-0"}),e[0]=x):x=e[0];let h=x,i;e[1]!==r?(i=r("taskBoard.taskFilters.assigneeLabel"),e[1]=r,e[2]=i):i=e[2];let f=i;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===Le){let z;e[5]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Qe,{size:14}),e[5]=z):z=e[5],h=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,Ne;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=Pe,se=L?.user?.image??void 0,Ne=Re(L?.user?.name),e[8]=o,e[9]=n,e[10]=z,e[11]=L,e[12]=se,e[13]=Ne}else z=e[10],L=e[11],se=e[12],Ne=e[13];let ne;e[16]!==z||e[17]!==se||e[18]!==Ne?(ne=s.jsx(z,{url:se,fallback:Ne,shape:"circle",size:"2xs"}),e[16]=z,e[17]=se,e[18]=Ne,e[19]=ne):ne=e[19],h=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,m=n!==null;let p;e[25]!==l||e[26]!==m?(p=Mt(m,l),e[25]=l,e[26]=m,e[27]=p):p=e[27];const b=p,u=l&&"ml-auto";let v;e[28]!==u?(v=V("shrink-0 opacity-60",u),e[28]=u,e[29]=v):v=e[29];const j=v;let D;e[30]!==f?(D=s.jsx("span",{className:"max-w-[10rem] truncate",children:f}),e[30]=f,e[31]=D):D=e[31];let N;e[32]!==j?(N=s.jsx(rs,{size:12,className:j}),e[32]=j,e[33]=N):N=e[33];let k;e[34]!==h||e[35]!==D||e[36]!==N||e[37]!==b?(k=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:b,children:[h,D,N]})}),e[34]=h,e[35]=D,e[36]=N,e[37]=b,e[38]=k):k=e[38];let S;e[39]!==r?(S=r("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=r,e[40]=S):S=e[40];let w;e[41]!==S?(w=s.jsx(Es,{placeholder:S,className:"h-9"}),e[41]=S,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(As,{children:T}),e[45]=T,e[46]=I):I=e[46];let C;e[47]!==y?(C=()=>y(null),e[47]=y,e[48]=C):C=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]!==C||e[52]!==O?(U=s.jsx(Ye,{value:"Anyone",onSelect:C,children:O}),e[51]=C,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 _;e[56]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),e[56]=_):_=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:[_,E]}),e[59]=K,e[60]=E,e[61]=A):A=e[61];let G;e[62]!==y?(G=()=>y(Le),e[62]=y,e[63]=G):G=e[63];let Y;e[64]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Qe,{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(Rt,{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(Pe,{url:L.user?.image??void 0,fallback:Re(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(Rt,{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(Os,{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($t,{align:"start",className:"w-56 p-0",children:s.jsxs($s,{children:[w,F]})}),e[88]=w,e[89]=F,e[90]=Z):Z=e[90];let ee;return e[91]!==c||e[92]!==k||e[93]!==Z?(ee=s.jsxs(At,{open:c,onOpenChange:d,children:[k,Z]}),e[91]=c,e[92]=k,e[93]=Z,e[94]=ee):ee=e[94],ee}function qa(t){const e=q.c(33),{value:n,onChange:o,block:a}=t,l=te(),r=n!==null;let c;e[0]!==a||e[1]!==r?(c=Mt(r,a),e[0]=a,e[1]=r,e[2]=c):c=e[2];const d=c,x=a&&"ml-auto";let h;e[3]!==x?(h=V("shrink-0 opacity-60",x),e[3]=x,e[4]=h):h=e[4];const i=h;let f;e[5]!==n?(f=n?s.jsx("span",{className:V("size-2 shrink-0 rounded-full",Fe[n].dotClassName)}):s.jsx(Vn,{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?Fe[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=n,e[9]=g):g=e[9];let y;e[10]!==i?(y=s.jsx(rs,{size:12,className:i}),e[10]=i,e[11]=y):y=e[11];let m;e[12]!==f||e[13]!==g||e[14]!==y||e[15]!==d?(m=s.jsx(Ot,{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]=m):m=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 v;e[24]!==o||e[25]!==l?(v=Ps.map(N=>s.jsxs(St,{onSelect:()=>o(N),className:"gap-2",children:[s.jsx("span",{className:V("size-2 rounded-full",Fe[N].dotClassName)}),l(Fe[N].labelKey)]},N)),e[24]=o,e[25]=l,e[26]=v):v=e[26];let j;e[27]!==u||e[28]!==v?(j=s.jsxs(zt,{align:"start",className:"w-40",children:[u,v]}),e[27]=u,e[28]=v,e[29]=j):j=e[29];let D;return e[30]!==j||e[31]!==m?(D=s.jsxs(Ft,{children:[m,j]}),e[30]=j,e[31]=m,e[32]=D):D=e[32],D}function Ka(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(xs[n]):void 0,e[0]=l,e[1]=n,e[2]=r):r=e[2];const c=r,d=n!==null;let x;e[3]!==a||e[4]!==d?(x=Mt(d,a),e[3]=a,e[4]=d,e[5]=x):x=e[5];const h=x,i=a&&"ml-auto";let f;e[6]!==i?(f=V("shrink-0 opacity-60",i),e[6]=i,e[7]=f):f=e[7];const g=f;let y;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(_t,{size:14,className:"shrink-0"}),e[8]=y):y=e[8];let m;e[9]!==c||e[10]!==l?(m=c??l("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=l,e[11]=m):m=e[11];let p;e[12]!==g?(p=s.jsx(rs,{size:12,className:g}),e[12]=g,e[13]=p):p=e[13];let b;e[14]!==m||e[15]!==p||e[16]!==h?(b=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[y,m,p]})}),e[14]=m,e[15]=p,e[16]=h,e[17]=b):b=e[17];let u;e[18]!==o?(u=()=>o(null),e[18]=o,e[19]=u):u=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(_t,{size:16,className:"text-muted-foreground"}),e[20]=v):v=e[20];let j;e[21]!==l?(j=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=j):j=e[22];let D;e[23]!==u||e[24]!==j?(D=s.jsxs(St,{onSelect:u,className:"gap-2",children:[v,j]}),e[23]=u,e[24]=j,e[25]=D):D=e[25];let N;e[26]!==o||e[27]!==l?(N=Object.entries(xs).map(w=>{const[T,I]=w,C=T==="overdue";return s.jsxs(St,{onSelect:()=>o(T),className:V("gap-2",C&&"text-destructive"),children:[s.jsx(_t,{size:16,className:V("shrink-0",C?"text-destructive":"text-muted-foreground")}),l(I)]},T)}),e[26]=o,e[27]=l,e[28]=N):N=e[28];let k;e[29]!==D||e[30]!==N?(k=s.jsxs(zt,{align:"start",className:"w-44",children:[D,N]}),e[29]=D,e[30]=N,e[31]=k):k=e[31];let S;return e[32]!==k||e[33]!==b?(S=s.jsxs(Ft,{children:[b,k]}),e[32]=k,e[33]=b,e[34]=S):S=e[34],S}function Ms(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 c;e[3]!==l||e[4]!==n.assignee||e[5]!==o||e[6]!==r?(c=s.jsx(Ma,{block:l,value:n.assignee,members:o,onChange:r}),e[3]=l,e[4]=n.assignee,e[5]=o,e[6]=r,e[7]=c):c=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 x;e[11]!==l||e[12]!==n.priority||e[13]!==d?(x=s.jsx(qa,{block:l,value:n.priority,onChange:d}),e[11]=l,e[12]=n.priority,e[13]=d,e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==a?(h=g=>a({...n,due:g}),e[15]=n,e[16]=a,e[17]=h):h=e[17];let i;e[18]!==l||e[19]!==n.due||e[20]!==h?(i=s.jsx(Ka,{block:l,value:n.due,onChange:h}),e[18]=l,e[19]=n.due,e[20]=h,e[21]=i):i=e[21];let f;return e[22]!==c||e[23]!==x||e[24]!==i?(f=s.jsxs(s.Fragment,{children:[c,x,i]}),e[22]=c,e[23]=x,e[24]=i,e[25]=f):f=e[25],f}function Ua(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(zs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let c;e[1]!==n||e[2]!==o||e[3]!==a?(c=s.jsx(Ms,{filters:n,members:o,onChange:a}),e[1]=n,e[2]=o,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==n||e[6]!==a||e[7]!==l?(d=za(n)&&s.jsx("button",{type:"button",onClick:()=>a(Pt),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 x;return e[9]!==c||e[10]!==d?(x=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,c,d]}),e[9]=c,e[10]=d,e[11]=x):x=e[11],x}function Ga(t){const e=q.c(38),{filters:n,members:o,onChange:a}=t,l=te(),[r,c]=B.useState(!1),d=Fa(n),x=d>0;let h;e[0]!==x?(h=Mt(x),e[0]=x,e[1]=h):h=e[1];const i=h;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(zs,{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 m;e[7]!==g||e[8]!==y||e[9]!==i?(m=s.jsx(Mn,{asChild:!0,children:s.jsxs("button",{type:"button",className:i,children:[f,g,y]})}),e[7]=g,e[8]=y,e[9]=i,e[10]=m):m=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(qn,{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(Ms,{block:!0,filters:n,members:o,onChange:a})}),e[15]=n,e[16]=o,e[17]=a,e[18]=u):u=e[18];let v;e[19]!==d||e[20]!==a||e[21]!==l?(v=d>0&&s.jsx(ke,{variant:"outline",className:"flex-1",onClick:()=>a(Pt),children:l("taskBoard.taskFilters.clearAllButton")}),e[19]=d,e[20]=a,e[21]=l,e[22]=v):v=e[22];let j;e[23]!==l?(j=l("taskBoard.taskFilters.doneButton"),e[23]=l,e[24]=j):j=e[24];let D;e[25]!==j?(D=s.jsx(Kn,{asChild:!0,children:s.jsx(ke,{className:"flex-1",children:j})}),e[25]=j,e[26]=D):D=e[26];let N;e[27]!==v||e[28]!==D?(N=s.jsxs(Un,{className:"flex-row gap-2",children:[v,D]}),e[27]=v,e[28]=D,e[29]=N):N=e[29];let k;e[30]!==N||e[31]!==b||e[32]!==u?(k=s.jsxs(Gn,{className:"p-0",children:[b,u,N]}),e[30]=N,e[31]=b,e[32]=u,e[33]=k):k=e[33];let S;return e[34]!==r||e[35]!==k||e[36]!==m?(S=s.jsxs(Qn,{open:r,onOpenChange:c,direction:"bottom",children:[m,k]}),e[34]=r,e[35]=k,e[36]=m,e[37]=S):S=e[37],S}const ps=380,Qa=90,hs=5,Va="cubic-bezier(0.22, 0.61, 0.36, 1)",Ya=8;function Ha(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,c=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 m=l.get(g);if(!m)continue;const p=m.left-y.left,b=m.top-y.top;(p||b)&&d.push({el:f,dx:p,dy:b,lane:Math.abs(p)>Ya})}if(n.current=r,c||d.length===0)return;for(const f of d){const g=f.lane?` rotate(${f.dx>0?hs:-hs}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 x=0;const h=[],i=requestAnimationFrame(()=>{for(const f of d){const g=f.lane?x++*Qa:0;f.el.style.transition=`transform ${ps}ms ${Va} ${g}ms`,f.el.style.transform="",h.push(window.setTimeout(()=>{f.el.style.transition="",f.el.style.transform="",f.el.style.zIndex=""},ps+g+30))}});return()=>{cancelAnimationFrame(i);for(const f of h)clearTimeout(f)}},[e,t])}const Wa="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover",Xa=["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"],ys={price:"R$ 99",anchor:"R$ 499"};function Ja(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(Ds,{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(Fs,{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 Za({open:t,onOpenChange:e,cdClient:n,onExpired:o}){const[a,l]=B.useState(!1),r=async()=>{if(!n){o();return}l(!0);try{const c=await n.callTool({name:"start_checkout",arguments:{}}),{url:d}=Wt(c);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(ns,{open:t,onOpenChange:e,children:s.jsxs(ss,{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:Wa,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(as,{className:"text-xl font-semibold text-foreground",children:"Desbloqueie seu plano de trabalho"}),s.jsx("ul",{className:"flex flex-col gap-3.5",children:Xa.map(c=>s.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[s.jsx(ls,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),s.jsx("span",{className:"leading-snug text-foreground",children:c})]},c))})]}),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:ys.price}),s.jsx("span",{className:"text-sm text-muted-foreground line-through",children:ys.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(Fs,{size:16})]})]})]})]})]})})}function Vt(t){return`board-paywall-seen:${t}`}function el(){const t=q.c(26),{org:e}=He(),n=js(),{diagnostic:o,cdClient:a,connectionId:l}=ma();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[c,d]=B.useState(r);let x;t[2]!==c.open||t[3]!==c.orgId||t[4]!==e.id?(x=c.orgId===e.id?c.open:!sessionStorage.getItem(Vt(e.id)),t[2]=c.open,t[3]=c.orgId,t[4]=e.id,t[5]=x):x=t[5];const h=x;if(!o?.locked)return null;let i;t[6]!==e.id?(i=j=>d({orgId:e.id,open:j}),t[6]=e.id,t[7]=i):i=t[7];const f=i;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 m;t[11]!==l||t[12]!==n||t[13]!==e?(m=()=>{ds("board_paywall_report_opened",{organization_id:e.id}),n(xa(e,l))},t[11]=l,t[12]=n,t[13]=e,t[14]=m):m=t[14];const p=m;let b;t[15]!==e.id||t[16]!==f?(b=s.jsx(Ja,{onOpen:()=>{ds("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]!==h||t[21]!==p?(u=s.jsx(Za,{open:h,onOpenChange:y,cdClient:a,onExpired:p}),t[18]=a,t[19]=y,t[20]=h,t[21]=p,t[22]=u):u=t[22];let v;return t[23]!==b||t[24]!==u?(v=s.jsxs(s.Fragment,{children:[b,u]}),t[23]=b,t[24]=u,t[25]=v):v=t[25],v}function tl(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(en,{fallback:null,children:s.jsx(el,{})}),t[0]=e):e=t[0],e}sn(()=>import("./index-DX-8pprv.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 sl(){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(Qs,{})})})}),t[0]=e):e=t[0],e}const nl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function al(t){const e=new Date(t),n=e.getTime()<Date.now();return{label:nl.format(e),overdue:n}}const is="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 qs(){const t=q.c(9),e=te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=V(is,"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(Ss,{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 Ks(t){const e=q.c(10),{priority:n}=t,o=te(),a=Fe[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 c;e[4]!==a.labelKey||e[5]!==o?(c=o(a.labelKey),e[4]=a.labelKey,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==c?(d=s.jsxs("span",{className:is,children:[r,c]}),e[7]=r,e[8]=c,e[9]=d):d=e[9],d}function Us(t){const e=q.c(7),{iso:n}=t;let o,a;if(e[0]!==n){const{label:c,overdue:d}=al(n);o=c,a=V(is,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(_t,{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 Gs(t){const e=q.c(24),{item:n,assignee:o,assignedBy:a,members:l,onAssign:r}=t,c=te(),[d,x]=B.useState(!1);if(n.assigneeId===Le){let m;e[0]!==a||e[1]!==c?(m=a?.user?.name?c("taskBoard.taskBoard.assignedToSuperAgentBy",{name:a.user.name}):c("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=a,e[1]=c,e[2]=m):m=e[2];let p;e[3]!==a?(p=a&&s.jsx(Pe,{url:a.user?.image??void 0,fallback:Re(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(Qe,{size:20,className:"ring-2 ring-background"}),e[5]=b):b=e[5];let u;return e[6]!==m||e[7]!==p?(u=s.jsxs("span",{className:"inline-flex items-center",title:m,children:[p,b]}),e[6]=m,e[7]=p,e[8]=u):u=e[8],u}if(o){const m=o.user?.image??void 0,p=o.user?.name;let b;e[9]!==p?(b=Re(p),e[9]=p,e[10]=b):b=e[10];let u;return e[11]!==m||e[12]!==b?(u=s.jsx(Pe,{url:m,fallback:b,shape:"circle",size:"xs"}),e[11]=m,e[12]=b,e[13]=u):u=e[13],u}if(!r||!l?.length)return null;let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=m=>{m.stopPropagation(),x(!0)},e[14]=h):h=e[14];let i;e[15]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Et,{asChild:!0,children:s.jsx("button",{type:"button",title:"Assign",onClick:h,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]=i):i=e[15];let f;e[16]!==r?(f=m=>{r(m),x(!1)},e[16]=r,e[17]=f):f=e[17];let g;e[18]!==l||e[19]!==f?(g=s.jsx($t,{className:"w-56 p-0",align:"end",side:"bottom",onClick:ll,children:s.jsx(Ls,{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(At,{open:d,onOpenChange:x,children:[i,g]}),e[21]=d,e[22]=g,e[23]=y):y=e[23],y}function ll(t){return t.stopPropagation()}function Qs(){const t=q.c(127),e=te(),{items:n,isLoading:o}=ba(),a=ja(),l=Wn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const c=jn(r);let d;t[1]!==c?(d=kn(c),t[1]=c,t[2]=d):d=t[2];const x=d.length>0,[h,i]=B.useState(!1);let f;t[3]!==x?(f=M=>M===Le&&!x?(i(!0),!0):!1,t[3]=x,t[4]=f):f=t[4];const g=f,{data:y}=Is();let m,p;t[5]!==y?.data?.members?(m=y?.data?.members??[],p=new Map(m.map(il)),t[5]=y?.data?.members,t[6]=m,t[7]=p):(m=t[6],p=t[7]);const b=p,[u,v]=B.useState("board"),[j,D]=B.useState(Pt),[N,k]=B.useState(!1),[S,w]=B.useState(null),[T,I]=B.useState(null),{setTaskId:C}=Yn(),{create:O}=Hn(),U=Lt(),{org:K,locator:_}=He(),E=js();let A;t[8]===Symbol.for("react.memo_cache_sentinel")?(A={strict:!1},t[8]=A):A=t[8];const{task:G}=tn(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]!==_||t[19]!==K||t[20]!==C||t[21]!==U?(J=async M=>{const re=crypto.randomUUID(),oe=gn(K.id).id,Ce=await U.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:M.id}).then(ol).catch(rl),fe=Oa(M,Ce),Ve={type:"doc",content:[{type:"paragraph",content:[On({id:M.id,name:M.title,char:"@",kind:"task",metadata:{title:M.title,description:M.description,context:fe}}),{type:"text",text:" "}]}]};ea(sessionStorage,_,re,Ve),k(!1);try{await O({id:re,virtual_mcp_id:oe}),await a.link.mutateAsync({id:M.id,linkThreadId:re})}catch{}C(re,oe)},t[16]=a,t[17]=O,t[18]=_,t[19]=K,t[20]=C,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]!==S||t[29]!==j||t[30]!==o||t[31]!==n||t[32]!==u||t[33]!==b||t[34]!==m||t[35]!==l||t[36]!==e){L=Symbol.for("react.early_return_sentinel");e:{let M;t[44]!==j?(M=Q=>La(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),k(!0)},t[46]=oe):oe=t[46];const Ce=oe;let fe;t[47]===Symbol.for("react.memo_cache_sentinel")?(fe=Q=>{w(null),I(Q),k(!0)},t[47]=fe):fe=t[47];const Ve=fe;let Se;t[48]===Symbol.for("react.memo_cache_sentinel")?(Se=Q=>{w(Q),k(!0)},t[48]=Se):Se=t[48];const Oe=Se;P=S??R,Z=N||!!R;let De;if(t[49]!==X?(De=()=>{k(!1),w(null),I(null),X()},t[49]=X,t[50]=De):De=t[50],F=De,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 qe;t[52]!==e?(qe=e("taskBoard.taskBoard.tasksTitle"),t[52]=e,t[53]=qe):qe=t[53];let Ie;t[54]!==qe?(Ie=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:qe}),t[54]=qe,t[55]=Ie):Ie=t[55];let me;t[56]!==l?(me=l&&s.jsx(tl,{}),t[56]=l,t[57]=me):me=t[57];let Be;t[58]!==j||t[59]!==n.length||t[60]!==m?(Be=n.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(Ga,{filters:j,members:m,onChange:D})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(Ua,{filters:j,members:m,onChange:D})})]}),t[58]=j,t[59]=n.length,t[60]=m,t[61]=Be):Be=t[61];const Te=u==="list";let we;t[62]===Symbol.for("react.memo_cache_sentinel")?(we=()=>v("list"),t[62]=we):we=t[62];let ge;t[63]!==e?(ge=e("common.taskBoard.listView"),t[63]=e,t[64]=ge):ge=t[64];let xe;t[65]!==Te||t[66]!==ge?(xe=s.jsx(bs,{active:Te,onClick:we,icon:cn,label:ge}),t[65]=Te,t[66]=ge,t[67]=xe):xe=t[67];const Ee=u==="board";let Ke;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ke=()=>v("board"),t[68]=Ke):Ke=t[68];let pe;t[69]!==e?(pe=e("common.taskBoard.boardView"),t[69]=e,t[70]=pe):pe=t[70];let he;t[71]!==Ee||t[72]!==pe?(he=s.jsx(bs,{active:Ee,onClick:Ke,icon:on,label:pe}),t[71]=Ee,t[72]=pe,t[73]=he):he=t[73];let ye;t[74]!==xe||t[75]!==he?(ye=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[xe,he]}),t[74]=xe,t[75]=he,t[76]=ye):ye=t[76];let _e;t[77]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(ts,{size:16}),t[77]=_e):_e=t[77];let be;t[78]!==e?(be=e("taskBoard.taskBoard.newTask"),t[78]=e,t[79]=be):be=t[79];let je;t[80]!==be?(je=s.jsxs(ke,{size:"sm",onClick:Ce,children:[_e,be]}),t[80]=be,t[81]=je):je=t[81];let Ue;t[82]!==ye||t[83]!==je?(Ue=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[ye,je]}),t[82]=ye,t[83]=je,t[84]=Ue):Ue=t[84];let Ae;t[85]!==Be||t[86]!==Ue?(Ae=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Be,Ue]}),t[85]=Be,t[86]=Ue,t[87]=Ae):Ae=t[87],t[88]!==Ie||t[89]!==me||t[90]!==Ae?(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:[Ie,me,Ae]}),t[88]=Ie,t[89]=me,t[90]=Ae,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:()=>D(Pt),children:e("taskBoard.taskBoard.clearFilters")})]})}):u==="board"?s.jsx(dl,{items:re,members:m,memberByUserId:b,onOpen:Oe,onCreate:Ve,onMove:(Q,Ge)=>a.update.mutate({id:Q,status:Ge}),onAssign:(Q,Ge)=>{g(Ge)||a.update.mutate({id:Q,assigneeId:Ge??void 0})},onAutoFix:l?Q=>{g(Le)||a.update.mutate({id:Q.id,assigneeId:Le})}: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(ml,{item:Q,assignee:Q.assigneeId?b.get(Q.assigneeId):void 0,assignedBy:Q.assignedBy?b.get(Q.assignedBy):void 0,onOpen:()=>Oe(Q)},Q.id))})})}t[23]=a,t[24]=g,t[25]=X,t[26]=R,t[27]=N,t[28]=S,t[29]=j,t[30]=o,t[31]=n,t[32]=u,t[33]=b,t[34]=m,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 Ne=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 Me;t[102]!==P||t[103]!==W?(Me=P?()=>{W(P)}:void 0,t[102]=P,t[103]=W,t[104]=Me):Me=t[104];let ve;t[105]!==F||t[106]!==C?(ve=M=>{M.virtualMcpId&&(F(),C(M.threadId,M.virtualMcpId,{main:M.hasPreview?"preview":"board"}))},t[105]=F,t[106]=C,t[107]=ve):ve=t[107];let de;t[108]!==F||t[109]!==Z||t[110]!==Ne||t[111]!==ne||t[112]!==ae||t[113]!==le||t[114]!==ie||t[115]!==ce||t[116]!==Me||t[117]!==ve?(de=s.jsx(Da,{open:Z,onClose:F,item:ne,defaultStatus:ae,isSaving:le,onSubmit:ie,onDelete:ce,onNewChat:Me,onOpenThread:ve},Ne),t[108]=F,t[109]=Z,t[110]=Ne,t[111]=ne,t[112]=ae,t[113]=le,t[114]=ie,t[115]=ce,t[116]=Me,t[117]=ve,t[118]=de):de=t[118];let ue;t[119]!==h?(ue=s.jsx(cl,{open:h,onOpenChange:i}),t[119]=h,t[120]=ue):ue=t[120];let $e;return t[121]!==ee||t[122]!==z||t[123]!==de||t[124]!==ue||t[125]!==se?($e=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]=$e):$e=t[126],$e}function rl(){return[]}function ol(t){return t.prs}function il(t){return[t.userId,t]}function cl(t){const e=q.c(30),{open:n,onOpenChange:o}=t,a=te(),{connect:l,isConnecting:r}=pa("deco/mcp-github");let c;e[0]!==a?(c=a("taskBoard.taskBoard.connectGithubTitle"),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==c?(d=s.jsx(as,{children:c}),e[2]=c,e[3]=d):d=e[3];let x;e[4]!==a?(x=a("taskBoard.taskBoard.connectGithubDescription"),e[4]=a,e[5]=x):x=e[5];let h;e[6]!==x?(h=s.jsx(pn,{children:x}),e[6]=x,e[7]=h):h=e[7];let i;e[8]!==d||e[9]!==h?(i=s.jsxs(hn,{children:[d,h]}),e[8]=d,e[9]=h,e[10]=i):i=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(Cs,{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 m;e[18]!==r||e[19]!==f||e[20]!==g||e[21]!==y?(m=s.jsx(yn,{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]=m):m=e[22];let p;e[23]!==i||e[24]!==m?(p=s.jsxs(ss,{className:"sm:max-w-md",children:[i,m]}),e[23]=i,e[24]=m,e[25]=p):p=e[25];let b;return e[26]!==o||e[27]!==n||e[28]!==p?(b=s.jsx(ns,{open:n,onOpenChange:o,children:p}),e[26]=o,e[27]=n,e[28]=p,e[29]=b):b=e[29],b}function bs(t){const e=q.c(14),{active:n,onClick:o,icon:a,label:l}=t,r=te();let c;e[0]!==l||e[1]!==r?(c=r("taskBoard.taskBoard.layoutViewAriaLabel",{label:l}),e[0]=l,e[1]=r,e[2]=c):c=e[2];const d=n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let x;e[3]!==d?(x=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]=x):x=e[4];let h;e[5]!==a?(h=s.jsx(a,{size:14}),e[5]=a,e[6]=h):h=e[6];let i;return e[7]!==n||e[8]!==l||e[9]!==o||e[10]!==c||e[11]!==x||e[12]!==h?(i=s.jsxs("button",{type:"button",onClick:o,"aria-label":c,"aria-pressed":n,className:x,children:[h,l]}),e[7]=n,e[8]=l,e[9]=o,e[10]=c,e[11]=x,e[12]=h,e[13]=i):i=e[13],i}function dl(t){const e=q.c(15),{items:n,members:o,memberByUserId:a,onOpen:l,onCreate:r,onMove:c,onAutoFix:d,onAssign:x}=t,h=te(),[i,f]=B.useState(null),g=B.useRef(null);let y;e[0]!==n?(y=n.map(ul).join(","),e[0]=n,e[1]=y):y=e[1],Ha(g,y);let p;e[2]!==n||e[3]!==a||e[4]!==o||e[5]!==x||e[6]!==d||e[7]!==r||e[8]!==c||e[9]!==l||e[10]!==i||e[11]!==h?(p=Rs.map(u=>{const v=n.filter(N=>N.status===u),j=ze[u],D=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 k=N.dataTransfer.getData("text/plain");k&&c(k,u),f(null)},className:V("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",i===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(D,{size:15,className:V("shrink-0",j.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h(j.labelKey)}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:v.length}),s.jsx("button",{type:"button","aria-label":h("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:h(j.labelKey)}),title:h("taskBoard.taskBoard.newTaskInLaneTitle",{lane:h(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(ts,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:v.map(N=>s.jsx(fl,{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:x?k=>x(N.id,k):void 0},N.id))})]},u)}),e[2]=n,e[3]=a,e[4]=o,e[5]=x,e[6]=d,e[7]=r,e[8]=c,e[9]=l,e[10]=i,e[11]=h,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 ul(t){return`${t.id}:${t.status}`}function fl(t){const e=q.c(36),{item:n,assignee:o,assignedBy:a,members:l,onOpen:r,onAutoFix:c,onAssign:d}=t,x=te(),h=ze[n.status],i=h.icon,f=ka(n)?.lastMessage,g=c&&(n.status==="triage"||n.status==="todo")&&n.assigneeId!==Le,y=n.id;let m;e[0]!==n.id?(m=T=>{T.dataTransfer.setData("text/plain",n.id),T.dataTransfer.effectAllowed="move"},e[0]=n.id,e[1]=m):m=e[1];const p=n.title;let b;e[2]!==h.iconClassName?(b=V("mt-px shrink-0",h.iconClassName),e[2]=h.iconClassName,e[3]=b):b=e[3];let u;e[4]!==i||e[5]!==b?(u=s.jsx(i,{size:16,className:b}),e[4]=i,e[5]=b,e[6]=u):u=e[6];let v;e[7]!==n.title?(v=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]=v):v=e[8];let j;e[9]!==a||e[10]!==o||e[11]!==n||e[12]!==l||e[13]!==d?(j=s.jsx(Gs,{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 D;e[15]!==u||e[16]!==v||e[17]!==j?(D=s.jsxs("div",{className:"flex items-start gap-2",children:[u,v,j]}),e[15]=u,e[16]=v,e[17]=j,e[18]=D):D=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 k;e[21]!==n?(k=(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(qs,{}),n.priority!=="none"&&s.jsx(Ks,{priority:n.priority}),n.dueDate&&s.jsx(Us,{iso:n.dueDate})]}),e[21]=n,e[22]=k):k=e[22];let S;e[23]!==c||e[24]!==g||e[25]!==x?(S=g&&s.jsxs("button",{type:"button",onClick:T=>{T.stopPropagation(),c()},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(Ds,{size:12}),x("taskBoard.taskBoard.autoFix")]}),e[23]=c,e[24]=g,e[25]=x,e[26]=S):S=e[26];let w;return e[27]!==n.id||e[28]!==n.title||e[29]!==r||e[30]!==k||e[31]!==S||e[32]!==m||e[33]!==D||e[34]!==N?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":y,onDragStart:m,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:[D,N,k,S]}),e[27]=n.id,e[28]=n.title,e[29]=r,e[30]=k,e[31]=S,e[32]=m,e[33]=D,e[34]=N,e[35]=w):w=e[35],w}function ml(t){const e=q.c(30),{item:n,assignee:o,assignedBy:a,onOpen:l}=t,r=ze[n.status],c=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 x;e[2]!==c||e[3]!==d?(x=s.jsx(c,{size:16,className:d}),e[2]=c,e[3]=d,e[4]=x):x=e[4];let h;e[5]!==n.title?(h=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]=h):h=e[6];let i;e[7]!==n?(i=Xt(n)&&s.jsx(qs,{}),e[7]=n,e[8]=i):i=e[8];let f;e[9]!==n.priority?(f=n.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ks,{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(Us,{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(Gs,{item:n,assignee:o,assignedBy:a}),e[13]=a,e[14]=o,e[15]=n,e[16]=y):y=e[16];let m;e[17]!==n.createdAt?(m=_n(new Date(n.createdAt)),e[17]=n.createdAt,e[18]=m):m=e[18];let p;e[19]!==m?(p=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:m}),e[19]=m,e[20]=p):p=e[20];let b;return e[21]!==l||e[22]!==x||e[23]!==h||e[24]!==i||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:[x,h,i,f,g,y,p]}),e[21]=l,e[22]=x,e[23]=h,e[24]=i,e[25]=f,e[26]=g,e[27]=y,e[28]=p,e[29]=b):b=e[29],b}const cr=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:Qs,default:sl},Symbol.toStringTag,{value:"Module"}));export{ar as H,Fe as P,oa as S,Da as T,ia as a,ir as b,rr as c,ma as d,da as e,xa as f,pa as g,ba as h,Jn as i,ja as j,ze as k,Qe as l,Qs as m,cr as n,lr as r,or as u,ea as w};
@@ -1,4 +1,4 @@
1
- import{c as Me,r as ie,d as os,F as Tt,b as Ge,j as t,B as xe,t as Qe,m as qe,K as Qt,n as rs,z as Es,u as As,q as Xt,E as Vs}from"./index-BkQeimZz.js";import{S as Us}from"./search-input-CBo5Q2hW.js";import{P as et}from"./index-BXjYLNnL.js";import{E as is}from"./empty-state-BQtWItQu.js";import{R as Ks}from"./require-capability-9Z4LuijU.js";import{r as ms,m as qs,t as Bs,v as us,w as Wt,x as qt,y as ys,z as Hs,B as fs,D as ws,A as Js,E as Qs}from"./automation-runs-CHryRYGN.js";import{u as ts}from"./use-connection-ClzlwYHs.js";import{g as Ss}from"./connection-slug-eyAPH6o3.js";import{B as kt}from"./badge-BhXxSdh-.js";import{P as $t,a as zt,b as Et}from"./popover-DlUyr22d.js";import{c as Bt,T as Ht,a as Jt}from"./tooltip-6YXDmKdK.js";import{i as Yt}from"./Check-BVao786V.js";import{a as Ut}from"./Copy01-Cz2rkjLR.js";import{n as xs}from"./Globe01-CLxc6flB.js";import{i as ns}from"./FilterLines-Cz9hbnJD.js";import{i as Gs}from"./Key01-DTsWUBNB.js";import{i as Xs}from"./Play-BftNxqXw.js";import{aD as Ws,X as Ys,a1 as Zs}from"./agent-icon-DEBdQzV-.js";import{M as ps}from"./monaco-editor-CHc71gyn.js";import{u as el}from"./use-members-BlxvLg7J.js";import{S as tl,u as sl,W as ll}from"./use-mcp-client-Ca9l1Lnr.js";import{a as ol}from"./use-virtual-mcp-knS-Q3oO.js";import{n as At}from"./Tool02-ByyTEcad.js";import{c as rl}from"./SwitchHorizontal01-CFoLDY1q.js";import{s as il}from"./Plus-CP-BI904.js";import{s as nl}from"./Trash01-jY1Npbiv.js";import{I as Dt}from"./input-BiKdrDt4.js";import{M as Rt}from"./multi-select-B15Tx2X-.js";import{a as Pt,b as Ft,d as He,c as _t,S as Ot}from"./select-CS3PZAih.js";import{t as Is}from"./ChevronDown-DPpeNPF5.js";import{s as al}from"./Stars02-DsiBetQn.js";import{C as cl}from"./calendar-Bmjk91KZ.js";import{T as dl}from"./textarea-CbskhFAr.js";import{C as ks}from"./collection-tabs-BCnplQCF.js";import{S as ml}from"./switch-DpdYRWDf.js";import{L as ul}from"./label-DmHlHvvv.js";import{I as Ct}from"./integration-icon-Ca9Ro_Zp.js";import{A as Cs}from"./avatar-SVXA5K0_.js";import{A as fl,a as xl,b as pl}from"./alert-NHdpWhdG.js";import{C as Ts}from"./card-v9JJ51XL.js";import{K as Ye}from"./monitoring-stats-row-DY4TNZ2g.js";import{u as Ms}from"./studio-tools-PCiFWXzm.js";import{u as gl}from"./useSuspenseInfiniteQuery-DQXQ91ga.js";import{o as hl,m as vl,p as jl,q as Nl}from"./sidebar-D8HHeZss.js";import{T as tt,a as Gt,b as Ls,c as Ds,d as Ee,e as Rs}from"./table-eGpXezIB.js";import{n as bl}from"./ChevronUp-DYGKOdBy.js";import{u as yl}from"./use-infinite-scroll-Bqwo9W1I.js";import{c as wl,b as Sl}from"./use-automations-B9P_vduo.js";import"./SearchMd-DCdN8sFZ.js";import"./use-capability-BV4X85Oa.js";import"./access-gate-CHPOB4DQ.js";import"./capability-load-error-Cjc3H0wk.js";import"./useInfiniteQuery--O0UJeP3.js";import"./use-clock-tick-BIiUVnXR.js";import"./AlertCircle-fg3Hgsgz.js";import"./CheckCircle-IniJIcWw.js";import"./DotsVertical-3GQ99jGv.js";import"./XCircle-7b_0pmj2.js";import"./Stars01-5bOGRLFK.js";import"./ArrowRight-CV0xQASq.js";import"./ChevronRight-CrBdlf5g.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DCwa-tM1.js";import"./file-type-icon-Bvmb_MGY.js";import"./dialog-CJJBIADb.js";import"./X-BnBYCjCN.js";import"./ZoomOut-RylsG63M.js";import"./use-mobile-C5W0RGLs.js";import"./tab-id-BijBBRwE.js";import"./hooks-dE0ApXsc.js";import"./decopilot-sse-pool-DQp3v72-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-CmQVFNlq.js";import"./autosend-C2FZ13WA.js";import"./use-ai-providers-C10MkKcn.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CLphMNS8.js";import"./use-organization-settings-BQlvga2w.js";import"./index-CwQyOcmL.js";import"./Eye-DTXEp_Op.js";import"./Star01-TgpbQ1ki.js";import"./XClose-B06L-PJc.js";import"./ZapSquare-DmNcoydg.js";import"./Tool01-Cp_FNZn9.js";import"./Monitor01-XNX3vHJ4.js";import"./Upload01-BJ-q-gLK.js";import"./shell-layout-CXG-tHmv.js";import"./Users03-BowsdXcq.js";import"./SearchLg-Bbkgfm53.js";import"./Zap-Cf3B8XV9.js";import"./required-auth-layout-DjDm-MZU.js";import"./use-org-sso-Bu88hY6l.js";import"./Image01-DRgtbsjP.js";import"./LinkExternal01-DS_UHiRd.js";import"./ArrowUpRight-B75b68J3.js";import"./Palette-B2Z8mdAl.js";import"./use-navigate-to-agent-O_6e-uti.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CGiiBbMe.js";import"./form-B3EdZ9mI.js";import"./ArrowUp-CJNj-lbc.js";import"./Settings02-B2Q1F7yN.js";import"./TrendUp01-BDzOq-pH.js";import"./Globe04-DkANX7p7.js";import"./HardDrive-z8I8Njjc.js";import"./LayoutLeft-DGux0aXO.js";import"./LogOut01-C8eH_07W.js";import"./Sun-DdoghNKG.js";import"./Package-3iqcIf7w.js";import"./Shield01-BZW1dWy4.js";import"./User01-DiO_9L3k.js";import"./Users01-OTsRlXmF.js";import"./index-D_tHc7Jk.js";import"./use-org-auth-client-DG_z1qAa.js";import"./auth-B6AFPxXM.js";import"./checkbox-qmL4ziNo.js";import"./command-BoLqTMqI.js";import"./index-S0bapDuc.js";const ss={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Il=["eq","contains","exists","in"];function kl(s){return Il.includes(s)}function st(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Cl(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...d]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&kl(i)?i:"eq",value:decodeURIComponent(d.join(":")||"")}}).filter(e=>e!==void 0)}function Kt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as Me,r as ie,d as os,F as Tt,b as Ge,j as t,B as xe,t as Qe,m as qe,K as Qt,n as rs,z as Es,u as As,p as Xt,E as Vs}from"./index-QzdsfBYd.js";import{S as Us}from"./search-input-CzVqrwgl.js";import{P as et}from"./index-CPojIfJr.js";import{E as is}from"./empty-state-B7ZzKn6B.js";import{R as Ks}from"./require-capability-Dp0qTVxW.js";import{r as ms,m as qs,t as Bs,v as us,w as Wt,x as qt,y as ys,z as Hs,B as fs,D as ws,A as Js,E as Qs}from"./automation-runs-qvWRqyqv.js";import{u as ts}from"./use-connection-B_ydhIaR.js";import{g as Ss}from"./connection-slug-eyAPH6o3.js";import{B as kt}from"./badge-8mmmFMes.js";import{P as $t,a as zt,b as Et}from"./popover-1ACpRRoe.js";import{c as Bt,T as Ht,a as Jt}from"./tooltip-D0dd9ydB.js";import{i as Yt}from"./Check-K9ygl0O6.js";import{a as Ut}from"./Copy01-B2yggp1R.js";import{n as xs}from"./Globe01-dnwQ58ni.js";import{i as ns}from"./FilterLines-xmnqgD9Q.js";import{i as Gs}from"./Key01-DXv7srOu.js";import{i as Xs}from"./Play-lriwSM0x.js";import{aD as Ws,X as Ys,a1 as Zs}from"./agent-icon-B2LgmiRt.js";import{M as ps}from"./monaco-editor-CTTjzlzK.js";import{u as el}from"./use-members-CTrDSEbl.js";import{S as tl,u as sl,W as ll}from"./use-mcp-client-BpYZJj4o.js";import{a as ol}from"./use-virtual-mcp-vNY0_cuG.js";import{n as At}from"./Tool02-a1QDD1BE.js";import{c as rl}from"./SwitchHorizontal01-YOHN8l_Y.js";import{s as il}from"./Plus-DQlLKoK7.js";import{s as nl}from"./Trash01-CvmXP6ap.js";import{I as Dt}from"./input-P-LUerq4.js";import{M as Rt}from"./multi-select-BaubaUW1.js";import{a as Pt,b as Ft,d as He,c as _t,S as Ot}from"./select-BL9zv-JP.js";import{t as Is}from"./ChevronDown-ivzZdE8w.js";import{s as al}from"./Stars02-Rv7Zpq5p.js";import{C as cl}from"./calendar-BYOoZCNu.js";import{T as dl}from"./textarea-CkyHXuQm.js";import{C as ks}from"./collection-tabs-Cu0giObB.js";import{S as ml}from"./switch-m3W7oBlX.js";import{L as ul}from"./label-DNCggKDl.js";import{I as Ct}from"./integration-icon-DB0SNVRE.js";import{A as Cs}from"./avatar-B1FBqiPq.js";import{A as fl,a as xl,b as pl}from"./alert-2pYy2aRx.js";import{C as Ts}from"./card-CsVINvzI.js";import{K as Ye}from"./monitoring-stats-row-Cz8AzIWJ.js";import{u as Ms}from"./studio-tools-BhhcZfev.js";import{u as gl}from"./useSuspenseInfiniteQuery-TkWZQEXd.js";import{o as hl,m as vl,p as jl,q as Nl}from"./sidebar-BAaF24ye.js";import{T as tt,a as Gt,b as Ls,c as Ds,d as Ee,e as Rs}from"./table-BsyOuaNT.js";import{n as bl}from"./ChevronUp-DtesMDJI.js";import{u as yl}from"./use-infinite-scroll-Dl1pnFE_.js";import{c as wl,b as Sl}from"./use-automations-DbG3Rylz.js";import"./SearchMd-Dg6mSNN_.js";import"./use-capability-BxZIF_3J.js";import"./access-gate-uwgBtsBP.js";import"./capability-load-error-B3Yd05Zp.js";import"./useInfiniteQuery-aIQ9VGjU.js";import"./use-clock-tick-BqpT3lz9.js";import"./AlertCircle-BVcbGU63.js";import"./CheckCircle-Ddtle1Hu.js";import"./DotsVertical-0w0ZkjcP.js";import"./XCircle-BNVPuHya.js";import"./Stars01-DTVv_6xg.js";import"./ArrowRight-CKlvyIoh.js";import"./ChevronRight-wehtSt4J.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DKPJm23R.js";import"./file-type-icon-Cg3Nm1XZ.js";import"./dialog-C7PMQncq.js";import"./X-DjQw217D.js";import"./ZoomOut-CAsxnm2x.js";import"./use-mobile-CRkRo6zy.js";import"./tab-id-BijBBRwE.js";import"./hooks-CxPB8UeZ.js";import"./decopilot-sse-pool-DWTCLkf7.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DG5VMA6B.js";import"./autosend-BeIUwx1c.js";import"./use-ai-providers-iWGeiPtA.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BYrGmZOI.js";import"./use-organization-settings-D2HSrnf_.js";import"./index-DEfykvQ6.js";import"./Eye-CZVpzZj3.js";import"./Star01-DkiTL7fS.js";import"./XClose-BO1Lwhh7.js";import"./ZapSquare-CqrPlIO3.js";import"./Tool01-zKnvH-kk.js";import"./Monitor01-7QFBOkji.js";import"./Upload01-Ur6u-B1R.js";import"./shell-layout-3WAcXYR2.js";import"./Users03-B2Rmdg8K.js";import"./SearchLg-CoOX4SoC.js";import"./Zap-C4HzUZ29.js";import"./required-auth-layout-Bf2ygqfO.js";import"./use-org-sso-C3FJc_XM.js";import"./Image01-CTFJ4q_z.js";import"./LinkExternal01-BktZyAnv.js";import"./ArrowUpRight-BRtGTw6u.js";import"./Palette-DWy3dzj0.js";import"./use-navigate-to-agent-D7z6mwyi.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BOEksfko.js";import"./form-zrd7LYxu.js";import"./ArrowUp-zrMcuXAr.js";import"./Settings02-BrQ1R_C3.js";import"./TrendUp01-DbtFTYSl.js";import"./Globe04-C5N1Fi_a.js";import"./HardDrive-BP9_iF3o.js";import"./LayoutLeft-BPQ9stJD.js";import"./LogOut01-BDBTSoW6.js";import"./Sun-DIwJT6kw.js";import"./Package-D8m71yLY.js";import"./Shield01-BeZ6Sg4x.js";import"./User01-ELT05I_C.js";import"./Users01-DmKZlyCu.js";import"./index-Cb8ogyWE.js";import"./use-org-auth-client-C7NIGHa2.js";import"./auth-BbZNerdw.js";import"./checkbox-CAW6yy-f.js";import"./command-BYmAVtGu.js";import"./index-DSvM3i2U.js";const ss={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Il=["eq","contains","exists","in"];function kl(s){return Il.includes(s)}function st(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Cl(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...d]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&kl(i)?i:"eq",value:decodeURIComponent(d.join(":")||"")}}).filter(e=>e!==void 0)}function Kt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function gs(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Tl(s){const e={},l={},i=[],d={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(d[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(d).length>0?d:void 0}}function hs(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=ss.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,ss.maxJsonRenderSize)+`
4
4
 
@@ -0,0 +1 @@
1
+ import{c as I,b as B,j as s,B as be,d as ae,F as Q,G as fs,r as G,E as Xe,H as ps,x as hs,K as Mt,e as it,p as V,I as $e,m as H,a as Ae,J as xs,v as gs,t as ce,M as bs,P as js,L as vs,n as ys,R as _s,k as Ss,f as Ns,u as It,O as Cs,U as ks}from"./index-QzdsfBYd.js";import{u as _e,S as Qe,a as Je,b as J,c as Y,d as q,e as Tt,f as ws,g as Pt,h as Ms,i as Ge,j as Is,k as Ts,l as Ps}from"./sidebar-BAaF24ye.js";import{u as At}from"./use-mobile-CRkRo6zy.js";import{C as As,p as Re,s as zs,a as $s,n as Os}from"./self-tool-result-BbtpoGjo.js";import{f as Es,b as Ze,e as et,g as Ds,d as zt,h as $t,a as Ot}from"./dialog-C7PMQncq.js";import{f as Rs}from"./tab-id-BijBBRwE.js";import{C as Fs,W as Et,g as Ls,u as Dt,S as Rt,a as rt}from"./use-mcp-client-BpYZJj4o.js";import{i as tt}from"./ArrowRight-CKlvyIoh.js";import{i as Ft}from"./ChevronRight-wehtSt4J.js";import{i as Gs}from"./X-DjQw217D.js";import{S as se}from"./skeleton-onz47XQi.js";import{i as Lt}from"./LayoutLeft-BPQ9stJD.js";import{O as He,A as st,u as Hs,a as Bs,g as Us,b as Ws,c as Ks}from"./use-deco-credits-CaUme1US.js";import{T as ke}from"./toolbar-icon-button-DEXhPEY6.js";import{P as Gt,a as Ht,b as Bt}from"./popover-1ACpRRoe.js";import{D as qs,a as Vs,b as Ys}from"./drawer-D1Kw_X2C.js";import{A as Be}from"./avatar-B1FBqiPq.js";import{T as je,a as ve,b as Ut,c as ye}from"./tooltip-D0dd9ydB.js";import{a as Ue}from"./Copy01-B2yggp1R.js";import{n as Xs,i as Qs}from"./Globe01-dnwQ58ni.js";import{i as Js}from"./ZoomOut-CAsxnm2x.js";import{n as Zs}from"./LinkExternal01-BktZyAnv.js";import{i as at}from"./LogOut01-BDBTSoW6.js";import{i as We}from"./Monitor01-7QFBOkji.js";import{n as en,a as tn}from"./Sun-DIwJT6kw.js";import{a as Oe}from"./Settings02-BrQ1R_C3.js";import{i as sn}from"./Shield01-BeZ6Sg4x.js";import{t as Wt,a as nn,i as on,b as ct,c as ln,d as rn,e as Kt,A as Ce,s as an,f as cn,g as dn,h as mn}from"./agent-icon-B2LgmiRt.js";import{a as un}from"./Users03-B2Rmdg8K.js";import{u as fn}from"./use-deployment-admin-Ur6VnLj1.js";import"./index-BZmVwpHk.js";import{a as qt}from"./XCircle-BNVPuHya.js";import{a as pn}from"./ZapSquare-CqrPlIO3.js";import{I as Vt}from"./invite-member-dialog-CGMe2vvR.js";import{u as dt}from"./use-copy-DKPJm23R.js";import{i as Ke}from"./Check-K9ygl0O6.js";import{m as hn,u as xn,c as gn}from"./use-api-keys-DGNPcQCu.js";import{u as bn,C as jn}from"./chat-context-DG5VMA6B.js";import{v as vn,C as mt}from"./connect-desktop-dialog-CVLI9IFZ.js";import{u as nt}from"./use-organization-settings-D2HSrnf_.js";import{i as yn}from"./FilterLines-xmnqgD9Q.js";import{T as _n,a as Sn}from"./toggle-group-C9YlqJGO.js";import{u as Yt,a as Nn}from"./use-virtual-mcp-vNY0_cuG.js";import{u as Cn,a as Xt,b as kn,T as wn}from"./hooks-CxPB8UeZ.js";import{u as Qt,f as Mn}from"./shell-layout-3WAcXYR2.js";import{C as In,a as Tn,b as Pn,c as An,d as zn}from"./command-BYmAVtGu.js";import{u as Jt}from"./studio-tools-BhhcZfev.js";import{i as Zt}from"./Zap-C4HzUZ29.js";import{S as es,M as $n}from"./shell-controls-XRYGqE-R.js";import{n as On}from"./Stars02-Rv7Zpq5p.js";import{g as En,u as Dn,S as Rn}from"./use-clock-tick-BqpT3lz9.js";import{a as Fn}from"./format-time-BnbuEtat.js";import{t as Ln}from"./ChevronDown-ivzZdE8w.js";import{S as ts}from"./use-navigate-to-agent-D7z6mwyi.js";import{T as xe}from"./toolbar-DYjFUHXX.js";import"./integration-icon-DB0SNVRE.js";import"./Tool02-a1QDD1BE.js";import"./companions-core-C84CnqsZ.js";import"./extract-connection-data-wIgwD813.js";import"./github-repo-scope-DjMZbiKa.js";import"./CheckCircle-Ddtle1Hu.js";import"./form-zrd7LYxu.js";import"./label-DNCggKDl.js";import"./input-P-LUerq4.js";import"./Eye-CZVpzZj3.js";import"./use-debounced-value-Jiqdx_qI.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-CP5a8Gkq.js";import"./authenticate-and-persist-oauth-BUz0jLWA.js";import"./mcp-oauth-aEWbqsXM.js";import"./auth-BbZNerdw.js";import"./Plus-DQlLKoK7.js";import"./SearchMd-Dg6mSNN_.js";import"./XClose-BO1Lwhh7.js";import"./alert-dialog-BsAEBtVk.js";import"./use-registry-app-Cy2XVJ8o.js";import"./use-mcp-tools-l53r1zOu.js";import"./github-repo-picker-CcvybfZV.js";import"./collection-search-HTEknyDM.js";import"./use-connection-B_ydhIaR.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-CChyV7In.js";import"./use-registry-connections-xT5_Tp16.js";import"./useInfiniteQuery-aIQ9VGjU.js";import"./use-infinite-scroll-Dl1pnFE_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-CsVINvzI.js";import"./select-BL9zv-JP.js";import"./ChevronUp-DtesMDJI.js";import"./textarea-CkyHXuQm.js";import"./Star01-DkiTL7fS.js";import"./connection-form-helpers-BsaAWJ8U.js";import"./Trash01-CvmXP6ap.js";import"./collection-tabs-Cu0giObB.js";import"./badge-8mmmFMes.js";import"./useSuspenseInfiniteQuery-TkWZQEXd.js";import"./use-ai-providers-iWGeiPtA.js";import"./User01-ELT05I_C.js";import"./AlertCircle-BVcbGU63.js";import"./Tool01-zKnvH-kk.js";import"./ArrowUp-zrMcuXAr.js";import"./ArrowUpRight-BRtGTw6u.js";import"./TrendUp01-DbtFTYSl.js";import"./DotsVertical-0w0ZkjcP.js";import"./Globe04-C5N1Fi_a.js";import"./SwitchHorizontal01-YOHN8l_Y.js";import"./HardDrive-BP9_iF3o.js";import"./Image01-CTFJ4q_z.js";import"./Key01-DXv7srOu.js";import"./Package-D8m71yLY.js";import"./Palette-DWy3dzj0.js";import"./Play-lriwSM0x.js";import"./SearchLg-CoOX4SoC.js";import"./Stars01-DTVv_6xg.js";import"./Upload01-Ur6u-B1R.js";import"./Users01-DmKZlyCu.js";import"./use-org-auth-client-C7NIGHa2.js";import"./use-organization-roles-Bt8yo51m.js";import"./autosend-BeIUwx1c.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BYrGmZOI.js";import"./decopilot-sse-pool-DWTCLkf7.js";import"./required-auth-layout-Bf2ygqfO.js";import"./use-org-sso-C3FJc_XM.js";import"./index-DSvM3i2U.js";import"./differenceInSeconds-NQ4PDo0z.js";const Gn="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function Hn(){const t=I.c(13),e=B();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e("routes.commerceOnboarding.connectModal.quote"),t[1]=e,t[2]=l):l=t[2];let o;t[3]!==l?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",l,"”"]}),t[3]=l,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("img",{src:Gn,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=i):i=t[5];let r;t[6]!==e?(r=e("routes.commerceOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let a;t[8]!==r?(a=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=a):a=t[9];let d;return t[10]!==o||t[11]!==a?(d=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[n,o,a]}),t[10]=o,t[11]=a,t[12]=d):d=t[12],d}function Bn(t){const e=I.c(22),{siteHost:n,footer:l,onClose:o,children:i}=t,r=B(),a=n?`https://www.google.com/s2/favicons?domain=${n}&sz=128`:null;let d;e[0]!==o||e[1]!==r?(d=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(Gs,{size:18})}),e[0]=o,e[1]=r,e[2]=d):d=e[2];let c,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=c,e[4]=m):(c=e[3],m=e[4]);let u;e[5]!==a||e[6]!==n?(u=n&&s.jsxs(s.Fragment,{children:[s.jsx(Ft,{size:16,className:"shrink-0 text-foreground/25"}),a&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:a,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:n})]}),e[5]=a,e[6]=n,e[7]=u):u=e[7];let p;e[8]!==u?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[c,m,u]}),e[8]=u,e[9]=p):p=e[9];let x;e[10]!==l?(x=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:l}),e[10]=l,e[11]=x):x=e[11];let f;e[12]!==i||e[13]!==p||e[14]!==x?(f=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[p,i,x]}),e[12]=i,e[13]=p,e[14]=x,e[15]=f):f=e[15];let g,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),h=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=g,e[17]=h):(g=e[16],h=e[17]);let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:justify-center lg:p-14",children:[g,h,s.jsx("div",{className:"relative z-10",children:s.jsx(Hn,{})})]}),e[18]=b):b=e[18];let v;return e[19]!==d||e[20]!==f?(v=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[d,f,b]}),e[19]=d,e[20]=f,e[21]=v):v=e[21],v}function Un(t){const e=I.c(5),{ready:n,pending:l,label:o,onClick:i,children:r}=t,a=l||!n,d=n&&!l?r:null;let c;return e[0]!==o||e[1]!==i||e[2]!==a||e[3]!==d?(c=s.jsxs(be,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:a,children:[o,d]}),e[0]=o,e[1]=i,e[2]=a,e[3]=d,e[4]=c):c=e[4],c}function Wn(t){const e=I.c(22),{siteUrl:n}=t,l=ae(),{org:o}=Q(),i=B();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:Ls(o.id),main:Rs(Et.COMMERCE_DISCOVERY(o.id),Fs),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(Es,{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 m;e[7]!==c?(m=s.jsx(Ze,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let u;e[9]!==a||e[10]!==i?(u=()=>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]=u):u=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(As,{}),e[12]=p):p=e[12];let x;e[13]!==a||e[14]!==n?(x=s.jsx(G.Suspense,{fallback:p,children:s.jsx(Yn,{siteUrlFromUrl:n,onComplete:a})}),e[13]=a,e[14]=n,e[15]=x):x=e[15];let f;e[16]!==u||e[17]!==x?(f=s.jsx(Xe,{fallback:u,children:x}),e[16]=u,e[17]=x,e[18]=f):f=e[18];let g;return e[19]!==m||e[20]!==f?(g=s.jsx(et,{open:!0,children:s.jsxs(Ds,{children:[d,s.jsxs(ps,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vn,onPointerDownOutside:qn,onInteractOutside:Kn,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:[m,f]})]})}),e[19]=m,e[20]=f,e[21]=g):g=e[21],g}function Kn(t){return t.preventDefault()}function qn(t){return t.preventDefault()}function Vn(t){return t.preventDefault()}function Yn({siteUrlFromUrl:t,onComplete:e}){const n=B(),{org:l}=Q(),o=Et.COMMERCE_DISCOVERY(l.id),i=Dt({connectionId:Rt,orgId:l.id,orgSlug:l.slug}),a=hs({queryKey:Mt.commerceDiscoveryConnection(l.id,o),queryFn:async()=>{const y=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return Re(y)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,m=zs(c),[u,p]=G.useState(!0),[x,f]=G.useState(null),g=it({mutationFn:async y=>Re(await i.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}})),retry:!1}),h=it({mutationFn:async y=>Re(await i.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:y}})),retry:!1}),b=async()=>{f(null),V("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:l.id});const y=c?Os(c):null;if(y?.ok)try{let j=await h.mutateAsync(y.value);if(j.triggered||(V("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:l.id,reason:j.reason??"not_upgraded"}),await g.mutateAsync(y.value),j=await h.mutateAsync(y.value)),!j.triggered){V("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:l.id,error:j.reason??"not_triggered"}),f(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(j){V("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:l.id,error:j instanceof Error?j.message:String(j)}),f(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},v=u;return s.jsx(Bn,{siteHost:m,footer:s.jsxs(s.Fragment,{children:[x?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:x}):null,s.jsx(Un,{ready:v,pending:h.isPending,label:h.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n(v?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),onClick:()=>{b()},children:s.jsx(tt,{size:18})})]}),children:s.jsx($s,{org:l,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function Xn(t){const e=I.c(11),{onPointerDown:n,onDoubleClick:l}=t,o=B(),{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,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=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]=m):(c=e[4],m=e[5]);let u;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==d?(u=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:m}),e[6]=l,e[7]=n,e[8]=a,e[9]=d,e[10]=u):u=e[10],u}const ot=240,Qn=400,Jn="sidebar.width";function Ne(t){return Math.max(ot,Math.min(Qn,t))}function Zn(){const t=I.c(11),[e,n]=$e(Jn,eo),l=G.useRef(null);let o;t[0]!==n||t[1]!==e?(o=m=>{m.preventDefault();const u=m.clientX,p=Ne(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),f=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of f)b.style.transition="none";const g=b=>{const v=Ne(p+(b.clientX-u));x?.style.setProperty("--sidebar-width",`${v}px`)},h=b=>{const v=Ne(p+(b.clientX-u));n(v);for(const y of f)y.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=Ne(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 eo(t){return typeof t=="number"?Ne(t):ot}function ss(){return[]}function ns(t){const e=I.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=I.c(18),{item:n}=t,{isMobile:l,setOpenMobile:o}=_e();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{V("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=H(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let p;return e[14]!==n.key||e[15]!==c||e[16]!==u?(p=s.jsx(q,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=p):p=e[17],p}function to(t){const e=I.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Tt,{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(no),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(so),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 so(t){return s.jsx(os,{item:t},t.key)}function no(t){return s.jsx(os,{item:t},t.key)}function oo(t){const e=I.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(ws,{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 m;e[2]!==a?(m=H("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let u;e[4]!==n?(u=n.map(lo),e[4]=n,e[5]=u):u=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let x;e[8]!==m||e[9]!==u||e[10]!==p?(x=s.jsxs(Pt,{className:m,children:[u,p]}),e[8]=m,e[9]=u,e[10]=p,e[11]=x):x=e[11];let f;return e[12]!==l||e[13]!==c||e[14]!==x||e[15]!==d?(f=s.jsxs(Ms,{variant:d,children:[c,x,l]}),e[12]=l,e[13]=c,e[14]=x,e[15]=d,e[16]=f):f=e[16],f}function lo(t,e){return s.jsx(to,{section:t},e)}function ls(t){const e=I.c(2);let n;return e[0]!==t?(n=s.jsx(oo,{...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=I.c(18),{item:n,onClose:l}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=H(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 m;return e[15]!==i||e[16]!==c?(m=s.jsx(q,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=m):m=e[17],m}function io(t){const e=I.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(Tt,{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 ro(t){const e=I.c(27),{sections:n,onClose:l,footer:o,additionalContent:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(He,{}),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=B();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Lt,{size:16}),e[6]=u):u=e[6];let p;e[7]!==l||e[8]!==m?(p=s.jsx(ke,{onClick:l,"aria-label":m,children:u}),e[7]=l,e[8]=m,e[9]=p):p=e[9];let x;e[10]!==a||e[11]!==p?(x=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,p]}),e[10]=a,e[11]=p,e[12]=x):x=e[12];let f;if(e[13]!==l||e[14]!==n){let v;e[16]!==l?(v=(y,j)=>s.jsx(io,{section:y,onClose:l},j),e[16]=l,e[17]=v):v=e[17],f=n.map(v),e[13]=l,e[14]=n,e[15]=f}else f=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]!==f?(h=s.jsxs(Pt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[f,g]}),e[20]=g,e[21]=f,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=I.c(26),{item:n,onClose:l}=t;let o;e[0]!==n.className?(o=H("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 m=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let p;e[2]!==n.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=p):p=e[3];let 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 f;return e[6]!==i||e[7]!==n.href||e[8]!==l||e[9]!==m||e[10]!==u||e[11]!==p||e[12]!==x?(f=s.jsxs("a",{href:n.href,target:m,rel:u,className:i,onClick:l,children:[p,x]}),e[6]=i,e[7]=n.href,e[8]=l,e[9]=m,e[10]=u,e[11]=p,e[12]=x,e[13]=f):f=e[13],f}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 ao(){const t=I.c(4),e=B();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=I.c(38),{user:n,userImage:l,isImpersonating:o,isMobile:i}=t,r=B(),a=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=H("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let m;e[2]!==c||e[3]!==l?(m=s.jsx(Be,{url:l,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=l,e[4]=m):m=e[4];let u;e[5]!==r||e[6]!==n?.name?(u=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=u):u=e[7];let p;e[8]!==u?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:u}),e[8]=u,e[9]=p):p=e[9];let x;e[10]!==o?(x=o&&s.jsx(ao,{}),e[10]=o,e[11]=x):x=e[11];let f;e[12]!==p||e[13]!==x?(f=s.jsxs("div",{className:"flex items-center gap-2",children:[p,x]}),e[12]=p,e[13]=x,e[14]=f):f=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]!==f?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[f,h]}),e[17]=h,e[18]=f,e[19]=b):b=e[19];let v;e[20]!==r||e[21]!==n?(v=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{ce.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=v):v=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ue,{size:14}),e[23]=y):y=e[23];let j;e[24]!==v?(j=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:y})}),e[24]=v,e[25]=j):j=e[25];let _;e[26]!==r?(_=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=_):_=e[27];let C;e[28]!==_?(C=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:_})}),e[28]=_,e[29]=C):C=e[29];let N;e[30]!==j||e[31]!==C?(N=s.jsx(Ut,{delayDuration:300,children:s.jsxs(ye,{children:[j,C]})}),e[30]=j,e[31]=C,e[32]=N):N=e[32];let S;return e[33]!==b||e[34]!==N||e[35]!==d||e[36]!==m?(S=s.jsxs("div",{className:d,children:[m,b,N]}),e[33]=b,e[34]=N,e[35]=d,e[36]=m,e[37]=S):S=e[37],S}function pt(t){const e=I.c(35),{themeOptions:n,preferences:l,setPreferences:o,isMobile:i}=t,r=B(),a=i?"size-8":"size-7",d=i?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=H("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==l.theme||e[4]!==o||e[5]!==n){let _;e[7]!==a||e[8]!==l.theme||e[9]!==o?(_=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:H(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]=_):_=e[10],m=n.map(_),e[2]=a,e[3]=l.theme,e[4]=o,e[5]=n,e[6]=m}else m=e[6];let u;e[11]!==m?(u=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=u):u=e[12];let p;e[13]!==l.enableSounds||e[14]!==r?(p=l.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=l.enableSounds,e[14]=r,e[15]=p):p=e[15];let x;e[16]!==o?(x=()=>o(co),e[16]=o,e[17]=x):x=e[17];const f=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]!==f?(g=H(a,"rounded-md flex items-center justify-center transition-colors",f),e[18]=a,e[19]=f,e[20]=g):g=e[20];let h;e[21]!==l.enableSounds?(h=l.enableSounds?s.jsx(nn,{size:14}):s.jsx(on,{size:14}),e[21]=l.enableSounds,e[22]=h):h=e[22];let b;e[23]!==p||e[24]!==x||e[25]!==g||e[26]!==h?(b=s.jsx("button",{type:"button","aria-label":p,onClick:x,className:g,children:h}),e[23]=p,e[24]=x,e[25]=g,e[26]=h,e[27]=b):b=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.122.0"]}),e[28]=v):v=e[28];let y;e[29]!==b?(y=s.jsxs("div",{className:"flex items-center gap-2",children:[b,v]}),e[29]=b,e[30]=y):y=e[30];let j;return e[31]!==y||e[32]!==c||e[33]!==u?(j=s.jsxs("div",{className:c,children:[u,y]}),e[31]=y,e[32]=c,e[33]=u,e[34]=j):j=e[34],j}function co(t){return{...t,enableSounds:!t.enableSounds}}function ht(t){const e=I.c(54),{user:n,userImage:l,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:u,isMobile:p}=t;if(p){let j;e[0]!==a||e[1]!==n||e[2]!==l?(j=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=l,e[3]=j):j=e[3];let _;if(e[4]!==u||e[5]!==o){let T;e[7]!==u?(T=M=>s.jsx(ge,{item:M,onClose:u},M.key),e[7]=u,e[8]=T):T=e[8],_=o.map(T),e[4]=u,e[5]=o,e[6]=_}else _=e[6];let C;e[9]!==u||e[10]!==r?(C=r&&s.jsx(ge,{item:r,onClose:u}),e[9]=u,e[10]=r,e[11]=C):C=e[11];let N;e[12]!==u||e[13]!==i?(N=s.jsx(ge,{item:i,onClose:u}),e[12]=u,e[13]=i,e[14]=N):N=e[14];let S;e[15]!==_||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:[_,C,N]})}),e[15]=_,e[16]=C,e[17]=N,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==m||e[21]!==d?(w=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=w):w=e[22];let k;return e[23]!==j||e[24]!==S||e[25]!==w?(k=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[j,S,w]}),e[23]=j,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 f;if(e[31]!==u||e[32]!==o){let j;e[34]!==u?(j=_=>s.jsx(ge,{item:_,onClose:u},_.key),e[34]=u,e[35]=j):j=e[35],f=o.map(j),e[31]=u,e[32]=o,e[33]=f}else f=e[33];let g;e[36]!==u||e[37]!==r?(g=r&&s.jsx(ge,{item:r,onClose:u}),e[36]=u,e[37]=r,e[38]=g):g=e[38];let h;e[39]!==u||e[40]!==i?(h=s.jsx(ge,{item:i,onClose:u}),e[39]=u,e[40]=i,e[41]=h):h=e[41];let b;e[42]!==f||e[43]!==g||e[44]!==h?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[f,g,h]}),e[42]=f,e[43]=g,e[44]=h,e[45]=b):b=e[45];let v;e[46]!==c||e[47]!==m||e[48]!==d?(v=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=v):v=e[49];let y;return e[50]!==x||e[51]!==b||e[52]!==v?(y=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[x,b,v]})}),e[50]=x,e[51]=b,e[52]=v,e[53]=y):y=e[53],y}function qe(){const t=I.c(99),e=B(),{data:n}=Ae.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]=gs(),m=At(),{isAdmin:u}=fn(),[p,x]=G.useState(!1),f=n?.user,g=f?.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 v=b;let y;t[2]!==e?(y=e("common.accountPopover.preferences"),t[2]=e,t[3]=y):y=t[3];let j;t[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Oe,{size:16}),t[4]=j):j=t[4];let _;t[5]!==o||t[6]!==a?(_=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=_):_=t[7];let C;t[8]!==y||t[9]!==_?(C={key:"preferences",label:y,icon:j,onClick:_},t[8]=y,t[9]=_,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(Xs,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:l.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Zs,{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(Js,{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 T;t[20]!==e?(T=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=T):T=t[21];let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(sn,{size:16}),t[22]=M):M=t[22];let $;t[23]!==T?($={key:"privacy",label:T,icon:M,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=T,t[24]=$):$=t[24];let A;t[25]!==e?(A=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=A):A=t[26];let z;t[27]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(bs,{className:"w-4 h-4"}),t[27]=z):z=t[27];let R;t[28]!==A?(R={key:"github",label:A,icon:z,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(un,{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 F;t[35]!==e?(F=e("common.accountPopover.homepage"),t[35]=e,t[36]=F):F=t[36];let K;t[37]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Qs,{size:16}),t[37]=K):K=t[37];let Z;t[38]!==F?(Z={key:"homepage",label:F,icon:K,href:"https://decocms.com",external:!0},t[38]=F,t[39]=Z):Z=t[39];let ne;t[40]!==u||t[41]!==o||t[42]!==e?(ne=u?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Wt,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=u,t[41]=o,t[42]=e,t[43]=ne):ne=t[43];let de;t[44]!==$||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,$,R,D,Z,...ne],t[44]=$,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:uo},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 Ae.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(en,{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(tn,{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 P;t[69]!==te?(P={value:"dark",icon:he,label:te},t[69]=te,t[70]=P):P=t[70];let L;t[71]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(We,{size:14}),t[71]=L):L=t[71];let W;t[72]!==e?(W=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=W):W=t[73];let U;t[74]!==W?(U={value:"system",icon:L,label:W},t[74]=W,t[75]=U):U=t[75];let re;t[76]!==X||t[77]!==P||t[78]!==U?(re=[X,P,U],t[76]=X,t[77]=P,t[78]=U,t[79]=re):re=t[79];const De=re;let we;t[80]!==h||t[81]!==m||t[82]!==oe||t[83]!==d||t[84]!==c||t[85]!==Se||t[86]!==fe||t[87]!==De||t[88]!==f||t[89]!==g?(we={user:f,userImage:g,menuItems:oe,signOutItem:Se,stopImpersonatingItem:fe,isImpersonating:h,themeOptions:De,preferences:d,setPreferences:c,close:v,isMobile:m},t[80]=h,t[81]=m,t[82]=oe,t[83]=d,t[84]=c,t[85]=Se,t[86]=fe,t[87]=De,t[88]=f,t[89]=g,t[90]=we):we=t[90];const Me=we;let Ie;return t[91]!==h||t[92]!==m||t[93]!==p||t[94]!==Me||t[95]!==e||t[96]!==f?.name||t[97]!==g?(Ie=s.jsx(s.Fragment,{children:m?s.jsxs(qs,{open:p,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:H("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(Be,{url:g,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Vs,{className:"h-[80dvh] p-0",children:[s.jsx(Ys,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(ht,{...Me})]})]}):s.jsxs(Gt,{open:p,onOpenChange:x,children:[s.jsx(Ht,{asChild:!0,children:s.jsxs(Y,{tooltip:f?.name??e("common.accountPopover.defaultAccountLabel"),className:H("rounded-md",h&&"border-2 border-dashed border-warning"),children:[s.jsx(Be,{url:g,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:mo,children:s.jsx(ht,{...Me})})]})}),t[91]=h,t[92]=m,t[93]=p,t[94]=Me,t[95]=e,t[96]=f?.name,t[97]=g,t[98]=Ie):Ie=t[98],Ie}function mo(t){return t.preventDefault()}function uo(){V("signed_out",{source:"account_popover"}),js(),Ae.signOut()}const fo=["Browse and edit your Library files","Run your agents","Enable and call any MCP tool in this org"],po="Connect: ";function ho(){return typeof window>"u"?"unknown host":window.location.hostname}function xo(t){const e=I.c(45),{onClose:n}=t,{org:l}=Q();let o;e[0]!==l.slug?(o=hn(l.slug),e[0]=l.slug,e[1]=o):o=e[1];const i=o,r=xn(),[a,d]=G.useState(null),c=dt(),m=dt();let u;e[2]!==r||e[3]!==l.slug?(u=()=>{r.mutate({name:`${po}Claude Code on ${ho()}`,permissions:{"*":["*"]}},{onSuccess:R=>{const E=gn(l.slug,R.key);d(E),V("connect_studio_generate",{target:"claude-code"}),navigator.clipboard?.writeText(E).then(vo,jo)},onError:bo})},e[2]=r,e[3]=l.slug,e[4]=u):u=e[4];const p=u;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(qt,{size:17})}),e[5]=x):x=e[5];let f;e[6]!==l.name?(f=s.jsxs(Ze,{className:"flex items-center gap-2.5",children:[x,"Connect ",l.name," to Claude"]}),e[6]=l.name,e[7]=f):f=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($t,{children:"Hand Claude this org's MCP endpoint. Once linked, Claude can:"}),e[8]=g):g=e[8];let h;e[9]!==f?(h=s.jsxs(Ot,{children:[f,g]}),e[9]=f,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:fo.map(go)}),e[11]=b):b=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ct,{size:15,className:"text-muted-foreground"}),e[12]=v):v=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[v,"Claude Code",s.jsx("span",{className:"ml-auto text-[11px] font-medium text-special uppercase tracking-wide",children:"Recommended"})]}),e[13]=y):y=e[13];let j;e[14]!==a||e[15]!==c||e[16]!==r.isPending||e[17]!==p?(j=s.jsxs("section",{className:"rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3",children:[y,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),V("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:p,children:[s.jsx(ct,{size:14}),r.isPending?"Generating…":"Generate connect command"]})]})]}),e[14]=a,e[15]=c,e[16]=r.isPending,e[17]=p,e[18]=j):j=e[18];let _,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[s.jsx(ln,{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]=_,e[20]=C):(_=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]!==m?(S=()=>{m.handleCopy(i),V("connect_studio_copy",{target:"claude-connector"})},e[23]=i,e[24]=m,e[25]=S):S=e[25];let w;e[26]!==m.copied?(w=m.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),e[26]=m.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 T;e[31]!==N||e[32]!==k?(T=s.jsxs("section",{className:"flex flex-col gap-2.5",children:[_,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]=T):T=e[33];let M;e[34]!==l.slug?(M={org:l.slug},e[34]=l.slug,e[35]=M):M=e[35];let $;e[36]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(tt,{size:12}),e[36]=$):$=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(vs,{to:"/$org/settings/connect",params:M,onClick:n,children:["More clients & API keys ",$]})})}),e[37]=n,e[38]=M,e[39]=A):A=e[39];let z;return e[40]!==j||e[41]!==T||e[42]!==A||e[43]!==h?(z=s.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[h,b,j,T,A]}),e[40]=j,e[41]=T,e[42]=A,e[43]=h,e[44]=z):z=e[44],z}function go(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 bo(t){return ce.error(t.message)}function jo(){return ce.success("Command ready — copy it below")}function vo(){return ce.success("Command copied — paste it in your terminal")}function yo(t){const e=I.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(xo,{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 Ve(t){const e=I.c(50),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,o=B(),i=bn(),[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 j=vn(i.capabilities,o);let _;e[7]!==i.online||e[8]!==o?(_=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectDesktop"),e[7]=i.online,e[8]=o,e[9]=_):_=e[9],d=_,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:j.length>0?o("header.linkedDesktopIndicator.availableCapabilities",{capabilities:j.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 m=c;if(l==="full"){let j,_;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=()=>a(!0),_=s.jsx(We,{}),e[10]=j,e[11]=_):(j=e[10],_=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:j,children:[_,C,N]})}),e[16]=d,e[17]=C,e[18]=N,e[19]=S):S=e[19];let w;e[20]!==m?(w=s.jsx(ve,{side:"right",children:m}),e[20]=m,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 T;e[25]!==r?(T=s.jsx(mt,{open:r,onOpenChange:a}),e[25]=r,e[26]=T):T=e[26];let M;return e[27]!==T||e[28]!==k?(M=s.jsxs(s.Fragment,{children:[k,T]}),e[27]=T,e[28]=k,e[29]=M):M=e[29],M}let u;e[30]===Symbol.for("react.memo_cache_sentinel")?(u=()=>a(!0),e[30]=u):u=e[30];let p;e[31]!==i.online||e[32]!==o?(p=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectYourDesktop"),e[31]=i.online,e[32]=o,e[33]=p):p=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 f;e[35]!==i.online?(f=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]=f):f=e[36];let g;e[37]!==p||e[38]!==f?(g=s.jsx(je,{asChild:!0,children:s.jsxs(ke,{onClick:u,"aria-label":p,children:[x,f]})}),e[37]=p,e[38]=f,e[39]=g):g=e[39];let h;e[40]!==m?(h=s.jsx(ve,{side:"bottom",children:m}),e[40]=m,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 v;e[45]!==r?(v=s.jsx(mt,{open:r,onOpenChange:a}),e[45]=r,e[46]=v):v=e[46];let y;return e[47]!==v||e[48]!==b?(y=s.jsxs(s.Fragment,{children:[b,v]}),e[47]=v,e[48]=b,e[49]=y):y=e[49],y}class _o 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 So(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function No(){const t=I.c(17),e=ae(),{org:n}=Q(),{hasDecoKey:l,balanceDollars:o}=Hs();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=H(o!=null&&So(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(rn,{}),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 m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==m?(u=s.jsx(J,{children:s.jsx(q,{children:s.jsxs(Y,{tooltip:i,className:r,onClick:a,children:[d,m]})})}),t[12]=i,t[13]=r,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function xt(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(_o,{children:s.jsx(G.Suspense,{fallback:null,children:s.jsx(No,{})})}),t[0]=e):e=t[0],e}function Co(){const t=I.c(14),e=B(),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 ko(){const t=I.c(9),e=B(),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=I.c(33),e=B(),[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 m;t[7]!==r||t[8]!==c?(m=s.jsx(q,{children:s.jsx(Vt,{trigger:s.jsxs(Y,{tooltip:r,children:[a,c]})})}),t[7]=r,t[8]=c,t[9]=m):m=t[9];let u;t[10]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=u):u=t[11];let p,x;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(!0),x=s.jsx(pn,{}),t[12]=p,t[13]=x):(p=t[12],x=t[13]);let f;t[14]!==e?(f=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=f):f=t[15];let g;t[16]!==f?(g=s.jsx("span",{children:f}),t[16]=f,t[17]=g):g=t[17];let h;t[18]!==u||t[19]!==g?(h=s.jsx(q,{children:s.jsxs(Y,{tooltip:u,onClick:p,children:[x,g]})}),t[18]=u,t[19]=g,t[20]=h):h=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(q,{children:s.jsxs(Y,{tooltip:"Connect to Claude",onClick:()=>{V("connect_studio_opened",{source:"sidebar_footer"}),i(!0)},children:[s.jsx(qt,{}),s.jsx("span",{children:"Connect to Claude"})]})}),t[21]=b):b=t[21];let v;t[22]!==h||t[23]!==m?(v=s.jsxs(J,{className:"gap-0.5",children:[m,h,b]}),t[22]=h,t[23]=m,t[24]=v):v=t[24];let y;t[25]!==n?(y=s.jsx(Bs,{open:n,onOpenChange:l,mode:"browse"}),t[25]=n,t[26]=y):y=t[26];let j;t[27]!==o?(j=s.jsx(yo,{open:o,onOpenChange:i}),t[27]=o,t[28]=j):j=t[28];let _;return t[29]!==v||t[30]!==y||t[31]!==j?(_=s.jsxs(s.Fragment,{children:[v,y,j]}),t[29]=v,t[30]=y,t[31]=j,t[32]=_):_=t[32],_}function bt(){const t=I.c(10),e=B();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(q,{children:s.jsx(Vt,{trigger:s.jsxs(Y,{tooltip:n,children:[l,i]})})})}),t[7]=n,t[8]=i,t[9]=r):r=t[9],r}function wo(){const t=I.c(19),{state:e}=_e(),n=e==="collapsed",l=nt(),o=!l;if(n){let m;t[0]!==l?(m=l?s.jsx(bt,{}):s.jsx(gt,{}),t[0]=l,t[1]=m):m=t[1];let u;t[2]!==o?(u=o&&s.jsx(xt,{}),t[2]=o,t[3]=u):u=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(q,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(Ve,{})})}),t[4]=p):p=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(q,{children:s.jsx(Co,{})}),t[5]=x):x=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(J,{children:[p,x,s.jsx(q,{children:s.jsx(qe,{})})]}),t[6]=f):f=t[6];let g;return t[7]!==m||t[8]!==u?(g=s.jsxs(Ge,{className:"px-2 pb-3 gap-1",children:[m,u,f]}),t[7]=m,t[8]=u,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(q,{children:s.jsx(Ve,{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(q,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(qe,{})}),s.jsx(ko,{})]})})]}),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 Mo(){const t=I.c(11),e=B(),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(q,{children:s.jsx(qe,{})})})}),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(ke,{"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=I.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 v=b.currentTarget;r(v.scrollHeight-v.scrollTop>v.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=H("relative",l),e[2]=l,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==n?(p=s.jsx("div",{ref:d,onScroll:m,className:n,children:o}),e[4]=o,e[5]=n,e[6]=p):p=e[6];const x=i?"opacity-100":"opacity-0";let f;e[7]!==x?(f=H("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]=f):f=e[8];let g;e[9]!==f?(g=s.jsx("div",{"aria-hidden":!0,className:f}),e[9]=f,e[10]=g):g=e[10];let h;return e[11]!==u||e[12]!==p||e[13]!==g?(h=s.jsxs("div",{className:u,children:[p,g]}),e[11]=u,e[12]=p,e[13]=g,e[14]=h):h=e[14],h}function Io(t){const e=I.c(9),{virtualMcpId:n,size:l,showAutomationBadge:o}=t,i=l===void 0?"sm":l,r=B();let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(To,{virtualMcpId:n,size:i}):s.jsx(Ce,{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 To(t){const e=I.c(6),{virtualMcpId:n,size:l}=t,o=Yt(n);if(!o){let a;return e[0]!==l?(a=s.jsx(Ce,{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(Ce,{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=I.c(53),{open:n,onOpenChange:l}=t,[o,i]=G.useState(""),{org:r}=Q(),{setTaskId:a}=Qt(),d=Jt(),c=B();let m,u,p;e[0]!==r.id||e[1]!==o?(p=o.trim(),u=ys,m=Mt.globalSearch(r.id,p),e[0]=r.id,e[1]=o,e[2]=m,e[3]=u,e[4]=p):(m=e[2],u=e[3],p=e[4]);const x=n&&p.length>0;let f;e[5]!==d||e[6]!==p?(f=async()=>await d.call("GLOBAL_SEARCH",{query:p,limit:20}),e[5]=d,e[6]=p,e[7]=f):f=e[7];let g;e[8]!==m||e[9]!==x||e[10]!==f?(g={queryKey:m,enabled:x,queryFn:f,staleTime:1e4},e[8]=m,e[9]=x,e[10]=f,e[11]=g):g=e[11];const{data:h,isFetching:b}=u(g);let v;e[12]!==h?.items?(v=h?.items??[],e[12]=h?.items,e[13]=v):v=e[13];const y=v;let j;e[14]!==l?(j=F=>{F||i(""),l(F)},e[14]=l,e[15]=j):j=e[15];const _=j;let C;e[16]!==_||e[17]!==a?(C=F=>{_(!1),a(F.id,F.virtual_mcp_id??void 0)},e[16]=_,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 T;e[25]!==k?(T=s.jsx($t,{children:k}),e[25]=k,e[26]=T):T=e[26];let M;e[27]!==w||e[28]!==T?(M=s.jsxs(Ot,{className:"sr-only",children:[w,T]}),e[27]=w,e[28]=T,e[29]=M):M=e[29];let $;e[30]!==c?($=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=$):$=e[31];let A;e[32]!==o||e[33]!==$?(A=s.jsx(Pn,{value:o,onValueChange:i,placeholder:$}),e[32]=o,e[33]=$,e[34]=A):A=e[34];let z;e[35]!==N||e[36]!==b||e[37]!==y||e[38]!==c||e[39]!==p?(z=p?b&&y.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):y.length===0?s.jsx(In,{children:c("tasksPanel.globalSearchDialog.noResults")}):y.map(F=>F.type==="thread"?s.jsxs(Tn,{value:`thread:${F.id}:${F.title}`,onSelect:()=>N(F),className:"gap-2.5",children:[s.jsx(Io,{virtualMcpId:F.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:F.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(F.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${F.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]=y,e[38]=c,e[39]=p,e[40]=z):z=e[40];let R;e[41]!==z?(R=s.jsx(An,{children:z}),e[41]=z,e[42]=R):R=e[42];let E;e[43]!==A||e[44]!==R?(E=s.jsxs(zn,{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]!==_||e[50]!==n||e[51]!==O?(D=s.jsx(et,{open:n,onOpenChange:_,children:O}),e[49]=_,e[50]=n,e[51]=O,e[52]=D):D=e[52],D}function Po(t){return t==="ephemeral"||t.startsWith("thread:")}function is(t){const e=I.c(45),{task:n,isActive:l,onClick:o,onArchive:i,showAutomationBadge:r,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=B(),u=En(n.status),p=u.icon,x=n.metadata?.kind==="tool_call_run",f=Yt(x?void 0:n.virtual_mcp_id);let g;e[0]!==f?(g=Us(f),e[0]=f,e[1]=g):g=e[1];const h=g;Dn(6e4);const b=r||!!n.trigger_id,v=n.id,y="button",j=0;let _;e[2]!==o?(_=K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),o())},e[2]=o,e[3]=_):_=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=H("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]!==f?.icon||e[10]!==f?.title?(w=a&&!x&&s.jsx(Ce,{icon:f?.icon??null,name:f?.title??"?",size:"2xs"}),e[7]=x,e[8]=a,e[9]=f?.icon,e[10]=f?.title,e[11]=w):w=e[11];let k;e[12]!==b||e[13]!==m?(k=b&&s.jsx(Zt,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=b,e[13]=m,e[14]=k):k=e[14];let T;e[15]!==m||e[16]!==n.title?(T=n.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=n.title,e[17]=T):T=e[17];let M;e[18]!==T?(M=s.jsx("div",{className:"text-sm text-foreground truncate",children:T}),e[18]=T,e[19]=M):M=e[19];let $;e[20]!==k||e[21]!==M?($=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[k,M]}),e[20]=k,e[21]=M,e[22]=$):$=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:H("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Po(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:Fn(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 z;e[28]!==$||e[29]!==A?(z=s.jsxs("div",{className:"flex-1 min-w-0",children:[$,A]}),e[28]=$,e[29]=A,e[30]=z):z=e[30];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!d&&s.jsx("span",{className:H("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",i&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:u.label}),children:s.jsx(p,{size:14,className:H(u.iconClassName,n.status==="in_progress"&&"animate-spin")})});let O;e[31]!==i||e[32]!==m?(O=i&&s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("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(_s,{size:14})})}),s.jsx(ve,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=i,e[32]=m,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 F;return e[37]!==o||e[38]!==z||e[39]!==D||e[40]!==_||e[41]!==S||e[42]!==w||e[43]!==n.id?(F=s.jsxs("div",{"data-task-id":v,role:y,tabIndex:j,onClick:o,onKeyDown:_,className:S,children:[w,z,D]}),e[37]=o,e[38]=z,e[39]=D,e[40]=_,e[41]=S,e[42]=w,e[43]=n.id,e[44]=F):F=e[44],F}const yt=["requires_action","in_progress","failed","expired","completed"];function Ao(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 zo="sidebar.group.expanded.";function $o(t,e){const n=I.c(3),[l,o]=$e(`${zo}${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=I.c(18),{onClick:n,isFetching:l,indented:o}=t,i=B();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=H("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(Ss,{size:14,className:"animate-spin"}),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==l||e[7]!==i?(m=i(l?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=l,e[7]=i,e[8]=m):m=e[8];let u;e[9]!==m?(u=s.jsx("span",{children:m}),e[9]=m,e[10]=u):u=e[10];let p;return e[11]!==l||e[12]!==n||e[13]!==r||e[14]!==d||e[15]!==c||e[16]!==u?(p=s.jsxs("button",{type:"button","aria-label":r,onClick:n,disabled:l,className:d,children:[c,u]}),e[11]=l,e[12]=n,e[13]=r,e[14]=d,e[15]=c,e[16]=u,e[17]=p):p=e[17],p}function Oo(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Eo(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Pe=0;const Ye=[];function Do(){for(;Pe<as&&Ye.length>0;){const t=Ye.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Do()})};Pe<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 Ro(t,e,n,l){let o=0;for(const i of t)ds(i,e,n,l)&&o++;return o}function Fe(t,e,n,l){return Ro(t,e,n,l)}function Fo(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 ze=new Map,Te=new Map;function Go(t,e){return e?t>=Ee?!0:null:!1}function Nt(t){return ze.get(t)}function Ho(t,e){ze.set(t,e)}function Bo(t,e,n){const l=ze.get(t);if(l!==void 0){n(l);return}let o=Te.get(t);o||(o=cs(e).then(i=>(ze.set(t,i),Te.delete(t),i)).catch(()=>(Te.delete(t),Promise.reject(new Error("group probe failed")))),Te.set(t,o)),o.then(n,()=>n(!1))}function Ct(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 Uo(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 Wo(t,e,n,l){const o=I.c(8),{org:i}=Q(),r=Oo(i.id,t,e,n);let a;o[0]!==n?(a=Eo(n),o[0]=n,o[1]=a):a=o[1];const d=a,[c,m]=G.useState({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==r&&m({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});const u=Cn(),{threads:p,hasMore:x}=Xt(),f=Fe(p,t,e,n),g=Fo(f,x),h=Go(f,x),b=Jt();if(c.identity===r&&c.serverHasMore===null){const N=h??Nt(r);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===r&&c.serverHasMore===null&&h===null&&Nt(r)===void 0&&c.probeSubscribedIdentity!==r&&(m(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}=Ct(S),k=Fe(u.threads.get(),t,e,n);return w===void 0?!1:St(k,w)},N=>{m(S=>S.identity!==r?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||d)return;const S=r;m(w=>w.identity===S?{...w,isFetching:!0}:w);try{const w=Fe(p,t,e,n),k=_t(t,e,w,n,Ee),T=await cs(()=>b.call("COLLECTION_THREADS_LIST",k)),{items:M,hasMore:$,totalCount:A}=Ct(T),z=new Set(p.map(Ko)),R=Uo(M,z,t,e,n),E=w;u.mergeThreads(M),m(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:$,Ho(S,D),{...O,isFetching:!1,serverHasMore:D}})}catch(w){const k=w,T=k instanceof Error?k.message:String(k);ce.error(`Could not load more tasks: ${T}`),m(M=>M.identity===S?{...M,isFetching:!1}:M)}},j=c.isFetching||c.isProbing,_=!d&&!j&&Lo(g,c.serverHasMore);let C;return o[2]!==j||o[3]!==y||o[4]!==_||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(C={hasMore:_,isFetching:j,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},o[2]=j,o[3]=y,o[4]=_,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=C):C=o[7],C}function Ko(t){return t.id}function qo(t){const e=I.c(20),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:u,hasMore:p,serverHasMore:x}=Wo("status",n,d),[f,g]=G.useState(!1);!f&&l.length===0&&x===!0&&!c&&!m&&(g(!0),queueMicrotask(()=>{u()}));let h;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==i||e[5]!==l){let y;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r||e[11]!==i?(y=j=>s.jsx(is,{task:j,isActive:o===j.id,onClick:()=>i(j),onArchive:a&&j.created_by===d.currentUserId?()=>r(j):void 0,showAutomationBadge:!!j.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},j.id),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=i,e[12]=y):y=e[12],h=l.map(y),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]!==p||e[14]!==c||e[15]!==u?(b=(p||c)&&s.jsx(rs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=p,e[14]=c,e[15]=u,e[16]=b):b=e[16];let v;return e[17]!==h||e[18]!==b?(v=s.jsxs(s.Fragment,{children:[h,b]}),e[17]=h,e[18]=b,e[19]=v):v=e[19],v}function Vo(t){const e=I.c(36),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,c=Rn[n],m=c.icon,[u,p]=$o(`status-${n}`,!1);let x;e[0]!==u||e[1]!==p?(x=function(){p(!u)},e[0]=u,e[1]=p,e[2]=x):x=e[2];const f=x;let g;e[3]!==f?(g=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),f())},e[3]=f,e[4]=g):g=e[4];let h;e[5]!==m||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(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=h):h=e[7];let b;e[8]!==u?(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:u?s.jsx(Ln,{size:14}):s.jsx(Ft,{size:14})}),e[8]=u,e[9]=b):b=e[9];let v;e[10]!==h||e[11]!==b?(v=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]=v):v=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let j;e[15]!==l.length?(j=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]=j):j=e[16];let _;e[17]!==u||e[18]!==f||e[19]!==g||e[20]!==v||e[21]!==y||e[22]!==j?(_=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:f,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:[v,y,j]}),e[17]=u,e[18]=f,e[19]=g,e[20]=v,e[21]=y,e[22]=j,e[23]=_):_=e[23];let C;e[24]!==o||e[25]!==a||e[26]!==u||e[27]!==d||e[28]!==r||e[29]!==i||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(qo,{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=u,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]!==_||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,C]}),e[33]=_,e[34]=C,e[35]=N):N=e[35],N}function kt(t){const e=I.c(38),{threads:n,groupBy:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(On,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const b=u?"No chats match your filters":"No chats yet";let v;return e[1]!==b?(v=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]=v):v=e[2],v}const p=n.length>1||d;if(l==="status"){let h;if(e[3]!==o||e[4]!==p||e[5]!==a||e[6]!==r||e[7]!==i||e[8]!==n){let v;e[10]!==o||e[11]!==p||e[12]!==a||e[13]!==r||e[14]!==i?(v=y=>s.jsx(Vo,{status:y.status,threads:y.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:p,filters:a},y.status),e[10]=o,e[11]=p,e[12]=a,e[13]=r,e[14]=i,e[15]=v):v=e[15],h=Ao(n).map(v),e[3]=o,e[4]=p,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]!==p||e[20]!==a||e[21]!==r||e[22]!==i||e[23]!==n){let h;e[25]!==o||e[26]!==p||e[27]!==a||e[28]!==r||e[29]!==i?(h=b=>s.jsx(is,{task:b,isActive:o===b.id,onClick:()=>i(b),onArchive:p&&b.created_by===a.currentUserId?()=>r(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=o,e[26]=p,e[27]=a,e[28]=r,e[29]=i,e[30]=h):h=e[30],x=n.map(h),e[18]=o,e[19]=p,e[20]=a,e[21]=r,e[22]=i,e[23]=n,e[24]=x}else x=e[24];let f;e[31]!==d||e[32]!==c||e[33]!==m?(f=(d||c)&&s.jsx(rs,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=f):f=e[34];let g;return e[35]!==x||e[36]!==f?(g=s.jsxs(s.Fragment,{children:[x,f]}),e[35]=x,e[36]=f,e[37]=g):g=e[37],g}function Yo(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=I.c(17),{label:n,onClick:l,active:o,children:i}=t,[r,a]=G.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const p=o&&"bg-sidebar-accent text-foreground";let x;e[4]!==p?(x=H("md:size-[34px] rounded-lg",p),e[4]=p,e[5]=x):x=e[5];let f;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(f=s.jsx(je,{asChild:!0,children:s.jsx(ke,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=f):f=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]!==f||e[15]!==g?(h=s.jsxs(ye,{open:r,children:[f,g]}),e[13]=r,e[14]=f,e[15]=g,e[16]=h):h=e[16],h}function Le(t){const e=I.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=u=>u&&o(u),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Xo),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Sn,{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 m;return e[10]!==r||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r,c]}),e[10]=r,e[11]=c,e[12]=m):m=e[12],m}function Xo(t){return s.jsxs(_n,{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=B(),{data:n}=Ae.useSession(),l=n?.user?.id,{org:o}=Q(),i=Dt({connectionId:Rt,orgId:o.id,orgSlug:o.slug}),r=rt(o.id).id,a=Nn(),{threads:d,hasMore:c,isFetchingMore:m,fetchNextPage:u}=Xt(),p=d.filter(P=>!P.hidden),{hide:x,setScope:f}=kn(),g=ae(),{setTaskId:h,createNewTask:b}=Qt(),v=Ns({strict:!1}),y=It({strict:!1}),j=v.taskId??null,_=y.virtualmcpid??d.find(P=>P.id===j)?.virtual_mcp_id??null,C=()=>{t?.()},N=[...p].sort((P,L)=>(L.updated_at??"").localeCompare(P.updated_at??"")),[S,w]=G.useState("all"),[k,T]=G.useState("flat"),[M,$]=$e("sidebar-threads-scope-all",!1),[A,z]=G.useState(!1),[R,E]=G.useState(!1),O={type:S,member:"mine",currentUserId:l??null},D={};M||(D.created_by="me"),f(D);const F=P=>l?P.filter(L=>L.created_by===l):[],K=P=>S==="automation"?P.filter(L=>!!L.trigger_id):S==="manual"?P.filter(L=>!L.trigger_id):P,Z=F(N),ne=K(Z),de=K(N),oe=M?de:ne,ee=P=>{if(l&&P.created_by&&P.created_by!==l)return;const L=P.id===j;if(x(P.id),Mn(P.id),!L)return;const W=Yo(oe,P.id,l);C(),W?h(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},le=P=>{C(),h(P.id,P.virtual_mcp_id)},me=async P=>{try{const L=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:P,limit:1,offset:0}});return((L.structuredContent??L).items?.length??0)===0}catch{return!1}},Se=async()=>{const P=_??r;V("sidebar_new_thread_clicked",{virtual_mcp_id:P});const L=Z.find(W=>W.virtual_mcp_id===P&&W.title==="New chat");if(L&&await me(L.id)){C(),h(L.id,P);return}C(),b(P)},{state:ue,isMobile:fe,toggleSidebar:pe}=_e();if(ue==="collapsed"&&!fe){const P=rt(o.id),L=new Map((a??[]).map(U=>[U.id,U])),W=U=>(U?L.get(U):void 0)??(U===r?P: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(Ws,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(Y,{tooltip:o.name,children:s.jsx(Ks,{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(q,{children:s.jsx(Y,{"aria-label":e("sidebar.taskGroupsList.toggleSidebar"),tooltip:e("sidebar.taskGroupsList.toggleSidebar"),onClick:pe,children:s.jsx(Lt,{size:16})})}),oe.map(U=>{const re=W(U.virtual_mcp_id);return s.jsx(q,{children:s.jsx(Y,{"aria-label":U.title||e("sidebar.taskGroupsList.newChat"),tooltip:U.title||e("sidebar.taskGroupsList.newChat"),isActive:U.id===j,onClick:()=>le(U),children:s.jsx(Ce,{icon:re?.icon??null,name:re?.title??"Agent",size:"xs"})})},U.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(Ht,{asChild:!0,children:s.jsxs(ke,{"aria-label":e("sidebar.taskGroupsList.filterChats"),active:X,className:"md:size-[34px] rounded-lg",children:[s.jsx(yn,{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(Bt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Le,{label:e("sidebar.taskGroupsList.filterView"),value:k,onChange:P=>{V("tasks_panel_group_by_changed",{to_value:P}),T(P)},options:[{value:"flat",label:e("sidebar.taskGroupsList.viewList"),icon:s.jsx(an,{size:13})},{value:"status",label:e("sidebar.taskGroupsList.viewStatus"),icon:s.jsx(cn,{size:13})}]}),s.jsx(Le,{label:e("sidebar.taskGroupsList.filterType"),value:S,onChange:P=>{V("tasks_panel_filter_changed",{to_value:P}),w(P)},options:[{value:"all",label:e("sidebar.taskGroupsList.typeAll")},{value:"manual",label:e("sidebar.taskGroupsList.typeChats")},{value:"automation",label:e("sidebar.taskGroupsList.typeAuto")}]}),s.jsx(Le,{label:e("sidebar.taskGroupsList.filterScope"),value:M?"team":"mine",onChange:P=>$(P==="team"),options:[{value:"mine",label:e("sidebar.taskGroupsList.scopeMine")},{value:"team",label:e("sidebar.taskGroupsList.scopeTeam")}]})]})]}),te=P=>s.jsx(Ut,{delayDuration:300,children:s.jsxs("div",{className:H("shrink-0 flex items-center justify-between",P?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!P&&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:()=>{V("tasks_panel_search_opened"),E(!0),z(!0)},children:s.jsx(dn,{size:16})}),s.jsx(wt,{label:e("sidebar.taskGroupsList.newChat"),onClick:()=>{Se()},children:s.jsx(mn,{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:j,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:m,onLoadMore:()=>{u()},filtersActive:X})}),R&&s.jsx(vt,{open:A,onOpenChange:z})]}):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:j,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:m,onLoadMore:()=>{u()},filtersActive:X})})}),R&&s.jsx(vt,{open:A,onOpenChange:z})]})}const Qo=5,Jo=[{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=I.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:Qo}).map(tl)}),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:Jo.map(Zo)})]}),t[2]=l):l=t[2],l}function Zo(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:H("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(el)})]},e)}function el(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 tl(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function sl(){const t=I.c(2);if(nt()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(He,{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(He,{}),s.jsx(st,{})]}),t[1]=n):n=t[1],n}function nl(){const t=I.c(5),e=ss();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(wo,{}),l=s.jsx(sl,{}),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 ol(t){const e=I.c(8),{onClose:n}=t,l=ss();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Mo,{}),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(ro,{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 ll="sidebar.open";function il(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ks,{}),t[0]=e):e=t[0],e}function Ir(){const t=I.c(37),e=At(),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}=It(l),r=o==="1",[a,d]=$e(ll,!1),{width:c,wrapperRef:m,onStartResize:u,resetWidth:p}=Zn(),x=e;let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(es,{}),t[1]=f):f=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,v,y,j;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ve,{}),b=s.jsx(xe.TogglesSlot,{}),v=s.jsx(xe.TabsSlot,{className:"shrink-0"}),y=s.jsx(xe.CenterSlot,{}),j=s.jsx(xe.RightSlot,{}),t[4]=h,t[5]=b,t[6]=v,t[7]=y,t[8]=j):(h=t[4],b=t[5],v=t[6],y=t[7],j=t[8]);let _;t[9]!==g?(_=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:[f,g,h,b,v,y,j]})}),t[9]=g,t[10]=_):_=t[10];const C=_;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(Is,{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(il,{}),children:s.jsx(Cs,{})})})})}),t[12]=S):S=t[12];const w=S,k=x&&C,T=`${c}px`;let M;t[13]!==T?(M={"--sidebar-width":T,"--sidebar-width-icon":"3.125rem"},t[13]=T,t[14]=M):M=t[14];const $=M;let A;t[15]!==e||t[16]!==u||t[17]!==p?(A=!e&&s.jsxs(s.Fragment,{children:[s.jsx(nl,{}),s.jsx(Xn,{onPointerDown:u,onDoubleClick:p})]}),t[15]=e,t[16]=u,t[17]=p,t[18]=A):A=t[18];let z;t[19]!==$||t[20]!==A||t[21]!==m?(z=s.jsxs(Ts,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:$,children:[A,w]}),t[19]=$,t[20]=A,t[21]=m,t[22]=z):z=t[22];let R;t[23]!==e?(R=e&&s.jsx($n,{renderSidebar:rl}),t[23]=e,t[24]=R):R=t[24];let E;t[25]!==i||t[26]!==r?(E=r&&s.jsx(Wn,{siteUrl:i}),t[25]=i,t[26]=r,t[27]=E):E=t[27];let O;t[28]!==k||t[29]!==z||t[30]!==R||t[31]!==E?(O=s.jsx(jn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,z,R,E]})}),t[28]=k,t[29]=z,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(wn,{children:s.jsx(xe.Provider,{children:s.jsx(Ps,{open:a,onOpenChange:d,children:O})})}),t[33]=d,t[34]=a,t[35]=O,t[36]=D):D=t[36],D}function rl(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(ol,{onClose:e})})})}export{Ir as default};