decocms 4.454.1 → 4.455.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 (359) hide show
  1. package/dist/client/assets/{AlertCircle-3t4CitpU.js → AlertCircle-BOPAUEgU.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B9ltWb3N.js → AreaChart-CJHdSsRl.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BbJmgkdx.js → ArrowLeft-DGlO1CKr.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DQk9lIXC.js → ArrowUp-Duh-8Vv0.js} +1 -1
  5. package/dist/client/assets/{Building02-FDWlk2dX.js → Building02-D_rXBsfQ.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-BJJpA_Vw.js → CartesianChart-DIS9sPOp.js} +1 -1
  7. package/dist/client/assets/{Check-BhlN5Gfa.js → Check-CcPSzxsY.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DP_Yeb-b.js → CheckCircle-CxJ9MBI3.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BUjD5px7.js → ChevronUp-C9klasvw.js} +1 -1
  10. package/dist/client/assets/{Copy01-B7ecNUq1.js → Copy01-ByHdq7k3.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-DylNWQDW.js → CreditCard01-D7Ll8vXp.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CMBMcjBX.js → DotsVertical-CXVrXTYw.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-DYl-NvRS.js → ErrorBarContext-D4SFBJLe.js} +1 -1
  14. package/dist/client/assets/{Image01-jyAhhinO.js → Image01-DAe5wd3u.js} +1 -1
  15. package/dist/client/assets/{Key01-DwEPbnXb.js → Key01-Dje7twgn.js} +1 -1
  16. package/dist/client/assets/{Line-98LUvvSk.js → Line-p8cNw9wz.js} +1 -1
  17. package/dist/client/assets/{Link01-D8H87QlU.js → Link01-BFa5_pnw.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-FGx4hlpz.js → LinkBroken01-BQ3rvf4O.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-Chk3wQjH.js → LinkExternal01-ChFFafWR.js} +1 -1
  20. package/dist/client/assets/{Monitor01-C4DfOzWo.js → Monitor01-tvCvi4o_.js} +1 -1
  21. package/dist/client/assets/{Palette-92eAR3c0.js → Palette-BFtTwWPg.js} +1 -1
  22. package/dist/client/assets/{Plus-CLQei2e6.js → Plus-Dk5G0eGJ.js} +1 -1
  23. package/dist/client/assets/{SearchMd-B4g7zoIg.js → SearchMd-DJptVqPP.js} +1 -1
  24. package/dist/client/assets/{Sector-D4jvfeB8.js → Sector-CoYmht1l.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-DJPwdB_I.js → ShoppingBag01-mUPmqGRd.js} +1 -1
  26. package/dist/client/assets/{Sun-D28dVpFO.js → Sun-Bl8Ky_if.js} +1 -1
  27. package/dist/client/assets/{Tool01-DyzplouF.js → Tool01-CGCC9pfF.js} +1 -1
  28. package/dist/client/assets/{Trash01-B2AvA9FK.js → Trash01-BA-bFjuS.js} +1 -1
  29. package/dist/client/assets/{Upload01-_iBVm55R.js → Upload01-C13aB89v.js} +1 -1
  30. package/dist/client/assets/{User01-DuKYzVz8.js → User01-B42bcRzQ.js} +1 -1
  31. package/dist/client/assets/{UserSquare-CI-KdVX2.js → UserSquare-B6-k4uk5.js} +1 -1
  32. package/dist/client/assets/{Users01-utuHNJ9R.js → Users01-BmXeKAri.js} +1 -1
  33. package/dist/client/assets/{X-BQXAAYgl.js → X-BdtW9stL.js} +1 -1
  34. package/dist/client/assets/{XAxis-OsjV83Ou.js → XAxis-G213xRid.js} +1 -1
  35. package/dist/client/assets/{XClose-KUaLXy6Q.js → XClose-Bsj_jKUE.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-B0FMI__D.js → ZoomOut-BQf_lYpX.js} +1 -1
  37. package/dist/client/assets/{access-gate-DHNHQ9zE.js → access-gate-BtTwTt-9.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog--aaGSX_P.js → add-connection-dialog-CwnC8yt-.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-HWaoA2oR.js → agent-analytics-CPj4bxgs.js} +1 -1
  40. package/dist/client/assets/agent-app-CjNO2lXq.js +1 -0
  41. package/dist/client/assets/{agent-assets-Cr-W811X.js → agent-assets-D5PkhLx3.js} +1 -1
  42. package/dist/client/assets/{agent-automation-l2cgkKU7.js → agent-automation-Cd6QYcZt.js} +1 -1
  43. package/dist/client/assets/{agent-automations-CHAZrKqa.js → agent-automations-WUChl97S.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-CWEmNdK2.js → agent-connect-sources-BTKe88uu.js} +1 -1
  45. package/dist/client/assets/agent-deck-BBsYONOP.js +1 -0
  46. package/dist/client/assets/{agent-e2e-NYmfDbZa.js → agent-e2e-D92Tz-G3.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-CLCcfrbN.js → agent-experiments-B5NLiDa9.js} +1 -1
  48. package/dist/client/assets/{agent-file-BIEk1dmU.js → agent-file-BlaR5see.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-CO_rhibd.js → agent-hosting-CoW01d6P.js} +1 -1
  50. package/dist/client/assets/{agent-icon-1OqzsUAE.js → agent-icon-QobcC4y1.js} +1 -1
  51. package/dist/client/assets/agent-library-DJDlIAqS.js +1 -0
  52. package/dist/client/assets/agent-library-file-CZjl7KSc.js +1 -0
  53. package/dist/client/assets/{agent-monitor-BmsHZAPv.js → agent-monitor-B-qOXS0c.js} +1 -1
  54. package/dist/client/assets/{agent-overview-Ct3DWuXE.js → agent-overview-CLWCQeaZ.js} +1 -1
  55. package/dist/client/assets/agent-settings-DhGEY9it.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-CRZzqyQE.js → agent-site-editor-DFNItXi0.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-D1HLX1NJ.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-DSBHbBbR.js → agent-site-editor-content-DeSoO3Vu.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-BxrT5UM7.js → agent-site-editor-preview-BQKa6vcQ.js} +3 -3
  60. package/dist/client/assets/agent-view-YbbJ0c-k.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-mRjTZUSW.js → agent-view-guard-BggSlJ4I.js} +1 -1
  62. package/dist/client/assets/{agents-list-BK_MtQHd.js → agents-list-Ckh7S6i4.js} +1 -1
  63. package/dist/client/assets/{ai-providers-wWFphB_9.js → ai-providers-KNbVRi9R.js} +2 -2
  64. package/dist/client/assets/{alert-BDcbHG2K.js → alert-BZ6uRdL8.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-BfxfbeRo.js → alert-dialog-13GPwGkk.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-CCrJWAzF.js → analytics-sections-C4iGKBOV.js} +1 -1
  67. package/dist/client/assets/{api-keys-44_etvo0.js → api-keys-Btl9HmTY.js} +1 -1
  68. package/dist/client/assets/api-keys-C1C00ELj.js +1 -0
  69. package/dist/client/assets/app-editor-Cr-wsjho.js +1 -0
  70. package/dist/client/assets/{asset-utils-zoNZYT_Y.js → asset-utils-B4wnf4gp.js} +1 -1
  71. package/dist/client/assets/{auth-Be85fS22.js → auth-BMIwdKU8.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-CTdxuzGz.js → auth-catchall-CsvXshlN.js} +1 -1
  73. package/dist/client/assets/{auth-entry-9WVbDTgn.js → auth-entry-BuNH69Nv.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-Bd3Wv1Ul.js → auth-split-layout-rkoJUdAV.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-DZ9TfDha.js → authenticate-and-persist-oauth-DWogyy0B.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-BbKXgF-R.js → automation-list-row-db5LJ5pV.js} +1 -1
  77. package/dist/client/assets/{automation-runs-YorECl9g.js → automation-runs-_74LLZTB.js} +1 -1
  78. package/dist/client/assets/automations-qyXzvoeZ.js +1 -0
  79. package/dist/client/assets/{autosend-CRAaDm47.js → autosend-B5Obavo-.js} +1 -1
  80. package/dist/client/assets/{avatar-DPiZM9JI.js → avatar-Bpp_lL_f.js} +1 -1
  81. package/dist/client/assets/{badge-C70X12A9.js → badge-DTNkOzY0.js} +1 -1
  82. package/dist/client/assets/{block-document-Bb13K9Xx.js → block-document-BLOu51_T.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-tiBiDTnV.js → blocks-preview-workspace-context-BmjkHogK.js} +1 -1
  84. package/dist/client/assets/{blog-schema-CrmLbu-L.js → blog-schema-B4_qQgjF.js} +1 -1
  85. package/dist/client/assets/{buckets-BakoSY5F.js → buckets-CCNSYAgt.js} +1 -1
  86. package/dist/client/assets/{build-improve-prompt-doc-BdY8sMUa.js → build-improve-prompt-doc-oJt1CVIT.js} +1 -1
  87. package/dist/client/assets/{calendar-Xr0_X-dJ.js → calendar-BRUBvVES.js} +1 -1
  88. package/dist/client/assets/{capability-load-error-DEOoZYRD.js → capability-load-error-th8zEGOp.js} +1 -1
  89. package/dist/client/assets/{category-editor-CUD3lDBR.js → category-editor-CRqB5ots.js} +1 -1
  90. package/dist/client/assets/{chart-CdkOOcwe.js → chart-DBFqaeAD.js} +1 -1
  91. package/dist/client/assets/{chat-context-SQR_HnrV.js → chat-context-BHWxNMFT.js} +6 -6
  92. package/dist/client/assets/{chat-draft-ClSxrs12.js → chat-draft-SnGEiSWm.js} +1 -1
  93. package/dist/client/assets/{checkbox-dRd9g2H5.js → checkbox-DuccoC4e.js} +1 -1
  94. package/dist/client/assets/{choose-editor-YVWzNcML.js → choose-editor-Blu_E7S8.js} +1 -1
  95. package/dist/client/assets/{claim-phase-copy-CiHmryra.js → claim-phase-copy-J9IiJiw_.js} +1 -1
  96. package/dist/client/assets/{cli-auth-success-zKCh9sGG.js → cli-auth-success-g5vIj6jD.js} +1 -1
  97. package/dist/client/assets/{client-icons-wzblqipX.js → client-icons-ByIvBqps.js} +1 -1
  98. package/dist/client/assets/{collapsible-CgYSDpXy.js → collapsible-qdaAxaaw.js} +1 -1
  99. package/dist/client/assets/{collection-detail-DImjCLH0.js → collection-detail-CRpVPceB.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-ySPfNWKF.js → collection-display-button-CAE4H1Z5.js} +1 -1
  101. package/dist/client/assets/{collection-search-Daq9kKuN.js → collection-search-BG7vK4NS.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-CP9uIvN_.js → collection-table-wrapper-C-F_T5Eb.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-DtjUs1A5.js → collection-tabs-DrZNeSEC.js} +1 -1
  104. package/dist/client/assets/{column-rules-Bo9Qbi1T.js → column-rules-C1VVvSzv.js} +1 -1
  105. package/dist/client/assets/{combobox-Ccd0xh39.js → combobox-B0tRCuGZ.js} +1 -1
  106. package/dist/client/assets/{command-a4IN63yc.js → command-D4xFqyr9.js} +1 -1
  107. package/dist/client/assets/{companion-mcps-section-BS-i6Wh4.js → companion-mcps-section-Cz5vCHft.js} +1 -1
  108. package/dist/client/assets/{config-BQQbHVQ7.js → config-DPczwNxh.js} +1 -1
  109. package/dist/client/assets/{connect-layout-BOuFTHKB.js → connect-layout-B5AnMnce.js} +1 -1
  110. package/dist/client/assets/{connect-vvgWKwgp.js → connect-pk9RQf7E.js} +1 -1
  111. package/dist/client/assets/{connection-CAG14zGZ.js → connection-BBVDOaSM.js} +1 -1
  112. package/dist/client/assets/{connection-card-ACWoimrM.js → connection-card-D1TMmLIT.js} +1 -1
  113. package/dist/client/assets/{connection-detail-B8Xtv2Ww.js → connection-detail-DQ776dHS.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-BxVe0XvV.js → connection-form-helpers-CFQwZ1sv.js} +1 -1
  115. package/dist/client/assets/{connections-BX7Kd5-m.js → connections-D5_-1i7h.js} +1 -1
  116. package/dist/client/assets/{context-DuwSYB-v.js → context-BzZmRn5A.js} +1 -1
  117. package/dist/client/assets/{context-menu-Db5SVKVy.js → context-menu-Dt0_Wi5C.js} +1 -1
  118. package/dist/client/assets/{create-organization-dialog-zyq81keC.js → create-organization-dialog-SVvYPMqI.js} +1 -1
  119. package/dist/client/assets/{daily-pulse-BLOj9QcX.js → daily-pulse-Dy2ScJNC.js} +1 -1
  120. package/dist/client/assets/{decopilot-DboBD55M.js → decopilot-Bh5nOuj8.js} +1 -1
  121. package/dist/client/assets/{device-hint-Czp4quXE.js → device-hint-BWrI1ZAV.js} +1 -1
  122. package/dist/client/assets/{dialog--2DE59f4.js → dialog-CwJ0Tacd.js} +1 -1
  123. package/dist/client/assets/{discover-Bh29hObV.js → discover-BN5fZmxX.js} +1 -1
  124. package/dist/client/assets/{domain-settings-ComV0r-h.js → domain-settings-C0ggYD-b.js} +1 -1
  125. package/dist/client/assets/{download-app-dialog-C3Ji56be.js → download-app-dialog-BlTQi4L1.js} +1 -1
  126. package/dist/client/assets/{drawer-CmCYRv71.js → drawer-LGekY388.js} +1 -1
  127. package/dist/client/assets/{editor-Q8fTwJVK.js → editor-DIJFF-Rn.js} +3 -3
  128. package/dist/client/assets/{empty-state-iV41QFUB.js → empty-state-Db66egMr.js} +1 -1
  129. package/dist/client/assets/{empty-state-Ba4Lmj53.js → empty-state-DdDKihxt.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-zlkqkzoy.js → extract-connection-data-BZKTCWVm.js} +1 -1
  131. package/dist/client/assets/{feature-gate-Bc3gv9R6.js → feature-gate-DIpT85T7.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-COlGAU5V.js → feature-paywall--RganMza.js} +1 -1
  133. package/dist/client/assets/{file-explorer-D0NYENQh.js → file-explorer-B0caqImY.js} +1 -1
  134. package/dist/client/assets/{file-preview-BK6HWgQz.js → file-preview-BVUwkvqy.js} +1 -1
  135. package/dist/client/assets/{file-share-button-BSE3y3HH.js → file-share-button-Dfx-yCi-.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-Hh_qpvql.js → file-type-icon-CYHSeMg9.js} +1 -1
  137. package/dist/client/assets/flat-project-CXofx1Tp.js +1 -0
  138. package/dist/client/assets/{folder-icon-CKdtOEi8.js → folder-icon-Bz05bjxQ.js} +1 -1
  139. package/dist/client/assets/{form-es3qsNvx.js → form-DXEENu_8.js} +1 -1
  140. package/dist/client/assets/{gateway-client-BI4FJ_tT.js → gateway-client-DafKkh5Q.js} +1 -1
  141. package/dist/client/assets/{general-B-jSci0b.js → general-P5nYRAWt.js} +1 -1
  142. package/dist/client/assets/{home-DQoJZrnn.js → home-C9qFKdi5.js} +1 -1
  143. package/dist/client/assets/{icon-button-BRiA9kiV.js → icon-button-c-SlONOU.js} +1 -1
  144. package/dist/client/assets/{index-0zdxHEgU.js → index-0glLJTM3.js} +1 -1
  145. package/dist/client/assets/{index-D7hYEfbN.js → index-BOGZM7Pw.js} +3 -3
  146. package/dist/client/assets/{index-DtMNfpk7.js → index-CaP5SDB2.js} +1 -1
  147. package/dist/client/assets/{index-CYlLocPz.js → index-Ccz5AaI_.js} +1 -1
  148. package/dist/client/assets/{index-DjtXLy0g.js → index-D9bgHbh-.js} +1 -1
  149. package/dist/client/assets/{index-CFDmgtf-.js → index-DGWe6sla.js} +1 -1
  150. package/dist/client/assets/{index-BabIEbYv.js → index-DK7oXPIL.js} +1 -1
  151. package/dist/client/assets/{index-BsC6xORW.js → index-Dl3JXElC.js} +1 -1
  152. package/dist/client/assets/{index-BX4WRpMk.js → index-DlDzsxeJ.js} +1 -1
  153. package/dist/client/assets/{index-C69CS_86.js → index-DuKSozhT.js} +1 -1
  154. package/dist/client/assets/{index-DsvD9a73.js → index-KD5FDUeP.js} +1 -1
  155. package/dist/client/assets/{index-DC6klush.js → index-ZDbB-PVr.js} +1 -1
  156. package/dist/client/assets/{index-B8VGzyyA.js → index-ehY3MQSN.js} +3 -3
  157. package/dist/client/assets/{index-nwj1WYdQ.js → index-mRG9os_M.js} +1 -1
  158. package/dist/client/assets/{index-redirect-DsGrdHfc.js → index-redirect-zukIYzlP.js} +1 -1
  159. package/dist/client/assets/{index-Bie3Yt7i.js → index-txkdKzZ6.js} +1 -1
  160. package/dist/client/assets/{infiniteQueryObserver-rN5E5eR_.js → infiniteQueryObserver-CHVbl4Al.js} +1 -1
  161. package/dist/client/assets/{infra-billing-STGTbKqw.js → infra-billing-D94tvu0v.js} +1 -1
  162. package/dist/client/assets/{input-B5SM5NFH.js → input-C0ZWiiGy.js} +1 -1
  163. package/dist/client/assets/{input-BhyogJV0.js → input-Cbyu0LGy.js} +1 -1
  164. package/dist/client/assets/{input-C3UtPyeS.js → input-qBVmxar0.js} +3 -3
  165. package/dist/client/assets/{integration-icon-51EB-LjE.js → integration-icon-DUuPtqFs.js} +1 -1
  166. package/dist/client/assets/{label-BkKmAPrZ.js → label-CKukDnnz.js} +1 -1
  167. package/dist/client/assets/{layout-DIdrXHfY.js → layout-DZr1Z4Vi.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-CuL-w8Ck.js → legacy-agents-deep-O_a0ihqp.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-CIckQwOA.js → legacy-main-redirect-B6sO18wU.js} +1 -1
  170. package/dist/client/assets/library-DOnOZswk.js +1 -0
  171. package/dist/client/assets/{library-tab-ayplxw28.js → library-tab-CGsiOX6E.js} +1 -1
  172. package/dist/client/assets/{login-Dh7dGGrt.js → login-hdkcuXfq.js} +1 -1
  173. package/dist/client/assets/{markdown-DI9weIuO.js → markdown-DNk_PyOf.js} +1 -1
  174. package/dist/client/assets/{mcp-app-renderer-B-h9M4vf.js → mcp-app-renderer-CJ5u3TPG.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-q_WDhaFd.js → mcp-oauth-cSH4PfZY.js} +1 -1
  176. package/dist/client/assets/{members-Duvbhxmd.js → members-C-_zRkLX.js} +1 -1
  177. package/dist/client/assets/{memory-B3Yr64no.js → memory-DLRzHb1w.js} +2 -2
  178. package/dist/client/assets/{mini-report-page-BYBUcf9i.js → mini-report-page-CFzUUmyT.js} +1 -1
  179. package/dist/client/assets/{mock-board-DkM9WLsL.js → mock-board-Si0mPE9y.js} +1 -1
  180. package/dist/client/assets/{monaco-editor-BlkFUb0T.js → monaco-editor-C4uDUO_q.js} +1 -1
  181. package/dist/client/assets/{monitoring-stats-row-D91cPMXx.js → monitoring-stats-row-CllZiW9E.js} +1 -1
  182. package/dist/client/assets/{multi-select-CljFfUTQ.js → multi-select-DiHVOPXR.js} +1 -1
  183. package/dist/client/assets/{mustache-Bit9MGJY.js → mustache-C7f92o5k.js} +1 -1
  184. package/dist/client/assets/{new-project-dialog-i2AjdXpL.js → new-project-dialog-CiCMTA1C.js} +1 -1
  185. package/dist/client/assets/{oauth-callback-Manl7zcf.js → oauth-callback-Cb4S9fwE.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-ai-provider-BuFa1JC9.js → oauth-callback-ai-provider-CD_A5mvP.js} +1 -1
  187. package/dist/client/assets/{onboarding-Cw4aLFQT.js → onboarding-B2wyTbOl.js} +1 -1
  188. package/dist/client/assets/{openai-conversation-BiyOmfLa.js → openai-conversation-WSjKAhvH.js} +1 -1
  189. package/dist/client/assets/{optimistic-project-sidebar-views-C5dOi8KI.js → optimistic-project-sidebar-views-BBFtzDV4.js} +1 -1
  190. package/dist/client/assets/{org-file-open-context-CjL3Ry7C.js → org-file-open-context--_UQSpdl.js} +1 -1
  191. package/dist/client/assets/{organization-choice-CcPvavKF.js → organization-choice-Bs4XFXgS.js} +1 -1
  192. package/dist/client/assets/{orgs-5BU6BjBI.js → orgs-DzdQslwf.js} +1 -1
  193. package/dist/client/assets/{page-seo-form-BImxCgsk.js → page-seo-form-vON-l1GZ.js} +1 -1
  194. package/dist/client/assets/{pair-DULI5So-.js → pair-IorbWgZn.js} +1 -1
  195. package/dist/client/assets/{plan-ladder-Ct95x7_d.js → plan-ladder-DSodyL3Q.js} +1 -1
  196. package/dist/client/assets/{popover-Ddsbw8vr.js → popover-DvKxqM1r.js} +1 -1
  197. package/dist/client/assets/{post-calendar-Gh6FGDL8.js → post-calendar-DiEfiKrj.js} +1 -1
  198. package/dist/client/assets/{post-editor-CcE1K4mb.js → post-editor-HV3DNHNH.js} +1 -1
  199. package/dist/client/assets/{preview-content-CsmLbvef.js → preview-content-Bd42BahA.js} +1 -1
  200. package/dist/client/assets/{preview-dialog-Db2IsUqO.js → preview-dialog-DBXVi9mo.js} +1 -1
  201. package/dist/client/assets/{profile-gQCg01Pg.js → profile-C62VIFSL.js} +1 -1
  202. package/dist/client/assets/{project-app-view-D5z0m56j.js → project-app-view-DYaaNrnC.js} +1 -1
  203. package/dist/client/assets/{project-feed-CectffXQ.js → project-feed-DDiBGrsP.js} +1 -1
  204. package/dist/client/assets/{project-icon-zUFSPGzx.js → project-icon-DQrOXeEW.js} +1 -1
  205. package/dist/client/assets/project-reports-HuiRnlkO.js +1 -0
  206. package/dist/client/assets/project-tasks-Ck5F7vye.js +1 -0
  207. package/dist/client/assets/{projects-09qVLtvI.js → projects-C-62vsjh.js} +1 -1
  208. package/dist/client/assets/{projects-empty-state-DSuG10IT.js → projects-empty-state-DllkKglW.js} +1 -1
  209. package/dist/client/assets/{prompts-BlWGK9gm.js → prompts-53mGvQlZ.js} +1 -1
  210. package/dist/client/assets/record-editor-BAdOwM42.js +1 -0
  211. package/dist/client/assets/{redirect-editor-Dy4B9zEa.js → redirect-editor-C2CflIXw.js} +1 -1
  212. package/dist/client/assets/{reports-DwZ09kdh.js → reports-DQcmX2XK.js} +1 -1
  213. package/dist/client/assets/reports-Dyr-R6yJ.js +1 -0
  214. package/dist/client/assets/{reports-onboarding-BbuiybIk.js → reports-onboarding-DRfSptAM.js} +1 -1
  215. package/dist/client/assets/{reports-tab-CSSCOCZm.js → reports-tab-BGRnmmWF.js} +2 -2
  216. package/dist/client/assets/{repositories-DsV9QIrS.js → repositories-ltvP9f3v.js} +1 -1
  217. package/dist/client/assets/{repository-binding-BPtbugRj.js → repository-binding-CEDkA6og.js} +1 -1
  218. package/dist/client/assets/{repository-import-picker-DY8NkFcl.js → repository-import-picker-BT060hhl.js} +1 -1
  219. package/dist/client/assets/{repository-picker-Bu_60yv3.js → repository-picker-Bowb7b9f.js} +1 -1
  220. package/dist/client/assets/{require-capability-BO2WrDZB.js → require-capability-DN9BJlNM.js} +1 -1
  221. package/dist/client/assets/{required-auth-layout-BgvVX7TS.js → required-auth-layout-CKgEUo-z.js} +1 -1
  222. package/dist/client/assets/{reset-password-BoH3BEyI.js → reset-password-B6iTpX4u.js} +1 -1
  223. package/dist/client/assets/{resizable-DMRcTvG9.js → resizable-Cd8jDRB7.js} +1 -1
  224. package/dist/client/assets/{resolve-tab-icon-CXAXH1c6.js → resolve-tab-icon-X0M-w-vv.js} +1 -1
  225. package/dist/client/assets/{review-settings-p3dyFLfh.js → review-settings-CsnvQ-Qq.js} +1 -1
  226. package/dist/client/assets/{rich-text-link-control-CKnN__KM.js → rich-text-link-control-ClsuTwdo.js} +1 -1
  227. package/dist/client/assets/{roles-DO1mdKqZ.js → roles-CU8q7gVb.js} +1 -1
  228. package/dist/client/assets/{route-ChNMAp77.js → route-CIn0WnXQ.js} +1 -1
  229. package/dist/client/assets/route-NLnkR9WP.js +1 -0
  230. package/dist/client/assets/route-qm6cYbsf.js +1 -0
  231. package/dist/client/assets/{runnable-block-editor-BT8tgJo5.js → runnable-block-editor-2ItVAsl7.js} +1 -1
  232. package/dist/client/assets/{sandbox-lifecycle-context-BJunzywm.js → sandbox-lifecycle-context-C0vkuH66.js} +1 -1
  233. package/dist/client/assets/{schema-gvXoFVGC.js → schema-W3hqtN1B.js} +1 -1
  234. package/dist/client/assets/{scroll-area-BGXFjpgk.js → scroll-area-BN7R6f0c.js} +1 -1
  235. package/dist/client/assets/{search-input-C9kf2QzG.js → search-input-dP8TWy_f.js} +1 -1
  236. package/dist/client/assets/{search-toggle-DxL1CEhR.js → search-toggle-BY33vUyT.js} +1 -1
  237. package/dist/client/assets/{secret-picker-CXDBfcj0.js → secret-picker-Bw0HhGwk.js} +1 -1
  238. package/dist/client/assets/{secrets-Bcm3gb-7.js → secrets-D3WU-wHx.js} +1 -1
  239. package/dist/client/assets/{sections-editor-7SLVjemW.js → sections-editor-Bnb_Ii_2.js} +1 -1
  240. package/dist/client/assets/{select-Bo385QnQ.js → select-CGC5E9nf.js} +1 -1
  241. package/dist/client/assets/{select-model-BtUoVLeN.js → select-model-B24PK9T9.js} +1 -1
  242. package/dist/client/assets/{seo-editor-Bws3I75q.js → seo-editor-C0eExFGM.js} +1 -1
  243. package/dist/client/assets/{separator-Bpa9Zb6K.js → separator-CJCi7EK2.js} +1 -1
  244. package/dist/client/assets/settings-tab-6YGWJaPP.js +5 -0
  245. package/dist/client/assets/{sheet-Bp0OaYM9.js → sheet-DOIzAtMq.js} +1 -1
  246. package/dist/client/assets/{shell-layout-DMqLVaPa.js → shell-layout-B9OaioSj.js} +1 -1
  247. package/dist/client/assets/{skills-CHvIydZj.js → skills-DdHXbE4c.js} +1 -1
  248. package/dist/client/assets/{sso-DzY1sSiB.js → sso-WAQdj9Pk.js} +1 -1
  249. package/dist/client/assets/{suggestion-jBsEBvox.js → suggestion-CotdwSyy.js} +2 -2
  250. package/dist/client/assets/{switch-O2yDEU3w.js → switch-Ctdc8it1.js} +1 -1
  251. package/dist/client/assets/{synced-repos-5PjWHzPH.js → synced-repos-DFq2CK-H.js} +1 -1
  252. package/dist/client/assets/{tab-icon-glyph--RZwkrwS.js → tab-icon-glyph-CXhMb9aF.js} +1 -1
  253. package/dist/client/assets/{table-cs-obaRn.js → table-BCWfTyhH.js} +1 -1
  254. package/dist/client/assets/{tabs-PK9QS4Is.js → tabs-BCc9oqWy.js} +1 -1
  255. package/dist/client/assets/{task-board-B1uWZU9K.js → task-board-Dh6sWb9t.js} +1 -1
  256. package/dist/client/assets/{task-route-DRf0NxDf.js → task-route-BGcHuycG.js} +1 -1
  257. package/dist/client/assets/{task-status-UjMHpR3_.js → task-status-CjAgmdGY.js} +1 -1
  258. package/dist/client/assets/{taskboard-analytics-DG49CdbS.js → taskboard-analytics-CgboMqfv.js} +1 -1
  259. package/dist/client/assets/{tasks-B5AEZlSg.js → tasks-CQrn-rBP.js} +1 -1
  260. package/dist/client/assets/tasks-L9jj-kWQ.js +1 -0
  261. package/dist/client/assets/{textarea-C8e48cUD.js → textarea-e3h0PKfc.js} +1 -1
  262. package/dist/client/assets/{thread-analytics-CfDkMr69.js → thread-analytics-u-mhBpUO.js} +1 -1
  263. package/dist/client/assets/{thread-button-RXmpO_s6.js → thread-button-D5H005fQ.js} +1 -1
  264. package/dist/client/assets/{thread-intent-DD3seycr.js → thread-intent-CNOpHUCE.js} +1 -1
  265. package/dist/client/assets/{thread-route-D5UsJN7V.js → thread-route-DU2TTrlu.js} +1 -1
  266. package/dist/client/assets/{thread-route-BurLlqRF.js → thread-route-esGiDSRu.js} +1 -1
  267. package/dist/client/assets/{thread-sheet-body-CYr9C8k-.js → thread-sheet-body-Bn55RhIb.js} +1 -1
  268. package/dist/client/assets/{toggle-group-CWajsWIH.js → toggle-group-BUS82Kqf.js} +1 -1
  269. package/dist/client/assets/{toolbar-icon-button-ClIJFPkR.js → toolbar-icon-button-B8tRovqj.js} +1 -1
  270. package/dist/client/assets/{tooltip-Ch7JwSjZ.js → tooltip-DoWVDYxv.js} +1 -1
  271. package/dist/client/assets/{track-yFV_-KUI.js → track-slrdEZ2N.js} +1 -1
  272. package/dist/client/assets/{types-DCK-IvKM.js → types-BlCCVKMl.js} +3 -3
  273. package/dist/client/assets/{usage-stats-DHCINwxo.js → usage-stats-ELYwp3GN.js} +1 -1
  274. package/dist/client/assets/{use-ai-providers-shWbOxLc.js → use-ai-providers-BuwFLwdC.js} +1 -1
  275. package/dist/client/assets/{use-automations-BuTfAhMt.js → use-automations-B8HKsWEy.js} +1 -1
  276. package/dist/client/assets/{use-autosave-BPE7QfwG.js → use-autosave-77sC71ka.js} +1 -1
  277. package/dist/client/assets/{use-chat-layout-state-CNWV4oOZ.js → use-chat-layout-state-Cd1SDWUO.js} +1 -1
  278. package/dist/client/assets/{use-clock-tick-CBfGh-8T.js → use-clock-tick-DkYE6iX2.js} +1 -1
  279. package/dist/client/assets/{use-connect-companion-DBuhvmdP.js → use-connect-companion-sjR8VGIZ.js} +1 -1
  280. package/dist/client/assets/{use-connection-Roi-SyxA.js → use-connection-C4j2pJbz.js} +1 -1
  281. package/dist/client/assets/{use-copy-DNeNHO02.js → use-copy-BiyQhtNG.js} +1 -1
  282. package/dist/client/assets/{use-create-virtual-mcp-ylON-lmG.js → use-create-virtual-mcp-C0a_KTOz.js} +1 -1
  283. package/dist/client/assets/{use-date-fns-locale--kApxv3j.js → use-date-fns-locale-dFt0Hwsj.js} +1 -1
  284. package/dist/client/assets/{use-debounced-autosave-BGrGYaC5.js → use-debounced-autosave-D58XDw_5.js} +1 -1
  285. package/dist/client/assets/{use-debounced-value-DtOEJwy7.js → use-debounced-value-C1TKx6na.js} +1 -1
  286. package/dist/client/assets/{use-deco-credits-CxB_Tg6p.js → use-deco-credits--by3KJXE.js} +1 -1
  287. package/dist/client/assets/{use-decopilot-events-Dz93drkG.js → use-decopilot-events-DL6Ppxgb.js} +1 -1
  288. package/dist/client/assets/{use-delete-connection-BHS_Ab_3.js → use-delete-connection-Cc8dNIWp.js} +1 -1
  289. package/dist/client/assets/{use-deployment-admin-xqgTl_RK.js → use-deployment-admin-D0_O_QSr.js} +1 -1
  290. package/dist/client/assets/{use-fast-preview-draft-url-D8zoxDMW.js → use-fast-preview-draft-url-KJgu2gHZ.js} +1 -1
  291. package/dist/client/assets/{use-file-configs-BHKDkTjC.js → use-file-configs-j21JL3yE.js} +1 -1
  292. package/dist/client/assets/{use-infinite-scroll-CIbeXSaG.js → use-infinite-scroll-BAQqTty_.js} +1 -1
  293. package/dist/client/assets/{use-join-requests-Cs8YUxtJ.js → use-join-requests-B2449AYt.js} +1 -1
  294. package/dist/client/assets/{use-main-panel-tabs-B2ztRrej.js → use-main-panel-tabs-NhZJRbOq.js} +1 -1
  295. package/dist/client/assets/{use-mcp-auth-status-BtDthgG6.js → use-mcp-auth-status-CG-b2BD1.js} +1 -1
  296. package/dist/client/assets/{use-mcp-client-Dv0wmo61.js → use-mcp-client-9jF2B0Tz.js} +1 -1
  297. package/dist/client/assets/{use-mcp-prompts-DaqWVfi5.js → use-mcp-prompts-DNAsQeJA.js} +1 -1
  298. package/dist/client/assets/{use-mcp-tools-DjBYc1XK.js → use-mcp-tools-Dbm0kb0W.js} +1 -1
  299. package/dist/client/assets/{use-members-CBbGro39.js → use-members-CmQfPBAn.js} +1 -1
  300. package/dist/client/assets/{use-mobile-DrPHToxA.js → use-mobile-9GiVme_1.js} +1 -1
  301. package/dist/client/assets/use-navigate-to-agent-CSgL519X.js +1 -0
  302. package/dist/client/assets/use-new-blocks-editor-CQ_89Cdt.js +1 -0
  303. package/dist/client/assets/{use-open-billing-url-Bk3SlqL_.js → use-open-billing-url-CIF0WByS.js} +1 -1
  304. package/dist/client/assets/{use-org-auth-client-CwT9KERJ.js → use-org-auth-client-BBAyh5Tz.js} +1 -1
  305. package/dist/client/assets/{use-org-fs-BONY9uyR.js → use-org-fs-DF_BlZtj.js} +1 -1
  306. package/dist/client/assets/{use-org-repo-syncs-W4ado92l.js → use-org-repo-syncs-kX31P2gW.js} +1 -1
  307. package/dist/client/assets/{use-org-sso-B7-QiCKC.js → use-org-sso-BmivjhbI.js} +1 -1
  308. package/dist/client/assets/{use-organization-roles-DGag2mZt.js → use-organization-roles-DEPf_2N_.js} +1 -1
  309. package/dist/client/assets/{use-organization-settings-C3-_kI_g.js → use-organization-settings-BgEtBsl7.js} +1 -1
  310. package/dist/client/assets/{use-panel-navigate-Ck4N-ZB8.js → use-panel-navigate-4MoLzTpw.js} +1 -1
  311. package/dist/client/assets/{use-project-scope-Dy6ai4MQ.js → use-project-scope-CUYDg9gO.js} +1 -1
  312. package/dist/client/assets/{use-releases-_59HzI08.js → use-releases-Dgq67fk3.js} +1 -1
  313. package/dist/client/assets/{use-reports-diagnostic-BMuHEtbE.js → use-reports-diagnostic-D9eBWCCe.js} +1 -1
  314. package/dist/client/assets/{use-secrets-B6JGnS88.js → use-secrets-D-qkpxrJ.js} +1 -1
  315. package/dist/client/assets/{use-section-preview-base-DJojO_0E.js → use-section-preview-base-LT3afhUQ.js} +1 -1
  316. package/dist/client/assets/{use-session-runtime-DdeuwCmv.js → use-session-runtime-C1jT9-WF.js} +1 -1
  317. package/dist/client/assets/{use-tags-WETmD8h-.js → use-tags-D0iZ2cgD.js} +1 -1
  318. package/dist/client/assets/{use-task-board-analytics-BjPzwnMF.js → use-task-board-analytics-B0Mv4i0Z.js} +1 -1
  319. package/dist/client/assets/{use-task-board-events-UvXF0OvU.js → use-task-board-events-Q5BqAnUD.js} +1 -1
  320. package/dist/client/assets/{use-task-metadata-DQimkwOj.js → use-task-metadata-B9tqJ9GP.js} +1 -1
  321. package/dist/client/assets/{use-thread-analytics-DdFSZ4lk.js → use-thread-analytics-D5tK9O4P.js} +1 -1
  322. package/dist/client/assets/{use-thread-outputs-ByokR1-M.js → use-thread-outputs-CDQWo15F.js} +1 -1
  323. package/dist/client/assets/useInfiniteQuery-pxyjNhep.js +1 -0
  324. package/dist/client/assets/{useQueries-B78AFarR.js → useQueries-DvMDA4qD.js} +1 -1
  325. package/dist/client/assets/useSuspenseInfiniteQuery-Cf0qcKEf.js +1 -0
  326. package/dist/client/assets/{users-DBjWYDrd.js → users-BE1CJVdF.js} +1 -1
  327. package/dist/client/assets/{utils-rWt92hWs.js → utils-CZW3O45l.js} +1 -1
  328. package/dist/client/assets/{variant-calendar-7i4pMUsf.js → variant-calendar-C_oSHjpD.js} +1 -1
  329. package/dist/client/assets/{variant-matcher-override-BPuvqb9t.js → variant-matcher-override-B9Dx0Ujt.js} +1 -1
  330. package/dist/client/assets/{view-mode-toggle-Chs9e6xz.js → view-mode-toggle-BjrOeE_u.js} +1 -1
  331. package/dist/client/assets/{virtual-mcp-Dd7G1yTs.js → virtual-mcp-DkCjKqhT.js} +1 -1
  332. package/dist/client/index.html +1 -1
  333. package/dist/server/cli.js +1 -1
  334. package/dist/server/server.js +1 -1
  335. package/package.json +1 -1
  336. package/dist/client/assets/agent-app-CFW3XJJ3.js +0 -1
  337. package/dist/client/assets/agent-deck-DIqTNfuK.js +0 -1
  338. package/dist/client/assets/agent-library-CmW5qoRR.js +0 -1
  339. package/dist/client/assets/agent-library-file-BQ1asGOw.js +0 -1
  340. package/dist/client/assets/agent-settings-5O8PNLg6.js +0 -1
  341. package/dist/client/assets/agent-site-editor-code-DuPdAn6O.js +0 -2
  342. package/dist/client/assets/agent-view-DmLqbwZt.js +0 -1
  343. package/dist/client/assets/api-keys-UL1ho-y-.js +0 -1
  344. package/dist/client/assets/app-editor-BzUJsQbn.js +0 -1
  345. package/dist/client/assets/automations-CT6RAEzt.js +0 -1
  346. package/dist/client/assets/flat-project-BHnqWyb1.js +0 -1
  347. package/dist/client/assets/library-omm_OeKO.js +0 -1
  348. package/dist/client/assets/project-reports-DHC_HSC0.js +0 -1
  349. package/dist/client/assets/project-tasks-DzL0VTL5.js +0 -1
  350. package/dist/client/assets/record-editor-kiS_ZZYd.js +0 -1
  351. package/dist/client/assets/reports-DqySdKN5.js +0 -1
  352. package/dist/client/assets/route-6cBqBEib.js +0 -1
  353. package/dist/client/assets/route-CkWpASRI.js +0 -1
  354. package/dist/client/assets/settings-tab-CrMl0HQX.js +0 -5
  355. package/dist/client/assets/tasks-B8F8Dqa0.js +0 -1
  356. package/dist/client/assets/use-navigate-to-agent-B6Jnpp7k.js +0 -1
  357. package/dist/client/assets/use-new-blocks-editor-BQYMR1qS.js +0 -1
  358. package/dist/client/assets/useInfiniteQuery-CApTsxJ0.js +0 -1
  359. package/dist/client/assets/useSuspenseInfiniteQuery--aIXJiP3.js +0 -1
@@ -1 +1 @@
1
- import{c as He,U as At,V as Tt,K as Ne,m as bt}from"./index-D7hYEfbN.js";import{s as De}from"./thread-intent-DD3seycr.js";function hn(e){const t=He.c(12);let n;t[0]!==e?(n=Tt.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[i,o]=At(r,null);let c;t[2]!==i||t[3]!==e?(c=e?De(i):null,t[2]=i,t[3]=e,t[4]=c):c=t[4];const l=c;let p,b;t[5]!==o?(p=P=>o(De(P)),b=()=>o(null),t[5]=o,t[6]=p,t[7]=b):(p=t[6],b=t[7]);let R;return t[8]!==p||t[9]!==b||t[10]!==l?(R={url:l,setUrl:p,clear:b},t[8]=p,t[9]=b,t[10]=l,t[11]=R):R=t[11],R}function Ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function St(e,t,n){return["decofile-write",e,t,n]}function An(e,t,n){return{id:St(e,t,n).join(":")}}function qe(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function Rt(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function Et(e,t,n){e.setQueryData(Ne.decofileDraft(Ke(t)),n)}function Tn(e){const t=He.c(4);let n;t[0]!==e?(n=Ne.decofileDraft(e?Ke(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:kt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:i}=bt(r);return i??null}async function kt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function bn(e,t){const n=await fetch(qe(t),{cache:"no-store"});if(!n.ok){const i=new Error(`Failed to fetch decofile: ${n.status}`);throw i.status=n.status,i}const r=await n.json();return r.token&&Et(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function Sn(e,t){const n=await fetch(qe(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)return Rt(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function Ot(e){return e.replace(/\/+$/,"")||"/"}function Rn(e){return e.trim().replace(/^\/+|\/+$/g,"")}function Pt(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function En(e){const t=e.trim();return t?Pt(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const ge=/:([A-Za-z0-9_-]+)|\*/g;function kn(e){const t=[];for(const n of e.matchAll(ge)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function ze(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function On(e){e=ze(e);const t=[];let n=0;for(const r of e.matchAll(ge))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function Pn(e,t){return ze(e).replace(ge,(n,r)=>{const i=t[r??"*"]?.trim();return i?r!==void 0?encodeURIComponent(i):i.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function Ie(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function wn(e){return e.includes("@")}function Ue(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function $n(e,t){if(e===t)return!0;const n=Ue(e);return n?t===n||Ue(t)===n:!1}function J(e,t){const n=e.manifest?.blocks??{};for(const[r,i]of Object.entries(n))if(t in i)return r;return null}function Mn(e,t){return J(e,t)!==null}function ve(e,t){const n=J(e,t);return n!==null&&n.includes("sections")}function wt(e,t){const n=J(e,t);return n!==null&&n.includes("apps")}function $t(e,t){const n=J(e,t);return n!==null&&n.includes("matchers")}function ee(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function _e(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Ln="oklch(0.7278 0.151 289)",Mt="website/matchers/always.ts",Ge="website/matchers/never.ts",te="website/flags/multivariate.ts",Y="website/flags/multivariate/section.ts";function me(){return{__resolveType:Mt}}function F(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const Lt=12,jt=8,le=32,Vt=40,Ct="__SECTION_REF__";function ue(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function xe(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const i=n.properties?.__resolveType?.enum;return Array.isArray(i)&&typeof i[0]=="string"}const Bt="VideoWidget";function x(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Qe(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function he(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Ae(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Xe(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function Te(e,t){const n=t.manifest?.blocks??{};for(const l of Object.values(n))if(l[e])return l[e];const r=he(e)??Ae(e);if(r){for(const l of Xe(r.vendor,r.app))for(const p of Object.values(n))if(p[l])return p[l]}const i=Qe(e);for(const l of Object.values(n))if(l[i])return l[i];const o=t.schema??{};return(o.$defs??o.definitions??{})[i]?{$ref:`#/definitions/${i}`}:{}}function Ze(e,t){if(wt(e,t))return!0;const n=he(t)??Ae(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Xe(n.vendor,n.app).some(c=>c in r))return!0;const i=Qe(t),o=e.schema?.$defs??e.schema?.definitions??{};return i in o}function Dt(e){return e==="site/apps/site.ts"?!1:he(e)!==null||Ae(e)!==null}function Je(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=n.root??{},c=s=>{if(s.startsWith("#/root/")){const a=s.slice(7);return o[a]??{}}const u=s.split("/").pop()??"",v=i[u];return v||(u===Ct?o.sections??{}:{})};let l;typeof r.$ref=="string"?l=c(r.$ref):Object.keys(r).length>0?l=r:l=n;const p=s=>typeof s.$ref=="string"?c(s.$ref):s,b=s=>{const v=p(s).properties?.type;if(v){if(typeof v.const=="string")return v.const;if(typeof v.default=="string")return v.default;if(Array.isArray(v.enum)&&typeof v.enum[0]=="string")return v.enum[0]}},R=(s,u)=>{const v=p(s);return typeof v.title=="string"&&!v.title.startsWith("#")?v.title:u},P=(s,u=new Set)=>{if(typeof s.$ref!="string"||s.properties||s.anyOf||s.allOf||s.oneOf||s.type)return s;const v=s.$ref.split("/").pop()??"";return!v||u.has(v)?s:P(c(s.$ref),new Set([...u,v]))},H=s=>{const u=s.properties?.__resolveType?.enum;return Array.isArray(u)&&typeof u[0]=="string"?u[0]:void 0},Re=s=>H(s)!==void 0,Ee=(s,u=new Set)=>{if(typeof s.$ref!="string")return[];const v=s.$ref.split("/").pop()??"";if(!v||u.has(v))return[];const a=c(s.$ref),E=a.anyOf??a.oneOf;if(!Array.isArray(E))return[];const k=new Set([...u,v]);return E.flatMap(O=>Re(O)?[O]:Ee(O,k))},M=s=>{const u=s.hide;return u===!0||u==="true"},ke=s=>typeof s=="string"&&(s.includes("://")||!/\s/.test(s)&&(s.includes("|")||s.includes("&")||s.includes("@"))),G=(s,u=new Set,v=0)=>{if(v>Lt)return{};if(typeof s.$ref=="string"){const E=s.$ref.split("/").pop()??"";return u.has(E)?{}:G(c(s.$ref),new Set([...u,E]),v+1)}let a={};s.properties&&typeof s.properties=="object"&&(a={...a,...s.properties}),Array.isArray(s.required)&&(a.__required=[...x(a.__required),...x(s.required)]);for(const E of["allOf","anyOf","oneOf"]){const k=s[E];if(Array.isArray(k))for(const O of k){const L=x(a.__required),I=G(O,u,v+1);a={...a,...I};const $=E==="allOf"?[...L,...x(I.__required)]:L;$.length>0?a.__required=$:delete a.__required}}return a},D=(s,u=0,v=new Set)=>{let a=s,E;if(typeof s.$ref=="string"){a=c(s.$ref);const A=s.$ref.split("/").pop()??"";E=A,A===Bt&&!a.format&&(a={...a,format:"video-uri"})}a=P(a);const k=E!==void 0&&v.has(E),O=E!==void 0?new Set([...v,E]):v,L=(A,g,h,_=!0)=>!k&&(!_||h<=Vt)&&g<jt?D(A,g,O):void 0;let I;{const A=a.anyOf??a.oneOf;if(Array.isArray(A)){const g=A.filter(_=>!(_.type==="null"||_.type===null)),h=_=>{if(typeof _.const=="string"||typeof _.const=="number")return _.const;if(Array.isArray(_.enum)&&_.enum.length===1&&(typeof _.enum[0]=="string"||typeof _.enum[0]=="number"))return _.enum[0]};g.length>0&&g.every(_=>h(_)!==void 0)&&(I=g.map(_=>h(_)))}}let $,N,$e=!1;if(a.type)$=Array.isArray(a.type)?String(a.type.find(A=>A!=="null")??a.type[0]):String(a.type);else if(a.anyOf||a.oneOf){const g=(a.anyOf??a.oneOf).filter(h=>!(h.type==="null"||h.type===null));if(g.length===0)$="null";else if(g.length===1){const h=g[0];N=h,$=h.type?Array.isArray(h.type)?String(h.type[0]):String(h.type):typeof h.$ref=="string"?"object":"string"}else{if(I){const f=y=>typeof s[y]=="string"?s[y]:typeof a[y]=="string"?a[y]:void 0;return{type:"string",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enum:I,format:f("format"),options:f("options")}}const h=g.filter(Re),_=g.map(f=>P(f)).find(ue),se=g.filter(f=>!ue(P(f))).every(f=>typeof f.$ref=="string"||h.includes(f)),_t=h.some(f=>{const y=f.properties?.__resolveType?.enum;return Array.isArray(y)&&y[0]===te}),Le=()=>{const f=new Map;for(const S of[...h,...g.filter(m=>!h.includes(m)).flatMap(m=>Ee(m))]){const m=H(S);m&&!f.has(m)&&f.set(m,S)}const y=[...f].map(([S,m])=>({resolveType:S,title:typeof m.title=="string"?m.title:F(S),description:typeof m.description=="string"?m.description:void 0,schema:L(m,u+1,f.size)})),d=[];for(const S of g){if(h.includes(S)||typeof S.$ref!="string")continue;const m=c(S.$ref);let C;const ae=m.properties?.__resolveType;if(Array.isArray(ae?.enum)&&typeof ae.enum[0]=="string"&&(C=ae.enum[0]),!C&&Array.isArray(m.allOf))for(const ht of m.allOf){const ce=ht.properties?.__resolveType?.enum;if(Array.isArray(ce)&&typeof ce[0]=="string"){C=ce[0];break}}C&&d.push({resolveType:C,title:typeof m.title=="string"&&!m.title.startsWith("#")?m.title:F(C),description:typeof m.description=="string"?m.description:void 0,schema:L(m,u+1,g.length)})}const T=new Set(y.map(S=>S.resolveType)),w=[...y,...d.filter(S=>!T.has(S.resolveType))],j=g.filter(S=>!h.includes(S)),V=j.length===1&&!k?D(j[0],u+1,O):void 0;return{type:"block-ref",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,anyOfRefs:w,plainSchema:V,hidden:M(a)||M(s)?!0:void 0}};if(_){if(!xe(_,c)&&g.length>1&&se){const y=D(_,u+1,O),d=typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:y.title,T=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:y.description;return{...y,type:"array",title:d,description:T,loaderRef:h.length>0?{...Le(),title:d,description:T}:void 0}}if(_t){const y=D(_,u+1,O);return{...y,type:"array",title:typeof a.title=="string"?a.title:y.title,description:typeof a.description=="string"?a.description:y.description}}}if(h.length>0)return Le();const je=f=>{const y=p(f);if(typeof y.title=="string"&&Ie(y.title))return!0;const d=y.properties?.__resolveType?.enum;if(Array.isArray(d)&&typeof d[0]=="string")return!0;if(Array.isArray(y.allOf))for(const T of y.allOf){const w=T.properties?.__resolveType?.enum;if(Array.isArray(w)&&typeof w[0]=="string")return!0}return!1},Ve=g.map(f=>b(f));if(g.length>1&&Ve.every(f=>typeof f=="string")&&!g.some(je)){const f=g.map((y,d)=>{const T=p(y),w=Ve[d];return{resolveType:w,title:R(y,w),description:typeof T.description=="string"?T.description:void 0,discriminatorValue:w,schema:L(T,u+1,g.length,!1)}});return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,discriminatorKey:"type",anyOfRefs:f,hidden:M(a)||M(s)?!0:void 0}}const Ce=f=>{if(je(f))return!1;const y=p(f);return y.type==="object"||!!y.properties},mt=f=>{const y=P(f);return ue(y)?!xe(y,c):!1},Be=u<le&&g.every(f=>Ce(f)||mt(f))&&g.some(Ce);if(g.every(f=>typeof f.$ref=="string")&&!Be){const f=[];for(const y of g){const d=c(y.$ref);let T,w;if(typeof d.title=="string"){const V=Ie(d.title);V&&(T=V.blockId,w=V.blockId)}if(!T&&Array.isArray(d.allOf))for(const V of d.allOf){const C=((V.properties??{}).__resolveType??{}).enum;if(Array.isArray(C)&&typeof C[0]=="string"){T=C[0];break}}if(!T){const S=d.properties?.__resolveType?.enum;Array.isArray(S)&&typeof S[0]=="string"&&(T=S[0])}T||(T=y.$ref.split("/").pop()??"");const j=T.includes("/")?void 0:b(y);!j&&!T.includes("/")||f.push({resolveType:j??T,title:w??(typeof d.title=="string"&&!d.title.startsWith("#")?d.title:F(T)),description:typeof d.description=="string"?d.description:void 0,discriminatorValue:j,schema:L(d,u+1,g.length)})}return{type:"block-ref",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,anyOfRefs:f,hidden:M(a)||M(s)?!0:void 0}}if(Be){const f=d=>{if(typeof d.const=="string"||typeof d.const=="number"||typeof d.const=="boolean")return d.const;if(Array.isArray(d.enum)&&d.enum.length===1&&(typeof d.enum[0]=="string"||typeof d.enum[0]=="number"||typeof d.enum[0]=="boolean"))return d.enum[0]},y=g.map((d,T)=>{const w=p(d).properties??{},j={};for(const[V,S]of Object.entries(w)){const m=f(S);m!==void 0&&(j[V]=m)}return{title:R(d,`Option ${T+1}`),schema:D(d,u+1),discriminators:Object.keys(j).length?j:void 0}});return{type:"inline-union",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,inlineUnionBranches:y,hidden:M(a)||M(s)?!0:void 0}}$="object"}}else a.allOf?($="object",$e=ke(a.title)):typeof s.$ref=="string"&&($="object");let ie,Me;if(u<le){const A=G(a),g=x(A.__required);g.length>0&&(Me=g);const h=Object.entries(A).filter(([_])=>!_.startsWith("__")&&_!=="@type");if(h.length>0){ie={};for(const[_,se]of h)ie[_]=D(se,u+1,O)}}let oe;if(($==="array"||a.type==="array")&&u<le){let A=a.items;A&&(typeof A.$ref=="string"&&(A=c(A.$ref)),oe=D(A,u+1,O),typeof A.title=="string"&&A.title.includes("{{")&&(oe.titleBy=A.title))}const U=A=>{const g=N?.[A];return typeof g=="string"?g:void 0},vt=()=>{if("default"in s)return s.default;if("default"in a)return a.default;if(N&&"default"in N)return N.default};return{type:$??"string",title:typeof s.title=="string"?s.title:!$e&&typeof a.title=="string"?a.title:U("title"),description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:U("description"),default:vt(),enum:Array.isArray(a.enum)?a.enum:I??void 0,format:typeof s.format=="string"?s.format:typeof a.format=="string"?a.format:U("format"),properties:ie,required:Me,items:oe,hidden:M(a)||M(s)?!0:void 0,titleBy:typeof a.titleBy=="string"?a.titleBy:U("titleBy"),image:typeof a.image=="string"?a.image:U("image"),options:typeof s.options=="string"?s.options:typeof a.options=="string"?a.options:U("options")}},Oe=l.properties??{},gt=Object.keys(Oe).every(s=>s.startsWith("__"));if(Array.isArray(l.allOf)&&l.allOf.length===1&&gt){const s=Oe.__resolveType,u=Array.isArray(s?.enum)&&typeof s.enum[0]=="string"?s.enum[0]:typeof s?.const=="string"?s.const:typeof s?.default=="string"?s.default:void 0;for(const v of l.allOf){const a=P(v);if(!(Array.isArray(a.anyOf)||Array.isArray(a.oneOf))||a.properties)continue;const k=D(a,0);if(k.type==="inline-union"&&k.inlineUnionBranches){const O=ke(k.title);return{...k,title:O?void 0:k.title,inlineUnionBranches:u?k.inlineUnionBranches.map(L=>({...L,discriminators:{...L.discriminators??{},__resolveType:u}})):k.inlineUnionBranches}}}}const Pe=G(l),re={};for(const[s,u]of Object.entries(Pe))s.startsWith("__")||s==="@type"||(re[s]=D(u,0));if(Object.keys(re).length===0)return null;const we=x(Pe.__required);return{type:"object",title:typeof l.title=="string"?l.title:void 0,properties:re,required:we.length>0?we:void 0}}function jn(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:r,c=o.properties??{};if(Object.keys(c).some(b=>!b.startsWith("__")))return!1;if(o.additionalProperties===!0)return!0;const p=c.__resolveType;return!!p&&Array.isArray(p.enum)&&p.enum[0]===e}function Vn(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const i={};for(const[o,c]of Object.entries(r))o.startsWith("__")||(i[o]=t(c));return{type:"object",properties:i}}default:return{type:"string"}}},n={};for(const[r,i]of Object.entries(e))r.startsWith("__")||(n[r]=t(i));return Object.keys(n).length===0?null:{type:"object",properties:n}}function be(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},c=o.icon,l=o.logo,p=o,b=P=>P===!0||P==="true",R=b(p.hide)||b(p.ignore)||b(p.unlisted);return{title:typeof o.title=="string"?o.title:void 0,description:typeof o.description=="string"?o.description:void 0,icon:typeof c=="string"?c:void 0,logo:typeof l=="string"?l:void 0,hidden:R||void 0}}const It=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],Fe="website/sections/Rendering/Lazy.tsx";function B(e){return It.some(t=>e.endsWith(t))}const et=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],tt=new Set(et),Ut=et[0],xt=new Set(["site/sections/Theme/Theme.tsx"]);function ne(e){return!!(xt.has(e)||B(e)||e.toLowerCase().includes("preview"))}function Ft(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(tt.has(r))return r;return Ut}function fe(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return fe(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...fe(n));return t}return[]}function Wt(e){const t=e.manifest?.blocks??{},n=[];for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i)){if(ne(o))continue;const c=be(o,e);n.push({resolveType:o,title:c.title??F(o),description:c.description,previewBlock:o,isSavedBlock:!1})}return n}function Cn(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i))ne(o)||n.has(o)||n.set(o,{resolveType:o,title:F(o)});return[...n.values()].sort((r,i)=>r.title.localeCompare(i.title))}function nt(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Y)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const i of r){const o=i?.value;if(!o)continue;let c=o.__resolveType;if(typeof c=="string"&&B(c)&&(c=o.section?.__resolveType??c),typeof c=="string"&&ve(e,c))return c}return n}function Yt(e,t){return nt(e,t)!==t.__resolveType}function rt(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||_e(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c!="string"||tt.has(c)||typeof o.path=="string"||ne(c)||!(ve(e,c)||c===Y&&Yt(e,o))||n.push({resolveType:r,title:r,description:typeof o.name=="string"?o.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function Ht(e,t){const n=ee(t.resolveType),r=n?{}:be(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||F(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function Bn(e,t){const n=Ft(e),r=Je(n,e),i=fe(r?.properties?.sections),o=new Map,c=l=>{if(!ne(l.resolveType)){if(ee(l.resolveType)){_e(l.resolveType)||o.set(l.resolveType,l);return}ve(e,l.resolveType)&&(o.has(l.resolveType)||o.set(l.resolveType,l))}};for(const l of Wt(e))c(l);for(const l of i)c(Ht(e,l));for(const l of rt(e,t))c(l);return[...o.values()].sort((l,p)=>l.title.localeCompare(p.title))}function Dn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const Se="website/loaders/redirect.ts",In=new Set([Se,"website/loaders/redirects.ts"]),Un={temporary:307,permanent:301},We=e=>typeof e=="string"?e:"",Nt=e=>e==="permanent"?"permanent":"temporary";function it(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:We(t.from),to:We(t.to),type:Nt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function Kt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const i=r;if(i.__resolveType!==Se)continue;const{from:o,to:c,type:l,discardQueryParameters:p}=it(i);t.push({key:n,from:o,to:c,type:l,discardQueryParameters:p})}return t}function xn(e){return it(e)}function Fn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:Se}}function qt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const zt=1e3;function Wn(e,t){const n=qt(t);for(let r=0;r<zt;r++){const i=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,i))return i}throw new Error("Could not generate a unique redirect block key")}function Gt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function Yn(e,t){const{pageId:n,path:r,pathTemplate:i}=t;if(n){const o=e.find(l=>l.key===n);if(o)return o;const c=e.find(l=>l.key.endsWith(`-${n}`));if(c)return c}if(i){const o=Ye(e,i);if(o)return o}if(r){const o=Ye(e,r);if(o)return o}return null}function Ye(e,t,n){const r=Ot;if(n){const o=e.find(c=>c.key===n);if(o)return o}const i=e.filter(o=>r(o.path)===r(t));return i.length===0?null:i.length===1?i[0]??null:[...i].sort((o,c)=>o.key.localeCompare(c.key))[0]??null}const ot=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),q="site",st="site/apps/site.ts";function pe(e,t){return e===q?!0:t.__resolveType===st}function Hn(e,t){return e?Xt(e).length>0||Kt(e).length>0?!0:t?en(e,t).length>0||Zt(e,t)?!0:Jt(e,t).length>0:!1:!1}function Qt(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!ot.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Gt(e),path:n.path}}function Xt(e){const t=[];for(const[n,r]of Object.entries(e)){const i=Qt(n,r);i&&t.push(i)}return t}function at(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ye(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",i=r?be(r,n):{};if(i.title)return i.title;if(typeof t.name=="string"){const o=t.name.trim();if(o)return o}return e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase())}function Zt(e,t){const n=e[q];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,i=r.__resolveType;if(typeof i=="string"&&(pe(q,r)||Ze(t,i)))return{key:q,name:ye(q,r,t),resolveType:i}}for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!pe(r,o))continue;const c=typeof o.__resolveType=="string"?o.__resolveType:st;return{key:r,name:ye(r,o,t),resolveType:c}}return null}function Jt(e,t){const n=[];for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c=="string"&&(ot.has(c)||typeof o.path!="string"&&(pe(r,o)||!Ze(t,c)&&!Dt(c)||n.push({key:r,name:ye(r,o,t),resolveType:c})))}return n.sort((r,i)=>r.name.localeCompare(i.name))}function en(e,t){return rt(t,e).map(n=>{const r=e[n.resolveType],i=nt(t,r);return{key:n.resolveType,name:n.description??at(n.resolveType,r),resolveType:i}}).sort((n,r)=>n.name.localeCompare(r.name))}const tn=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function nn(e){return e.includes("matchers")||e.includes("Match")}function ct(e,t){const n=e.__resolveType;return typeof n!="string"||!n||tn.has(n)?!1:t?$t(t,n):nn(n)}function Nn(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||!ee(r)||_e(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;ct(o,e)&&n.push({blockKey:r,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((r,i)=>(r.name??r.blockKey).localeCompare(i.name??i.blockKey))}function z(e,t,n){if(!e)return!1;const r=e.__resolveType;if(typeof r!="string"||!ee(r)||!Object.hasOwn(t,r))return!1;const i=t[r];return!i||typeof i!="object"||Array.isArray(i)?!1:ct(i,n)}function Kn(e,t,n){return z(e,t,n)?e?.__resolveType??null:null}function lt(e,t,n){if(!e)return null;const r=e.__resolveType??"";if(!r)return null;if(z(e,t,n)){const c=t[r]??{},l=c.__resolveType??r,{__resolveType:p,name:b,...R}=c;return{resolveType:l,data:R,blockKey:r}}const{__resolveType:i,...o}=e;return{resolveType:r,data:o}}function rn(e,t,n){const r=lt(e,t,n);return r?{__resolveType:r.resolveType,...r.data}:{__resolveType:""}}function qn(e,t,n){if(e)return z(e,t,n)?rn(e,t,n):e}function on(e,t,n,r){if(!e)return"Default";if(z(e,t,r)){const i=e.__resolveType??"",o=t[i];return at(i,o)}return n(e)}function zn(e,t,n){return{__resolveType:e,...t,name:n}}function Gn(e){return{__resolveType:e}}function Qn(e,t,n){const r=lt(e,t,n);return r?{resolveType:r.resolveType,formValue:r.data}:{resolveType:"",formValue:{}}}function Xn(e,t){const n={__resolveType:e};if(!e||!t)return n;const r=Je(e,t),i=r?.type==="inline-union"?r.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function ut(e){const t=e.__resolveType??"";return B(t)?e.section??e:e}function Z(e){const i=(B(e.__resolveType??"")?e.section:e)?.variants?.[0];return i?.rule?.__resolveType!==Ge?null:i?.value??null}function Zn(e){const t=ut(e);return{__resolveType:Y,variants:[{value:t,rule:{__resolveType:Ge}}]}}function Jn(e){const t=e.__resolveType??"";if(!t)return null;if(B(t))return e.section??null;const n=Z(e);return n?B(n.__resolveType??"")?n:{__resolveType:Fe,section:ut(n)}:{__resolveType:Fe,section:e}}function Q(e){const t=e.__resolveType??"";if(!t)return null;if(B(t)){const n=e.section,r=n?.__resolveType??"";return!r||!n?null:{resolveType:r,data:n}}return{resolveType:t,data:e}}function er(e){const t=Z(e);if(t)return Q(t);if(B(e.__resolveType??"")){const r=e.section;if(!r)return null;const i=Z(r);return Q(i||r)}return Q(e)}function tr(e){return Z(e)}const sn=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function ft(e){if(!e)return!1;const t=e.__resolveType??"";return t===""?Object.keys(e).length===0:sn.includes(t)||t.includes("always")}function an(e){const t=e.variants??[];if(t.length===0)return-1;const n=t.findIndex(r=>ft(r.rule));return n!==-1?n:t.length-1}function nr(e,t,n){const r=n.variants??[];if(r.length===0)return null;const i=an(n),o=r[i]?.value;if(!o)return null;const c=structuredClone(o);return t.isLazy?{...e,section:c}:c}function pt(e,t){return t.isMultivariate?t.isLazy?e.section??null:e:null}function rr(e,t){return Array.isArray(e.variants)?e.variants.map((n,r)=>({label:t(n.rule)||`Variant ${r+1}`,value:n.value??{},rule:n.rule})):[]}function ir(e,t){const n=e.__resolveType??"";if(!n)return null;if(B(n)){const r=e.section??e,i=r.__resolveType??n;if(!i.includes("/")&&i in t){const o=t[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...r},resolveType:i}}if(!n.includes("/")&&n in t){const r=t[n]??{};return{data:{...r},resolveType:r.__resolveType??n}}return{data:{...e},resolveType:n}}function cn(e,t){const n=e.__resolveType??"";return B(n)?{...e,section:t}:t}function ln(e,t,n){return t.isLazy?{...e,section:n}:n}function or(e,t,n){const r=[...e.variants??[]],i=r[t];if(!i)return e;const o=i.value??{};return r[t]={...i,value:cn(o,n)},{...e,variants:r}}function sr(e,t,n){const r=[...e.variants??[]];return r[t]?(r[t]={...r[t],rule:n},{...e,variants:r}):e}function ar(e,t){const n=[...e.variants??[]],r=n[t];return r?(n.splice(t+1,0,structuredClone(r)),{...e,variants:n}):e}function cr(e,t,n){const r=[...e.variants??[]];if(t===n||t<0||n<0||t>=r.length||n>=r.length)return e;const[i]=r.splice(t,1);return i?(r.splice(n,0,i),{...e,variants:r}):e}function lr(e,t){const n=[...e.variants??[]];return n.length<=1?null:(n.splice(t,1),{...e,variants:n})}function de(e){return{rule:me(),value:structuredClone(e)}}function yt(e,t){return{...t,__resolveType:Y,variants:e}}function ur(e){return e.isHidden!==!0&&e.isSavedBlock!==!0}function un(e,t){if(t.isHidden)return null;if(t.isMultivariate){const r=pt(e,t)?.variants??[],i=r[r.length-1]?.value;return i?structuredClone(i):null}if(t.isLazy){const n=e.section;return n?structuredClone(n):null}return structuredClone(e)}function fn(e,t,n){if(t.isMultivariate||t.isHidden)return null;const r=un(e,t);if(!r)return null;const i=yt([de(r),de(r)]);return t.isLazy?{...e,section:i}:i}function fr(e,t,n){if(t.isHidden||t.isSavedBlock)return null;if(t.isMultivariate){const i=pt(e,t);if(!i)return null;const o=i.variants??[],c=o[o.length-1]?.value;if(!c)return null;const l=yt([...o,de(c)],i);return{section:ln(e,t,l),newVariantIndex:o.length}}const r=fn(e,t);return r?{section:r,newVariantIndex:1}:null}function pn(e){return e.anyOfRefs?.some(t=>t.resolveType!==te?!1:t.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function pr(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===Y&&Array.isArray(t.variants)}function dt(e){return!e||typeof e!="object"||Array.isArray(e)?!1:e.__resolveType===te}function yr(e){if(!dt(e))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=t[0]?.value;return Array.isArray(n)?n:null}function dr(e,t){if(!dt(e))return t;const n=structuredClone(e),r=[...n.variants??[]];return r.length===0?r.push({rule:me(),value:t}):r[0]={...r[0],value:t},{...n,variants:r}}function gr(e,t){const r=e[t]?.sections;if(!r||Array.isArray(r))return 1;const i=r;return Array.isArray(i.variants)?i.variants.length:1}function vr(e,t,n){const i=e[t]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const c=o[n];return Array.isArray(c?.value)?c.value:[]}}return[]}function _r(e,t,n){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const r=e;if(Array.isArray(r.variants)){const i=r.variants,o=i.map(p=>on(p.rule,t,n)),c=o.reduce((p,b)=>(p[b]=(p[b]??0)+1,p),{}),l={};return i.map((p,b)=>{const R=o[b]??`Variant ${b+1}`,P=c[R]??1;let H=R;return P>1&&(l[R]=(l[R]??0)+1,H=`${R} ${l[R]}`),{label:H||`Variant ${b+1}`,sections:Array.isArray(p.value)?p.value:[],rule:p.rule}})}}return[]}function K(e){return{rule:me(),value:e}}function W(e,t){return{...t,__resolveType:te,variants:e}}function mr(e,t){const n=structuredClone(t);if(Array.isArray(e))return W([K(e),K(n)]);if(e&&typeof e=="object"){const r=e;return Array.isArray(r.variants)?W([...r.variants,K(n)],r):null}return W([K([]),K(n)])}function hr(e){const t=e.variants;return Array.isArray(t)?t.length-1:1}function Ar(e,t){const n=e[t];if(!n)return null;const r=[...e];return r.splice(t+1,0,structuredClone(n)),r}function Tr(e,t){if(t.length===0)return W([],e);if(t.length===1){const n=t[0],r=n?.rule;if(!ft(r))return W(t,e);if(Array.isArray(n?.value))return n.value}return W(t,e)}function yn(e,t,n){const r=[];for(const[o,c]of Object.entries(e))o!==t&&r.push(c);const i=new Set;for(;r.length>0;){const o=r.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const c of o)r.push(c);continue}n(o);for(const c of Object.values(o))r.push(c)}}}function br(e,t,n){if(!t)return 0;let r=0;return yn(e,t,i=>{i.__resolveType===t&&z(i,e,n)&&r++}),r}function X(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===Y}function dn(e){if(e.type==="block-ref"&&e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));if(e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));const t=e.properties?.__resolveType;return t?.type==="block-ref"&&t.anyOfRefs?.length?t.anyOfRefs.some(n=>X(n.resolveType)):!1}function Sr(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(t=>X(t.resolveType))}function Rr(e,t){if(t==="global"||t==="sections"||pn(e))return!0;const n=e.type==="array"?e.items:void 0;return n?dn(n):!1}const Er={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{pn as $,Et as A,Rt as B,Er as C,Ut as D,Yn as E,Kt as F,Ln as G,Cn as H,Zt as I,gr as J,mr as K,Wn as L,Fn as M,Ge as N,bn as O,ee as P,te as Q,Un as R,st as S,Y as T,F as U,In as V,_e as W,$n as X,Ie as Y,Ue as Z,Mt as _,Gt as a,Mn as a0,Rr as a1,wn as a2,Nn as a3,rn as a4,Gn as a5,qn as a6,fe as a7,_r as a8,Sr as a9,nr as aA,lr as aB,ar as aC,sr as aD,Jn as aE,tr as aF,Zn as aG,Tr as aH,br as aI,or as aJ,an as aK,Ar as aL,Dn as aM,xn as aN,Bn as aa,me as ab,ft as ac,on as ad,Kn as ae,Qn as af,z as ag,zn as ah,Xn as ai,pr as aj,dt as ak,yr as al,dr as am,jn as an,Vn as ao,Tn as ap,er as aq,ur as ar,lt as as,pt as at,rr as au,ir as av,fr as aw,hr as ax,cr as ay,ln as az,X as b,B as c,Rn as d,kn as e,Pn as f,at as g,Hn as h,pe as i,Xt as j,en as k,Ye as l,vr as m,Ot as n,Ft as o,Qt as p,St as q,Je as r,On as s,be as t,hn as u,En as v,Dt as w,ye as x,An as y,Sn as z};
1
+ import{c as He,U as At,V as Tt,K as Ne,m as bt}from"./index-BOGZM7Pw.js";import{s as De}from"./thread-intent-CNOpHUCE.js";function hn(e){const t=He.c(12);let n;t[0]!==e?(n=Tt.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[i,o]=At(r,null);let c;t[2]!==i||t[3]!==e?(c=e?De(i):null,t[2]=i,t[3]=e,t[4]=c):c=t[4];const l=c;let p,b;t[5]!==o?(p=P=>o(De(P)),b=()=>o(null),t[5]=o,t[6]=p,t[7]=b):(p=t[6],b=t[7]);let R;return t[8]!==p||t[9]!==b||t[10]!==l?(R={url:l,setUrl:p,clear:b},t[8]=p,t[9]=b,t[10]=l,t[11]=R):R=t[11],R}function Ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function St(e,t,n){return["decofile-write",e,t,n]}function An(e,t,n){return{id:St(e,t,n).join(":")}}function qe(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function Rt(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function Et(e,t,n){e.setQueryData(Ne.decofileDraft(Ke(t)),n)}function Tn(e){const t=He.c(4);let n;t[0]!==e?(n=Ne.decofileDraft(e?Ke(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:kt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:i}=bt(r);return i??null}async function kt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function bn(e,t){const n=await fetch(qe(t),{cache:"no-store"});if(!n.ok){const i=new Error(`Failed to fetch decofile: ${n.status}`);throw i.status=n.status,i}const r=await n.json();return r.token&&Et(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function Sn(e,t){const n=await fetch(qe(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)return Rt(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function Ot(e){return e.replace(/\/+$/,"")||"/"}function Rn(e){return e.trim().replace(/^\/+|\/+$/g,"")}function Pt(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function En(e){const t=e.trim();return t?Pt(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const ge=/:([A-Za-z0-9_-]+)|\*/g;function kn(e){const t=[];for(const n of e.matchAll(ge)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function ze(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function On(e){e=ze(e);const t=[];let n=0;for(const r of e.matchAll(ge))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function Pn(e,t){return ze(e).replace(ge,(n,r)=>{const i=t[r??"*"]?.trim();return i?r!==void 0?encodeURIComponent(i):i.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function Ie(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function wn(e){return e.includes("@")}function Ue(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function $n(e,t){if(e===t)return!0;const n=Ue(e);return n?t===n||Ue(t)===n:!1}function J(e,t){const n=e.manifest?.blocks??{};for(const[r,i]of Object.entries(n))if(t in i)return r;return null}function Mn(e,t){return J(e,t)!==null}function ve(e,t){const n=J(e,t);return n!==null&&n.includes("sections")}function wt(e,t){const n=J(e,t);return n!==null&&n.includes("apps")}function $t(e,t){const n=J(e,t);return n!==null&&n.includes("matchers")}function ee(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function _e(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Ln="oklch(0.7278 0.151 289)",Mt="website/matchers/always.ts",Ge="website/matchers/never.ts",te="website/flags/multivariate.ts",Y="website/flags/multivariate/section.ts";function me(){return{__resolveType:Mt}}function F(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const Lt=12,jt=8,le=32,Vt=40,Ct="__SECTION_REF__";function ue(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function xe(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const i=n.properties?.__resolveType?.enum;return Array.isArray(i)&&typeof i[0]=="string"}const Bt="VideoWidget";function x(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Qe(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function he(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Ae(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Xe(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function Te(e,t){const n=t.manifest?.blocks??{};for(const l of Object.values(n))if(l[e])return l[e];const r=he(e)??Ae(e);if(r){for(const l of Xe(r.vendor,r.app))for(const p of Object.values(n))if(p[l])return p[l]}const i=Qe(e);for(const l of Object.values(n))if(l[i])return l[i];const o=t.schema??{};return(o.$defs??o.definitions??{})[i]?{$ref:`#/definitions/${i}`}:{}}function Ze(e,t){if(wt(e,t))return!0;const n=he(t)??Ae(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Xe(n.vendor,n.app).some(c=>c in r))return!0;const i=Qe(t),o=e.schema?.$defs??e.schema?.definitions??{};return i in o}function Dt(e){return e==="site/apps/site.ts"?!1:he(e)!==null||Ae(e)!==null}function Je(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=n.root??{},c=s=>{if(s.startsWith("#/root/")){const a=s.slice(7);return o[a]??{}}const u=s.split("/").pop()??"",v=i[u];return v||(u===Ct?o.sections??{}:{})};let l;typeof r.$ref=="string"?l=c(r.$ref):Object.keys(r).length>0?l=r:l=n;const p=s=>typeof s.$ref=="string"?c(s.$ref):s,b=s=>{const v=p(s).properties?.type;if(v){if(typeof v.const=="string")return v.const;if(typeof v.default=="string")return v.default;if(Array.isArray(v.enum)&&typeof v.enum[0]=="string")return v.enum[0]}},R=(s,u)=>{const v=p(s);return typeof v.title=="string"&&!v.title.startsWith("#")?v.title:u},P=(s,u=new Set)=>{if(typeof s.$ref!="string"||s.properties||s.anyOf||s.allOf||s.oneOf||s.type)return s;const v=s.$ref.split("/").pop()??"";return!v||u.has(v)?s:P(c(s.$ref),new Set([...u,v]))},H=s=>{const u=s.properties?.__resolveType?.enum;return Array.isArray(u)&&typeof u[0]=="string"?u[0]:void 0},Re=s=>H(s)!==void 0,Ee=(s,u=new Set)=>{if(typeof s.$ref!="string")return[];const v=s.$ref.split("/").pop()??"";if(!v||u.has(v))return[];const a=c(s.$ref),E=a.anyOf??a.oneOf;if(!Array.isArray(E))return[];const k=new Set([...u,v]);return E.flatMap(O=>Re(O)?[O]:Ee(O,k))},M=s=>{const u=s.hide;return u===!0||u==="true"},ke=s=>typeof s=="string"&&(s.includes("://")||!/\s/.test(s)&&(s.includes("|")||s.includes("&")||s.includes("@"))),G=(s,u=new Set,v=0)=>{if(v>Lt)return{};if(typeof s.$ref=="string"){const E=s.$ref.split("/").pop()??"";return u.has(E)?{}:G(c(s.$ref),new Set([...u,E]),v+1)}let a={};s.properties&&typeof s.properties=="object"&&(a={...a,...s.properties}),Array.isArray(s.required)&&(a.__required=[...x(a.__required),...x(s.required)]);for(const E of["allOf","anyOf","oneOf"]){const k=s[E];if(Array.isArray(k))for(const O of k){const L=x(a.__required),I=G(O,u,v+1);a={...a,...I};const $=E==="allOf"?[...L,...x(I.__required)]:L;$.length>0?a.__required=$:delete a.__required}}return a},D=(s,u=0,v=new Set)=>{let a=s,E;if(typeof s.$ref=="string"){a=c(s.$ref);const A=s.$ref.split("/").pop()??"";E=A,A===Bt&&!a.format&&(a={...a,format:"video-uri"})}a=P(a);const k=E!==void 0&&v.has(E),O=E!==void 0?new Set([...v,E]):v,L=(A,g,h,_=!0)=>!k&&(!_||h<=Vt)&&g<jt?D(A,g,O):void 0;let I;{const A=a.anyOf??a.oneOf;if(Array.isArray(A)){const g=A.filter(_=>!(_.type==="null"||_.type===null)),h=_=>{if(typeof _.const=="string"||typeof _.const=="number")return _.const;if(Array.isArray(_.enum)&&_.enum.length===1&&(typeof _.enum[0]=="string"||typeof _.enum[0]=="number"))return _.enum[0]};g.length>0&&g.every(_=>h(_)!==void 0)&&(I=g.map(_=>h(_)))}}let $,N,$e=!1;if(a.type)$=Array.isArray(a.type)?String(a.type.find(A=>A!=="null")??a.type[0]):String(a.type);else if(a.anyOf||a.oneOf){const g=(a.anyOf??a.oneOf).filter(h=>!(h.type==="null"||h.type===null));if(g.length===0)$="null";else if(g.length===1){const h=g[0];N=h,$=h.type?Array.isArray(h.type)?String(h.type[0]):String(h.type):typeof h.$ref=="string"?"object":"string"}else{if(I){const f=y=>typeof s[y]=="string"?s[y]:typeof a[y]=="string"?a[y]:void 0;return{type:"string",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enum:I,format:f("format"),options:f("options")}}const h=g.filter(Re),_=g.map(f=>P(f)).find(ue),se=g.filter(f=>!ue(P(f))).every(f=>typeof f.$ref=="string"||h.includes(f)),_t=h.some(f=>{const y=f.properties?.__resolveType?.enum;return Array.isArray(y)&&y[0]===te}),Le=()=>{const f=new Map;for(const S of[...h,...g.filter(m=>!h.includes(m)).flatMap(m=>Ee(m))]){const m=H(S);m&&!f.has(m)&&f.set(m,S)}const y=[...f].map(([S,m])=>({resolveType:S,title:typeof m.title=="string"?m.title:F(S),description:typeof m.description=="string"?m.description:void 0,schema:L(m,u+1,f.size)})),d=[];for(const S of g){if(h.includes(S)||typeof S.$ref!="string")continue;const m=c(S.$ref);let C;const ae=m.properties?.__resolveType;if(Array.isArray(ae?.enum)&&typeof ae.enum[0]=="string"&&(C=ae.enum[0]),!C&&Array.isArray(m.allOf))for(const ht of m.allOf){const ce=ht.properties?.__resolveType?.enum;if(Array.isArray(ce)&&typeof ce[0]=="string"){C=ce[0];break}}C&&d.push({resolveType:C,title:typeof m.title=="string"&&!m.title.startsWith("#")?m.title:F(C),description:typeof m.description=="string"?m.description:void 0,schema:L(m,u+1,g.length)})}const T=new Set(y.map(S=>S.resolveType)),w=[...y,...d.filter(S=>!T.has(S.resolveType))],j=g.filter(S=>!h.includes(S)),V=j.length===1&&!k?D(j[0],u+1,O):void 0;return{type:"block-ref",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,anyOfRefs:w,plainSchema:V,hidden:M(a)||M(s)?!0:void 0}};if(_){if(!xe(_,c)&&g.length>1&&se){const y=D(_,u+1,O),d=typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:y.title,T=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:y.description;return{...y,type:"array",title:d,description:T,loaderRef:h.length>0?{...Le(),title:d,description:T}:void 0}}if(_t){const y=D(_,u+1,O);return{...y,type:"array",title:typeof a.title=="string"?a.title:y.title,description:typeof a.description=="string"?a.description:y.description}}}if(h.length>0)return Le();const je=f=>{const y=p(f);if(typeof y.title=="string"&&Ie(y.title))return!0;const d=y.properties?.__resolveType?.enum;if(Array.isArray(d)&&typeof d[0]=="string")return!0;if(Array.isArray(y.allOf))for(const T of y.allOf){const w=T.properties?.__resolveType?.enum;if(Array.isArray(w)&&typeof w[0]=="string")return!0}return!1},Ve=g.map(f=>b(f));if(g.length>1&&Ve.every(f=>typeof f=="string")&&!g.some(je)){const f=g.map((y,d)=>{const T=p(y),w=Ve[d];return{resolveType:w,title:R(y,w),description:typeof T.description=="string"?T.description:void 0,discriminatorValue:w,schema:L(T,u+1,g.length,!1)}});return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,discriminatorKey:"type",anyOfRefs:f,hidden:M(a)||M(s)?!0:void 0}}const Ce=f=>{if(je(f))return!1;const y=p(f);return y.type==="object"||!!y.properties},mt=f=>{const y=P(f);return ue(y)?!xe(y,c):!1},Be=u<le&&g.every(f=>Ce(f)||mt(f))&&g.some(Ce);if(g.every(f=>typeof f.$ref=="string")&&!Be){const f=[];for(const y of g){const d=c(y.$ref);let T,w;if(typeof d.title=="string"){const V=Ie(d.title);V&&(T=V.blockId,w=V.blockId)}if(!T&&Array.isArray(d.allOf))for(const V of d.allOf){const C=((V.properties??{}).__resolveType??{}).enum;if(Array.isArray(C)&&typeof C[0]=="string"){T=C[0];break}}if(!T){const S=d.properties?.__resolveType?.enum;Array.isArray(S)&&typeof S[0]=="string"&&(T=S[0])}T||(T=y.$ref.split("/").pop()??"");const j=T.includes("/")?void 0:b(y);!j&&!T.includes("/")||f.push({resolveType:j??T,title:w??(typeof d.title=="string"&&!d.title.startsWith("#")?d.title:F(T)),description:typeof d.description=="string"?d.description:void 0,discriminatorValue:j,schema:L(d,u+1,g.length)})}return{type:"block-ref",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,anyOfRefs:f,hidden:M(a)||M(s)?!0:void 0}}if(Be){const f=d=>{if(typeof d.const=="string"||typeof d.const=="number"||typeof d.const=="boolean")return d.const;if(Array.isArray(d.enum)&&d.enum.length===1&&(typeof d.enum[0]=="string"||typeof d.enum[0]=="number"||typeof d.enum[0]=="boolean"))return d.enum[0]},y=g.map((d,T)=>{const w=p(d).properties??{},j={};for(const[V,S]of Object.entries(w)){const m=f(S);m!==void 0&&(j[V]=m)}return{title:R(d,`Option ${T+1}`),schema:D(d,u+1),discriminators:Object.keys(j).length?j:void 0}});return{type:"inline-union",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,inlineUnionBranches:y,hidden:M(a)||M(s)?!0:void 0}}$="object"}}else a.allOf?($="object",$e=ke(a.title)):typeof s.$ref=="string"&&($="object");let ie,Me;if(u<le){const A=G(a),g=x(A.__required);g.length>0&&(Me=g);const h=Object.entries(A).filter(([_])=>!_.startsWith("__")&&_!=="@type");if(h.length>0){ie={};for(const[_,se]of h)ie[_]=D(se,u+1,O)}}let oe;if(($==="array"||a.type==="array")&&u<le){let A=a.items;A&&(typeof A.$ref=="string"&&(A=c(A.$ref)),oe=D(A,u+1,O),typeof A.title=="string"&&A.title.includes("{{")&&(oe.titleBy=A.title))}const U=A=>{const g=N?.[A];return typeof g=="string"?g:void 0},vt=()=>{if("default"in s)return s.default;if("default"in a)return a.default;if(N&&"default"in N)return N.default};return{type:$??"string",title:typeof s.title=="string"?s.title:!$e&&typeof a.title=="string"?a.title:U("title"),description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:U("description"),default:vt(),enum:Array.isArray(a.enum)?a.enum:I??void 0,format:typeof s.format=="string"?s.format:typeof a.format=="string"?a.format:U("format"),properties:ie,required:Me,items:oe,hidden:M(a)||M(s)?!0:void 0,titleBy:typeof a.titleBy=="string"?a.titleBy:U("titleBy"),image:typeof a.image=="string"?a.image:U("image"),options:typeof s.options=="string"?s.options:typeof a.options=="string"?a.options:U("options")}},Oe=l.properties??{},gt=Object.keys(Oe).every(s=>s.startsWith("__"));if(Array.isArray(l.allOf)&&l.allOf.length===1&&gt){const s=Oe.__resolveType,u=Array.isArray(s?.enum)&&typeof s.enum[0]=="string"?s.enum[0]:typeof s?.const=="string"?s.const:typeof s?.default=="string"?s.default:void 0;for(const v of l.allOf){const a=P(v);if(!(Array.isArray(a.anyOf)||Array.isArray(a.oneOf))||a.properties)continue;const k=D(a,0);if(k.type==="inline-union"&&k.inlineUnionBranches){const O=ke(k.title);return{...k,title:O?void 0:k.title,inlineUnionBranches:u?k.inlineUnionBranches.map(L=>({...L,discriminators:{...L.discriminators??{},__resolveType:u}})):k.inlineUnionBranches}}}}const Pe=G(l),re={};for(const[s,u]of Object.entries(Pe))s.startsWith("__")||s==="@type"||(re[s]=D(u,0));if(Object.keys(re).length===0)return null;const we=x(Pe.__required);return{type:"object",title:typeof l.title=="string"?l.title:void 0,properties:re,required:we.length>0?we:void 0}}function jn(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:r,c=o.properties??{};if(Object.keys(c).some(b=>!b.startsWith("__")))return!1;if(o.additionalProperties===!0)return!0;const p=c.__resolveType;return!!p&&Array.isArray(p.enum)&&p.enum[0]===e}function Vn(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const i={};for(const[o,c]of Object.entries(r))o.startsWith("__")||(i[o]=t(c));return{type:"object",properties:i}}default:return{type:"string"}}},n={};for(const[r,i]of Object.entries(e))r.startsWith("__")||(n[r]=t(i));return Object.keys(n).length===0?null:{type:"object",properties:n}}function be(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},c=o.icon,l=o.logo,p=o,b=P=>P===!0||P==="true",R=b(p.hide)||b(p.ignore)||b(p.unlisted);return{title:typeof o.title=="string"?o.title:void 0,description:typeof o.description=="string"?o.description:void 0,icon:typeof c=="string"?c:void 0,logo:typeof l=="string"?l:void 0,hidden:R||void 0}}const It=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],Fe="website/sections/Rendering/Lazy.tsx";function B(e){return It.some(t=>e.endsWith(t))}const et=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],tt=new Set(et),Ut=et[0],xt=new Set(["site/sections/Theme/Theme.tsx"]);function ne(e){return!!(xt.has(e)||B(e)||e.toLowerCase().includes("preview"))}function Ft(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(tt.has(r))return r;return Ut}function fe(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return fe(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...fe(n));return t}return[]}function Wt(e){const t=e.manifest?.blocks??{},n=[];for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i)){if(ne(o))continue;const c=be(o,e);n.push({resolveType:o,title:c.title??F(o),description:c.description,previewBlock:o,isSavedBlock:!1})}return n}function Cn(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i))ne(o)||n.has(o)||n.set(o,{resolveType:o,title:F(o)});return[...n.values()].sort((r,i)=>r.title.localeCompare(i.title))}function nt(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Y)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const i of r){const o=i?.value;if(!o)continue;let c=o.__resolveType;if(typeof c=="string"&&B(c)&&(c=o.section?.__resolveType??c),typeof c=="string"&&ve(e,c))return c}return n}function Yt(e,t){return nt(e,t)!==t.__resolveType}function rt(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||_e(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c!="string"||tt.has(c)||typeof o.path=="string"||ne(c)||!(ve(e,c)||c===Y&&Yt(e,o))||n.push({resolveType:r,title:r,description:typeof o.name=="string"?o.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function Ht(e,t){const n=ee(t.resolveType),r=n?{}:be(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||F(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function Bn(e,t){const n=Ft(e),r=Je(n,e),i=fe(r?.properties?.sections),o=new Map,c=l=>{if(!ne(l.resolveType)){if(ee(l.resolveType)){_e(l.resolveType)||o.set(l.resolveType,l);return}ve(e,l.resolveType)&&(o.has(l.resolveType)||o.set(l.resolveType,l))}};for(const l of Wt(e))c(l);for(const l of i)c(Ht(e,l));for(const l of rt(e,t))c(l);return[...o.values()].sort((l,p)=>l.title.localeCompare(p.title))}function Dn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const Se="website/loaders/redirect.ts",In=new Set([Se,"website/loaders/redirects.ts"]),Un={temporary:307,permanent:301},We=e=>typeof e=="string"?e:"",Nt=e=>e==="permanent"?"permanent":"temporary";function it(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:We(t.from),to:We(t.to),type:Nt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function Kt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const i=r;if(i.__resolveType!==Se)continue;const{from:o,to:c,type:l,discardQueryParameters:p}=it(i);t.push({key:n,from:o,to:c,type:l,discardQueryParameters:p})}return t}function xn(e){return it(e)}function Fn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:Se}}function qt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const zt=1e3;function Wn(e,t){const n=qt(t);for(let r=0;r<zt;r++){const i=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,i))return i}throw new Error("Could not generate a unique redirect block key")}function Gt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function Yn(e,t){const{pageId:n,path:r,pathTemplate:i}=t;if(n){const o=e.find(l=>l.key===n);if(o)return o;const c=e.find(l=>l.key.endsWith(`-${n}`));if(c)return c}if(i){const o=Ye(e,i);if(o)return o}if(r){const o=Ye(e,r);if(o)return o}return null}function Ye(e,t,n){const r=Ot;if(n){const o=e.find(c=>c.key===n);if(o)return o}const i=e.filter(o=>r(o.path)===r(t));return i.length===0?null:i.length===1?i[0]??null:[...i].sort((o,c)=>o.key.localeCompare(c.key))[0]??null}const ot=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),q="site",st="site/apps/site.ts";function pe(e,t){return e===q?!0:t.__resolveType===st}function Hn(e,t){return e?Xt(e).length>0||Kt(e).length>0?!0:t?en(e,t).length>0||Zt(e,t)?!0:Jt(e,t).length>0:!1:!1}function Qt(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!ot.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Gt(e),path:n.path}}function Xt(e){const t=[];for(const[n,r]of Object.entries(e)){const i=Qt(n,r);i&&t.push(i)}return t}function at(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ye(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",i=r?be(r,n):{};if(i.title)return i.title;if(typeof t.name=="string"){const o=t.name.trim();if(o)return o}return e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase())}function Zt(e,t){const n=e[q];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,i=r.__resolveType;if(typeof i=="string"&&(pe(q,r)||Ze(t,i)))return{key:q,name:ye(q,r,t),resolveType:i}}for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!pe(r,o))continue;const c=typeof o.__resolveType=="string"?o.__resolveType:st;return{key:r,name:ye(r,o,t),resolveType:c}}return null}function Jt(e,t){const n=[];for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c=="string"&&(ot.has(c)||typeof o.path!="string"&&(pe(r,o)||!Ze(t,c)&&!Dt(c)||n.push({key:r,name:ye(r,o,t),resolveType:c})))}return n.sort((r,i)=>r.name.localeCompare(i.name))}function en(e,t){return rt(t,e).map(n=>{const r=e[n.resolveType],i=nt(t,r);return{key:n.resolveType,name:n.description??at(n.resolveType,r),resolveType:i}}).sort((n,r)=>n.name.localeCompare(r.name))}const tn=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function nn(e){return e.includes("matchers")||e.includes("Match")}function ct(e,t){const n=e.__resolveType;return typeof n!="string"||!n||tn.has(n)?!1:t?$t(t,n):nn(n)}function Nn(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||!ee(r)||_e(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;ct(o,e)&&n.push({blockKey:r,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((r,i)=>(r.name??r.blockKey).localeCompare(i.name??i.blockKey))}function z(e,t,n){if(!e)return!1;const r=e.__resolveType;if(typeof r!="string"||!ee(r)||!Object.hasOwn(t,r))return!1;const i=t[r];return!i||typeof i!="object"||Array.isArray(i)?!1:ct(i,n)}function Kn(e,t,n){return z(e,t,n)?e?.__resolveType??null:null}function lt(e,t,n){if(!e)return null;const r=e.__resolveType??"";if(!r)return null;if(z(e,t,n)){const c=t[r]??{},l=c.__resolveType??r,{__resolveType:p,name:b,...R}=c;return{resolveType:l,data:R,blockKey:r}}const{__resolveType:i,...o}=e;return{resolveType:r,data:o}}function rn(e,t,n){const r=lt(e,t,n);return r?{__resolveType:r.resolveType,...r.data}:{__resolveType:""}}function qn(e,t,n){if(e)return z(e,t,n)?rn(e,t,n):e}function on(e,t,n,r){if(!e)return"Default";if(z(e,t,r)){const i=e.__resolveType??"",o=t[i];return at(i,o)}return n(e)}function zn(e,t,n){return{__resolveType:e,...t,name:n}}function Gn(e){return{__resolveType:e}}function Qn(e,t,n){const r=lt(e,t,n);return r?{resolveType:r.resolveType,formValue:r.data}:{resolveType:"",formValue:{}}}function Xn(e,t){const n={__resolveType:e};if(!e||!t)return n;const r=Je(e,t),i=r?.type==="inline-union"?r.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function ut(e){const t=e.__resolveType??"";return B(t)?e.section??e:e}function Z(e){const i=(B(e.__resolveType??"")?e.section:e)?.variants?.[0];return i?.rule?.__resolveType!==Ge?null:i?.value??null}function Zn(e){const t=ut(e);return{__resolveType:Y,variants:[{value:t,rule:{__resolveType:Ge}}]}}function Jn(e){const t=e.__resolveType??"";if(!t)return null;if(B(t))return e.section??null;const n=Z(e);return n?B(n.__resolveType??"")?n:{__resolveType:Fe,section:ut(n)}:{__resolveType:Fe,section:e}}function Q(e){const t=e.__resolveType??"";if(!t)return null;if(B(t)){const n=e.section,r=n?.__resolveType??"";return!r||!n?null:{resolveType:r,data:n}}return{resolveType:t,data:e}}function er(e){const t=Z(e);if(t)return Q(t);if(B(e.__resolveType??"")){const r=e.section;if(!r)return null;const i=Z(r);return Q(i||r)}return Q(e)}function tr(e){return Z(e)}const sn=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function ft(e){if(!e)return!1;const t=e.__resolveType??"";return t===""?Object.keys(e).length===0:sn.includes(t)||t.includes("always")}function an(e){const t=e.variants??[];if(t.length===0)return-1;const n=t.findIndex(r=>ft(r.rule));return n!==-1?n:t.length-1}function nr(e,t,n){const r=n.variants??[];if(r.length===0)return null;const i=an(n),o=r[i]?.value;if(!o)return null;const c=structuredClone(o);return t.isLazy?{...e,section:c}:c}function pt(e,t){return t.isMultivariate?t.isLazy?e.section??null:e:null}function rr(e,t){return Array.isArray(e.variants)?e.variants.map((n,r)=>({label:t(n.rule)||`Variant ${r+1}`,value:n.value??{},rule:n.rule})):[]}function ir(e,t){const n=e.__resolveType??"";if(!n)return null;if(B(n)){const r=e.section??e,i=r.__resolveType??n;if(!i.includes("/")&&i in t){const o=t[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...r},resolveType:i}}if(!n.includes("/")&&n in t){const r=t[n]??{};return{data:{...r},resolveType:r.__resolveType??n}}return{data:{...e},resolveType:n}}function cn(e,t){const n=e.__resolveType??"";return B(n)?{...e,section:t}:t}function ln(e,t,n){return t.isLazy?{...e,section:n}:n}function or(e,t,n){const r=[...e.variants??[]],i=r[t];if(!i)return e;const o=i.value??{};return r[t]={...i,value:cn(o,n)},{...e,variants:r}}function sr(e,t,n){const r=[...e.variants??[]];return r[t]?(r[t]={...r[t],rule:n},{...e,variants:r}):e}function ar(e,t){const n=[...e.variants??[]],r=n[t];return r?(n.splice(t+1,0,structuredClone(r)),{...e,variants:n}):e}function cr(e,t,n){const r=[...e.variants??[]];if(t===n||t<0||n<0||t>=r.length||n>=r.length)return e;const[i]=r.splice(t,1);return i?(r.splice(n,0,i),{...e,variants:r}):e}function lr(e,t){const n=[...e.variants??[]];return n.length<=1?null:(n.splice(t,1),{...e,variants:n})}function de(e){return{rule:me(),value:structuredClone(e)}}function yt(e,t){return{...t,__resolveType:Y,variants:e}}function ur(e){return e.isHidden!==!0&&e.isSavedBlock!==!0}function un(e,t){if(t.isHidden)return null;if(t.isMultivariate){const r=pt(e,t)?.variants??[],i=r[r.length-1]?.value;return i?structuredClone(i):null}if(t.isLazy){const n=e.section;return n?structuredClone(n):null}return structuredClone(e)}function fn(e,t,n){if(t.isMultivariate||t.isHidden)return null;const r=un(e,t);if(!r)return null;const i=yt([de(r),de(r)]);return t.isLazy?{...e,section:i}:i}function fr(e,t,n){if(t.isHidden||t.isSavedBlock)return null;if(t.isMultivariate){const i=pt(e,t);if(!i)return null;const o=i.variants??[],c=o[o.length-1]?.value;if(!c)return null;const l=yt([...o,de(c)],i);return{section:ln(e,t,l),newVariantIndex:o.length}}const r=fn(e,t);return r?{section:r,newVariantIndex:1}:null}function pn(e){return e.anyOfRefs?.some(t=>t.resolveType!==te?!1:t.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function pr(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===Y&&Array.isArray(t.variants)}function dt(e){return!e||typeof e!="object"||Array.isArray(e)?!1:e.__resolveType===te}function yr(e){if(!dt(e))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=t[0]?.value;return Array.isArray(n)?n:null}function dr(e,t){if(!dt(e))return t;const n=structuredClone(e),r=[...n.variants??[]];return r.length===0?r.push({rule:me(),value:t}):r[0]={...r[0],value:t},{...n,variants:r}}function gr(e,t){const r=e[t]?.sections;if(!r||Array.isArray(r))return 1;const i=r;return Array.isArray(i.variants)?i.variants.length:1}function vr(e,t,n){const i=e[t]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const c=o[n];return Array.isArray(c?.value)?c.value:[]}}return[]}function _r(e,t,n){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const r=e;if(Array.isArray(r.variants)){const i=r.variants,o=i.map(p=>on(p.rule,t,n)),c=o.reduce((p,b)=>(p[b]=(p[b]??0)+1,p),{}),l={};return i.map((p,b)=>{const R=o[b]??`Variant ${b+1}`,P=c[R]??1;let H=R;return P>1&&(l[R]=(l[R]??0)+1,H=`${R} ${l[R]}`),{label:H||`Variant ${b+1}`,sections:Array.isArray(p.value)?p.value:[],rule:p.rule}})}}return[]}function K(e){return{rule:me(),value:e}}function W(e,t){return{...t,__resolveType:te,variants:e}}function mr(e,t){const n=structuredClone(t);if(Array.isArray(e))return W([K(e),K(n)]);if(e&&typeof e=="object"){const r=e;return Array.isArray(r.variants)?W([...r.variants,K(n)],r):null}return W([K([]),K(n)])}function hr(e){const t=e.variants;return Array.isArray(t)?t.length-1:1}function Ar(e,t){const n=e[t];if(!n)return null;const r=[...e];return r.splice(t+1,0,structuredClone(n)),r}function Tr(e,t){if(t.length===0)return W([],e);if(t.length===1){const n=t[0],r=n?.rule;if(!ft(r))return W(t,e);if(Array.isArray(n?.value))return n.value}return W(t,e)}function yn(e,t,n){const r=[];for(const[o,c]of Object.entries(e))o!==t&&r.push(c);const i=new Set;for(;r.length>0;){const o=r.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const c of o)r.push(c);continue}n(o);for(const c of Object.values(o))r.push(c)}}}function br(e,t,n){if(!t)return 0;let r=0;return yn(e,t,i=>{i.__resolveType===t&&z(i,e,n)&&r++}),r}function X(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===Y}function dn(e){if(e.type==="block-ref"&&e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));if(e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));const t=e.properties?.__resolveType;return t?.type==="block-ref"&&t.anyOfRefs?.length?t.anyOfRefs.some(n=>X(n.resolveType)):!1}function Sr(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(t=>X(t.resolveType))}function Rr(e,t){if(t==="global"||t==="sections"||pn(e))return!0;const n=e.type==="array"?e.items:void 0;return n?dn(n):!1}const Er={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{pn as $,Et as A,Rt as B,Er as C,Ut as D,Yn as E,Kt as F,Ln as G,Cn as H,Zt as I,gr as J,mr as K,Wn as L,Fn as M,Ge as N,bn as O,ee as P,te as Q,Un as R,st as S,Y as T,F as U,In as V,_e as W,$n as X,Ie as Y,Ue as Z,Mt as _,Gt as a,Mn as a0,Rr as a1,wn as a2,Nn as a3,rn as a4,Gn as a5,qn as a6,fe as a7,_r as a8,Sr as a9,nr as aA,lr as aB,ar as aC,sr as aD,Jn as aE,tr as aF,Zn as aG,Tr as aH,br as aI,or as aJ,an as aK,Ar as aL,Dn as aM,xn as aN,Bn as aa,me as ab,ft as ac,on as ad,Kn as ae,Qn as af,z as ag,zn as ah,Xn as ai,pr as aj,dt as ak,yr as al,dr as am,jn as an,Vn as ao,Tn as ap,er as aq,ur as ar,lt as as,pt as at,rr as au,ir as av,fr as aw,hr as ax,cr as ay,ln as az,X as b,B as c,Rn as d,kn as e,Pn as f,at as g,Hn as h,pe as i,Xt as j,en as k,Ye as l,vr as m,Ot as n,Ft as o,Qt as p,St as q,Je as r,On as s,be as t,hn as u,En as v,Dt as w,ye as x,An as y,Sn as z};
@@ -1 +1 @@
1
- import{c as a,a as c,r as m,j as o}from"./index-D7hYEfbN.js";import{A as u}from"./auth-split-layout-Bd3Wv1Ul.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
1
+ import{c as a,a as c,r as m,j as o}from"./index-BOGZM7Pw.js";import{A as u}from"./auth-split-layout-rkoJUdAV.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
@@ -1 +1 @@
1
- import{c as l,j as n}from"./index-D7hYEfbN.js";function a(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function d(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function h(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}export{a as C,h as a,d as b};
1
+ import{c as l,j as n}from"./index-BOGZM7Pw.js";function a(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function d(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function h(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}export{a as C,h as a,d as b};
@@ -1 +1 @@
1
- import{r as a,br as T,j as r,bo as x,bn as $,bp as S,dc as D,bm as M,bu as F,bF as L,c as g,l as k}from"./index-D7hYEfbN.js";var f="Collapsible",[B]=L(f),[G,v]=B(f),w=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:s,disabled:l,onOpenChange:c,...b}=o,[p,d]=T({prop:n,defaultProp:s??!1,onChange:c,caller:f});return r.jsx(G,{scope:t,disabled:l,contentId:$(),open:p,onOpenToggle:a.useCallback(()=>d(m=>!m),[d]),children:r.jsx(x.div,{"data-state":h(p),"data-disabled":l?"":void 0,...b,ref:e})})});w.displayName=f;var A="CollapsibleTrigger",I=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,...n}=o,s=v(A,t);return r.jsx(x.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":h(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:S(o.onClick,s.onOpenToggle)})});I.displayName=A;var R="CollapsibleContent",O=a.forwardRef((o,e)=>{const{forceMount:t,...n}=o,s=v(R,o.__scopeCollapsible);return r.jsx(D,{present:t||s.open,children:({present:l})=>r.jsx(q,{...n,ref:e,present:l})})});O.displayName=R;var q=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,present:n,children:s,...l}=o,c=v(R,t),[b,p]=a.useState(n),d=a.useRef(null),m=M(e,d),N=a.useRef(0),y=N.current,P=a.useRef(0),E=P.current,C=c.open||b,j=a.useRef(C),u=a.useRef(void 0);return a.useEffect(()=>{const i=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(i)},[]),F(()=>{const i=d.current;if(i){u.current=u.current||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName},i.style.transitionDuration="0s",i.style.animationName="none";const _=i.getBoundingClientRect();N.current=_.height,P.current=_.width,j.current||(i.style.transitionDuration=u.current.transitionDuration,i.style.animationName=u.current.animationName),p(n)}},[c.open,n]),r.jsx(x.div,{"data-state":h(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!C,...l,ref:m,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...o.style},children:C&&s})});function h(o){return o?"open":"closed"}var H=w;function J(o){const e=g.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=r.jsx(H,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=n):n=e[3],n}function K(o){const e=g.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=r.jsx(I,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=n):n=e[3],n}function Q(o){const e=g.c(8);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s;e[3]!==t?(s=k("overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==n||e[6]!==s?(l=r.jsx(O,{"data-slot":"collapsible-content",className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l}export{K as C,Q as a,J as b};
1
+ import{r as a,br as T,j as r,bo as x,bn as $,bp as S,dd as D,bm as M,bu as F,bF as L,c as g,l as k}from"./index-BOGZM7Pw.js";var f="Collapsible",[B]=L(f),[G,v]=B(f),w=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:s,disabled:l,onOpenChange:c,...b}=o,[p,d]=T({prop:n,defaultProp:s??!1,onChange:c,caller:f});return r.jsx(G,{scope:t,disabled:l,contentId:$(),open:p,onOpenToggle:a.useCallback(()=>d(m=>!m),[d]),children:r.jsx(x.div,{"data-state":h(p),"data-disabled":l?"":void 0,...b,ref:e})})});w.displayName=f;var A="CollapsibleTrigger",I=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,...n}=o,s=v(A,t);return r.jsx(x.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":h(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:S(o.onClick,s.onOpenToggle)})});I.displayName=A;var R="CollapsibleContent",O=a.forwardRef((o,e)=>{const{forceMount:t,...n}=o,s=v(R,o.__scopeCollapsible);return r.jsx(D,{present:t||s.open,children:({present:l})=>r.jsx(q,{...n,ref:e,present:l})})});O.displayName=R;var q=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,present:n,children:s,...l}=o,c=v(R,t),[b,p]=a.useState(n),d=a.useRef(null),m=M(e,d),N=a.useRef(0),y=N.current,P=a.useRef(0),E=P.current,C=c.open||b,j=a.useRef(C),u=a.useRef(void 0);return a.useEffect(()=>{const i=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(i)},[]),F(()=>{const i=d.current;if(i){u.current=u.current||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName},i.style.transitionDuration="0s",i.style.animationName="none";const _=i.getBoundingClientRect();N.current=_.height,P.current=_.width,j.current||(i.style.transitionDuration=u.current.transitionDuration,i.style.animationName=u.current.animationName),p(n)}},[c.open,n]),r.jsx(x.div,{"data-state":h(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!C,...l,ref:m,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...o.style},children:C&&s})});function h(o){return o?"open":"closed"}var H=w;function J(o){const e=g.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=r.jsx(H,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=n):n=e[3],n}function K(o){const e=g.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=r.jsx(I,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=n):n=e[3],n}function Q(o){const e=g.c(8);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s;e[3]!==t?(s=k("overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==n||e[6]!==s?(l=r.jsx(O,{"data-slot":"collapsible-content",className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l}export{K as C,Q as a,J as b};
@@ -1 +1 @@
1
- import{c as A,j as t,B as K,h as G,au as Ze,av as re,b as Q,E as Ee,r as E,X as fe,d7 as Ge,d6 as Re,at as et,n as Oe,l as Y,bd as tt,ak as st,u as ot,L as se,t as lt,f as he,bZ as Me}from"./index-D7hYEfbN.js";import{E as ze}from"./empty-state-Ba4Lmj53.js";import{u as ge}from"./use-mcp-client-Dv0wmo61.js";import{F as ae,a as nt,b as ce,d as de}from"./form-es3qsNvx.js";import{I as pe}from"./input-B5SM5NFH.js";import{T as xe}from"./textarea-C8e48cUD.js";import{D as je,O as it,M as rt}from"./index-BX4WRpMk.js";import{az as at,aa as ct,bw as dt,K as mt,Q as ut,R as pt,aS as xt,I as ye}from"./agent-icon-1OqzsUAE.js";import{M as ft}from"./mcp-app-renderer-B-h9M4vf.js";import{g as ht,M as we}from"./types-DCK-IvKM.js";import{a as gt,b as jt,A as bt}from"./alert-BDcbHG2K.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-Bo385QnQ.js";import{c as Nt,b as Pe,T as ke,a as De}from"./tooltip-Ch7JwSjZ.js";import{i as vt}from"./AlertCircle-3t4CitpU.js";import{a as St}from"./Copy01-B7ecNUq1.js";import{i as yt}from"./Sun-D28dVpFO.js";import{g as wt}from"./connection-slug-CITJ0kGN.js";import{u as Ct,T as It}from"./use-mcp-auth-status-BtDthgG6.js";import{a as Fe,u as Be}from"./use-connection-Roi-SyxA.js";import{u as Tt}from"./use-mcp-tools-DjBYc1XK.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-51EB-LjE.js";import{f as Pt,r as kt}from"./chat-context-SQR_HnrV.js";import{a as Dt}from"./shell-layout-DMqLVaPa.js";import{M as At}from"./monaco-editor-BlkFUb0T.js";import{E as Et}from"./empty-state-iV41QFUB.js";import{n as Rt}from"./LinkBroken01-FGx4hlpz.js";import"./auth-Be85fS22.js";import"./label-BkKmAPrZ.js";import"./Key01-DwEPbnXb.js";import"./extract-connection-data-zlkqkzoy.js";import"./metadata-D72DunRR.js";import"./connection-CAG14zGZ.js";import"./Plus-CLQei2e6.js";import"./index-DtMNfpk7.js";import"./index-BsC6xORW.js";import"./index-CYlLocPz.js";import"./popover-Ddsbw8vr.js";import"./repository-binding-BPtbugRj.js";import"./Check-BhlN5Gfa.js";import"./SearchMd-B4g7zoIg.js";import"./use-mobile-DrPHToxA.js";import"./use-create-virtual-mcp-ylON-lmG.js";import"./use-navigate-to-agent-B6Jnpp7k.js";import"./thread-intent-DD3seycr.js";import"./backoff-8mStPHYB.js";import"./task-board-B1uWZU9K.js";import"./schema-gvXoFVGC.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-DyzplouF.js";import"./ArrowUp-DQk9lIXC.js";import"./ArrowLeft-BbJmgkdx.js";import"./ShoppingBag01-DJPwdB_I.js";import"./ZoomOut-B0FMI__D.js";import"./Building02-FDWlk2dX.js";import"./CheckCircle-DP_Yeb-b.js";import"./ChevronUp-BUjD5px7.js";import"./UserSquare-CI-KdVX2.js";import"./CreditCard01-DylNWQDW.js";import"./DotsVertical-CMBMcjBX.js";import"./Image01-jyAhhinO.js";import"./Palette-92eAR3c0.js";import"./XClose-KUaLXy6Q.js";import"./Link01-D8H87QlU.js";import"./LinkExternal01-Chk3wQjH.js";import"./Monitor01-C4DfOzWo.js";import"./Trash01-B2AvA9FK.js";import"./Upload01-_iBVm55R.js";import"./User01-DuKYzVz8.js";import"./Users01-utuHNJ9R.js";import"./X-BQXAAYgl.js";import"./index-0zdxHEgU.js";import"./badge-C70X12A9.js";import"./mcp-oauth-q_WDhaFd.js";import"./use-panel-navigate-Ck4N-ZB8.js";import"./thread-route-BurLlqRF.js";import"./use-project-scope-Dy6ai4MQ.js";import"./autosend-CRAaDm47.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-Dz93drkG.js";import"./use-ai-providers-shWbOxLc.js";import"./location-DPIrGNp7.js";import"./use-organization-settings-C3-_kI_g.js";import"./avatar-DPiZM9JI.js";import"./download-app-dialog-C3Ji56be.js";import"./dialog--2DE59f4.js";import"./use-clock-tick-CBfGh-8T.js";import"./command-a4IN63yc.js";import"./project-icon-zUFSPGzx.js";import"./new-project-dialog-i2AjdXpL.js";import"./repository-import-picker-DY8NkFcl.js";import"./repository-picker-Bu_60yv3.js";import"./useInfiniteQuery-CApTsxJ0.js";import"./infiniteQueryObserver-rN5E5eR_.js";import"./collection-search-Daq9kKuN.js";import"./use-debounced-value-DtOEJwy7.js";import"./required-auth-layout-BgvVX7TS.js";import"./use-org-sso-B7-QiCKC.js";import"./editor-Q8fTwJVK.js";function Ot(s){const e=A.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let g;e[1]!==i||e[2]!==o||e[3]!==r?(g=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=g):g=e[4];let u;e[5]!==i?(u=i?t.jsx(G,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=f):f=e[11];let p;return e[12]!==g||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[g,f]}),e[12]=g,e[13]=f,e[14]=p):p=e[14],p}Ze({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Mt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=A.c(43),{form:n}=s,o=Q();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=w=>{const{field:b}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=w=>{const{field:b}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==x?(g=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=g):g=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let f;e[22]!==u?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=f):f=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=w=>{const{field:b}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let S;e[30]!==n.control||e[31]!==N?(S=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==j||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,j,S]}),e[33]=f,e[34]=j,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==g?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[g,$]}),e[37]=$,e[38]=g,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(nt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Ft(s){const e=A.c(42),{providerId:n,promptId:o}=s,l=Q(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Ge(n,"PROMPT",o,d),x=Re(n,"PROMPT",d),g=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let f;e[6]!==u?(f={values:u},e[6]=u,e[7]=f):f=e[7];const p=et(f);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!r){let C;e[15]!==l?(C=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=C):C=e[16];let I;e[17]!==l?(I=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ze,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==$?(y=()=>{$()},e[22]=$,e[23]=y):y=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==g||e[26]!==N||e[27]!==y?(P=t.jsx(Ot,{onSave:y,onUndo:N,isDirty:p.formState.isDirty,isSaving:g}),e[24]=p.formState.isDirty,e[25]=g,e[26]=N,e[27]=y,e[28]=P):P=e[28];let w;e[29]!==r.title||e[30]!==P?(w=t.jsx(Oe.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=w):w=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let k;e[34]!==b||e[35]!==w?(k=t.jsxs(t.Fragment,{children:[w,b]}),e[34]=b,e[35]=w,e[36]=k):k=e[36];let D;e[37]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[37]=p,e[38]=D):D=e[38];let R;return e[39]!==k||e[40]!==D?(R=t.jsxs(je,{children:[k,D]}),e[39]=k,e[40]=D,e[41]=R):R=e[41],R}function Bt(s){const e=A.c(10),{itemId:n}=s,o=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Mt(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ze,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Ft,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Le(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function X(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=A.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=Y("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=A.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=Y("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=A.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=Q();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=Ct(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let g;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(g=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=g):g=e[11],g}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=Q(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,h=sessionStorage.getItem(m);if(!h)return null;sessionStorage.removeItem(m);try{return JSON.parse(h)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[h,T]of Object.entries(a))T!==null&&typeof T=="object"?m[h]=JSON.stringify(T,null,2):m[h]=T;return m})(),[d,r]=E.useState(c??{}),[x,g]=E.useState(a?JSON.stringify(a,null,2):"{}"),[u,f]=E.useState(null),[p,j]=E.useState(null),[N,S]=E.useState(null),[$,y]=E.useState(null),[P,w]=E.useState(!1),[b,k]=E.useState(null),{org:D}=fe(),R=Fe(e),C=Pt(),I=kt(),{openSidePanel:O}=Dt(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),_=Tt({client:z}),v=_.data?.tools?.find(m=>m.name===s),M=ht(v?._meta),V=m=>{if(!C)return;const h=$t(m.content);h.content.length>0&&(O(),C.sendMessage({tiptapDoc:h}))},[F,B]=E.useState("json"),[q,W]=E.useState(!1);M&&!q&&(B("ui"),W(!0));const J=v?.inputSchema?.properties,be=J?Object.keys(J):[],Z=be.length>0,ee={};if(Z&&v?.inputSchema?.properties)for(const m of be)ee[m]=v.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{w(!0),y(null),f(null),j(null),S(null),k(null);const m=performance.now();try{if(!z)throw new Error("MCP client is not available");const h=Z?{...ee,...d}:(()=>{const L=x.trim();if(!L)return{};const H=JSON.parse(L);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([L,H])=>{if((H.type==="object"||H.type==="array")&&typeof h[L]=="string")try{h[L]=JSON.parse(h[L])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof h[L]=="string"&&h[L]!==""){const Se=Number(h[L]);Number.isNaN(Se)||(h[L]=Se)}});const T=await z.callTool({name:s,arguments:h}),te=T.structuredContent??T,We=performance.now(),Xe=Math.round(We-m);f(te),j(T),S(h);const Ye=JSON.stringify(te),ve=new TextEncoder().encode(Ye).length;k({duration:`${Xe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(h){const T=h instanceof Error?h.message:String(h);y(T||"Unknown error occurred");const te=performance.now();k({duration:`${Math.round(te-m)}ms`})}finally{w(!1)}},ie=(m,h)=>{r(T=>({...T,[m]:h}))},Ve=()=>{f(null),j(null),S(null),y(null),k(null)},qe=v?.name??Lt(s),He=t.jsx(Le,{children:t.jsxs(Ue,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:D.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:wt(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(X,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:l("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([m,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,v.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:T=>ie(m,T.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):h.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:T=>ie(m,T==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:T=>ie(m,T.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>g(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Je,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),Qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),M&&t.jsx(Nt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:F==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("ui"),children:t.jsx(xt,{size:14})})}),t.jsx(De,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:F==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("json"),children:t.jsx(ye,{size:14})})}),t.jsx(De,{children:l("details.tool.jsonView")})]})]})})]})]}),$&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(gt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(vt,{className:"h-4 w-4"}),t.jsx(jt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(bt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:M&&F==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(G,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:M,toolInfo:v?{tool:v}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:V,onUpdateModelContext:m=>I?.setAppContext(U,m),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Oe.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(G,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(It,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),Qe]})})]})})}function Jt(s){const e=A.c(20),{itemId:n,siblings:o,onBack:l}=s,i=Q(),[a,c]=E.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!Fe(r||void 0)||!r){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let j;e[7]!==i?(j=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=j):j=e[8];let N;e[9]!==j?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:j}),e[9]=j,e[10]=N):N=e[10];let S;return e[11]!==p||e[12]!==N?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,N]})}),e[11]=p,e[12]=N,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let u;return e[15]!==r||e[16]!==l||e[17]!==o||e[18]!==n?(u=t.jsx(E.Suspense,{fallback:g,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:c,onBack:l})}),e[15]=r,e[16]=l,e[17]=o,e[18]=n,e[19]=u):u=e[19],u}const Vt={prompt:Bt};function qt(){const s=A.c(9),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Be(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=A.c(52),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=Q(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Be(x)[0]??null,f=u?.id??"",p=f||"no-connection",j=f??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const S=ge(N),$=Re(p,i,S);let y;s[9]!==$||s[10]!==a?(y=async J=>{a&&await $.update.mutateAsync({id:a,data:J})},s[9]=$,s[10]=a,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const b=w,k=b&&Vt[b];let D;s[14]!==i?(D=Kt(i),s[14]=i,s[15]=D):D=s[15];const R=D;let C;s[16]!==r.slug?(C=t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(O=u&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(X,{children:t.jsx(_e,{children:R})}),s[24]=R,s[25]=U):U=s[25];let z;s[26]!==O||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Ue,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=z):z=s[29];const _=z;if(k){let J;return s[30]!==k||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(k,{itemId:a,onBack:d,onUpdate:P}),s[30]=k,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Rt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let M;s[36]!==l?(M=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=M):M=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let F;s[40]!==l?(F=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=F):F=s[41];let B;s[42]!==d||s[43]!==F?(B={onClick:d,children:F},s[42]=d,s[43]=F,s[44]=B):B=s[44];let q;s[45]!==M||s[46]!==V||s[47]!==B?(q=t.jsx(Et,{icon:v,title:M,description:V,buttonProps:B}),s[45]=M,s[46]=V,s[47]=B,s[48]=q):q=s[48];let W;return s[49]!==_||s[50]!==q?(W=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=W):W=s[51],W}function Wt(){const s=A.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _o(){const s=A.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Wt,{})})}),s[0]=e):e=s[0],e}export{_o as default};
1
+ import{c as A,j as t,B as K,h as G,au as Ze,av as re,b as Q,E as Ee,r as E,X as fe,d8 as Ge,d7 as Re,at as et,n as Oe,l as Y,bd as tt,ak as st,u as ot,L as se,t as lt,f as he,bZ as Me}from"./index-BOGZM7Pw.js";import{E as ze}from"./empty-state-DdDKihxt.js";import{u as ge}from"./use-mcp-client-9jF2B0Tz.js";import{F as ae,a as nt,b as ce,d as de}from"./form-DXEENu_8.js";import{I as pe}from"./input-C0ZWiiGy.js";import{T as xe}from"./textarea-e3h0PKfc.js";import{D as je,O as it,M as rt}from"./index-DlDzsxeJ.js";import{az as at,aa as ct,bw as dt,K as mt,Q as ut,R as pt,aS as xt,I as ye}from"./agent-icon-QobcC4y1.js";import{M as ft}from"./mcp-app-renderer-CJ5u3TPG.js";import{g as ht,M as we}from"./types-BlCCVKMl.js";import{a as gt,b as jt,A as bt}from"./alert-BZ6uRdL8.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-CGC5E9nf.js";import{c as Nt,b as Pe,T as ke,a as De}from"./tooltip-DoWVDYxv.js";import{i as vt}from"./AlertCircle-BOPAUEgU.js";import{a as St}from"./Copy01-ByHdq7k3.js";import{i as yt}from"./Sun-Bl8Ky_if.js";import{g as wt}from"./connection-slug-CITJ0kGN.js";import{u as Ct,T as It}from"./use-mcp-auth-status-CG-b2BD1.js";import{a as Fe,u as Be}from"./use-connection-C4j2pJbz.js";import{u as Tt}from"./use-mcp-tools-Dbm0kb0W.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-DUuPtqFs.js";import{f as Pt,r as kt}from"./chat-context-BHWxNMFT.js";import{a as Dt}from"./shell-layout-B9OaioSj.js";import{M as At}from"./monaco-editor-C4uDUO_q.js";import{E as Et}from"./empty-state-Db66egMr.js";import{n as Rt}from"./LinkBroken01-BQ3rvf4O.js";import"./auth-BMIwdKU8.js";import"./label-CKukDnnz.js";import"./Key01-Dje7twgn.js";import"./extract-connection-data-BZKTCWVm.js";import"./metadata-D72DunRR.js";import"./connection-BBVDOaSM.js";import"./Plus-Dk5G0eGJ.js";import"./index-CaP5SDB2.js";import"./index-Dl3JXElC.js";import"./index-Ccz5AaI_.js";import"./popover-DvKxqM1r.js";import"./repository-binding-CEDkA6og.js";import"./Check-CcPSzxsY.js";import"./SearchMd-DJptVqPP.js";import"./use-mobile-9GiVme_1.js";import"./use-create-virtual-mcp-C0a_KTOz.js";import"./use-navigate-to-agent-CSgL519X.js";import"./thread-intent-CNOpHUCE.js";import"./backoff-8mStPHYB.js";import"./task-board-Dh6sWb9t.js";import"./schema-W3hqtN1B.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-CGCC9pfF.js";import"./ArrowUp-Duh-8Vv0.js";import"./ArrowLeft-DGlO1CKr.js";import"./ShoppingBag01-mUPmqGRd.js";import"./ZoomOut-BQf_lYpX.js";import"./Building02-D_rXBsfQ.js";import"./CheckCircle-CxJ9MBI3.js";import"./ChevronUp-C9klasvw.js";import"./UserSquare-B6-k4uk5.js";import"./CreditCard01-D7Ll8vXp.js";import"./DotsVertical-CXVrXTYw.js";import"./Image01-DAe5wd3u.js";import"./Palette-BFtTwWPg.js";import"./XClose-Bsj_jKUE.js";import"./Link01-BFa5_pnw.js";import"./LinkExternal01-ChFFafWR.js";import"./Monitor01-tvCvi4o_.js";import"./Trash01-BA-bFjuS.js";import"./Upload01-C13aB89v.js";import"./User01-B42bcRzQ.js";import"./Users01-BmXeKAri.js";import"./X-BdtW9stL.js";import"./index-0glLJTM3.js";import"./badge-DTNkOzY0.js";import"./mcp-oauth-cSH4PfZY.js";import"./use-panel-navigate-4MoLzTpw.js";import"./thread-route-esGiDSRu.js";import"./use-project-scope-CUYDg9gO.js";import"./autosend-B5Obavo-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-DL6Ppxgb.js";import"./use-ai-providers-BuwFLwdC.js";import"./location-DPIrGNp7.js";import"./use-organization-settings-BgEtBsl7.js";import"./avatar-Bpp_lL_f.js";import"./download-app-dialog-BlTQi4L1.js";import"./dialog-CwJ0Tacd.js";import"./use-clock-tick-DkYE6iX2.js";import"./command-D4xFqyr9.js";import"./project-icon-DQrOXeEW.js";import"./new-project-dialog-CiCMTA1C.js";import"./repository-import-picker-BT060hhl.js";import"./repository-picker-Bowb7b9f.js";import"./useInfiniteQuery-pxyjNhep.js";import"./infiniteQueryObserver-CHVbl4Al.js";import"./collection-search-BG7vK4NS.js";import"./use-debounced-value-C1TKx6na.js";import"./required-auth-layout-CKgEUo-z.js";import"./use-org-sso-BmivjhbI.js";import"./editor-DIJFF-Rn.js";function Ot(s){const e=A.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let g;e[1]!==i||e[2]!==o||e[3]!==r?(g=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=g):g=e[4];let u;e[5]!==i?(u=i?t.jsx(G,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=f):f=e[11];let p;return e[12]!==g||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[g,f]}),e[12]=g,e[13]=f,e[14]=p):p=e[14],p}Ze({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Mt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=A.c(43),{form:n}=s,o=Q();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=w=>{const{field:b}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=w=>{const{field:b}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let g;e[17]!==i||e[18]!==x?(g=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=g):g=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let f;e[22]!==u?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=f):f=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=w=>{const{field:b}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let S;e[30]!==n.control||e[31]!==N?(S=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==j||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,j,S]}),e[33]=f,e[34]=j,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==g?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[g,$]}),e[37]=$,e[38]=g,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(nt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Ft(s){const e=A.c(42),{providerId:n,promptId:o}=s,l=Q(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Ge(n,"PROMPT",o,d),x=Re(n,"PROMPT",d),g=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let f;e[6]!==u?(f={values:u},e[6]=u,e[7]=f):f=e[7];const p=et(f);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!r){let C;e[15]!==l?(C=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=C):C=e[16];let I;e[17]!==l?(I=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ze,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==$?(y=()=>{$()},e[22]=$,e[23]=y):y=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==g||e[26]!==N||e[27]!==y?(P=t.jsx(Ot,{onSave:y,onUndo:N,isDirty:p.formState.isDirty,isSaving:g}),e[24]=p.formState.isDirty,e[25]=g,e[26]=N,e[27]=y,e[28]=P):P=e[28];let w;e[29]!==r.title||e[30]!==P?(w=t.jsx(Oe.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=w):w=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let k;e[34]!==b||e[35]!==w?(k=t.jsxs(t.Fragment,{children:[w,b]}),e[34]=b,e[35]=w,e[36]=k):k=e[36];let D;e[37]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[37]=p,e[38]=D):D=e[38];let R;return e[39]!==k||e[40]!==D?(R=t.jsxs(je,{children:[k,D]}),e[39]=k,e[40]=D,e[41]=R):R=e[41],R}function Bt(s){const e=A.c(10),{itemId:n}=s,o=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Mt(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ze,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Ft,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Le(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function X(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=A.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=Y("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=A.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=A.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=Y("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=A.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=Q();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=Ct(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let g;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(g=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=g):g=e[11],g}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=Q(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,h=sessionStorage.getItem(m);if(!h)return null;sessionStorage.removeItem(m);try{return JSON.parse(h)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[h,T]of Object.entries(a))T!==null&&typeof T=="object"?m[h]=JSON.stringify(T,null,2):m[h]=T;return m})(),[d,r]=E.useState(c??{}),[x,g]=E.useState(a?JSON.stringify(a,null,2):"{}"),[u,f]=E.useState(null),[p,j]=E.useState(null),[N,S]=E.useState(null),[$,y]=E.useState(null),[P,w]=E.useState(!1),[b,k]=E.useState(null),{org:D}=fe(),R=Fe(e),C=Pt(),I=kt(),{openSidePanel:O}=Dt(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),_=Tt({client:z}),v=_.data?.tools?.find(m=>m.name===s),M=ht(v?._meta),V=m=>{if(!C)return;const h=$t(m.content);h.content.length>0&&(O(),C.sendMessage({tiptapDoc:h}))},[F,B]=E.useState("json"),[q,W]=E.useState(!1);M&&!q&&(B("ui"),W(!0));const J=v?.inputSchema?.properties,be=J?Object.keys(J):[],Z=be.length>0,ee={};if(Z&&v?.inputSchema?.properties)for(const m of be)ee[m]=v.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{w(!0),y(null),f(null),j(null),S(null),k(null);const m=performance.now();try{if(!z)throw new Error("MCP client is not available");const h=Z?{...ee,...d}:(()=>{const L=x.trim();if(!L)return{};const H=JSON.parse(L);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([L,H])=>{if((H.type==="object"||H.type==="array")&&typeof h[L]=="string")try{h[L]=JSON.parse(h[L])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof h[L]=="string"&&h[L]!==""){const Se=Number(h[L]);Number.isNaN(Se)||(h[L]=Se)}});const T=await z.callTool({name:s,arguments:h}),te=T.structuredContent??T,We=performance.now(),Xe=Math.round(We-m);f(te),j(T),S(h);const Ye=JSON.stringify(te),ve=new TextEncoder().encode(Ye).length;k({duration:`${Xe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(h){const T=h instanceof Error?h.message:String(h);y(T||"Unknown error occurred");const te=performance.now();k({duration:`${Math.round(te-m)}ms`})}finally{w(!1)}},ie=(m,h)=>{r(T=>({...T,[m]:h}))},Ve=()=>{f(null),j(null),S(null),y(null),k(null)},qe=v?.name??Lt(s),He=t.jsx(Le,{children:t.jsxs(Ue,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:D.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:wt(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(X,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:l("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([m,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,v.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:T=>ie(m,T.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):h.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:T=>ie(m,T==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:T=>ie(m,T.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>g(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Je,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),Qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),M&&t.jsx(Nt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:F==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("ui"),children:t.jsx(xt,{size:14})})}),t.jsx(De,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:F==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("json"),children:t.jsx(ye,{size:14})})}),t.jsx(De,{children:l("details.tool.jsonView")})]})]})})]})]}),$&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(gt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(vt,{className:"h-4 w-4"}),t.jsx(jt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(bt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:M&&F==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(G,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:M,toolInfo:v?{tool:v}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:V,onUpdateModelContext:m=>I?.setAppContext(U,m),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Oe.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(G,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(It,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),Qe]})})]})})}function Jt(s){const e=A.c(20),{itemId:n,siblings:o,onBack:l}=s,i=Q(),[a,c]=E.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!Fe(r||void 0)||!r){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let j;e[7]!==i?(j=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=j):j=e[8];let N;e[9]!==j?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:j}),e[9]=j,e[10]=N):N=e[10];let S;return e[11]!==p||e[12]!==N?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,N]})}),e[11]=p,e[12]=N,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),e[14]=g):g=e[14];let u;return e[15]!==r||e[16]!==l||e[17]!==o||e[18]!==n?(u=t.jsx(E.Suspense,{fallback:g,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:c,onBack:l})}),e[15]=r,e[16]=l,e[17]=o,e[18]=n,e[19]=u):u=e[19],u}const Vt={prompt:Bt};function qt(){const s=A.c(9),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Be(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=A.c(52),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=Q(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Be(x)[0]??null,f=u?.id??"",p=f||"no-connection",j=f??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const S=ge(N),$=Re(p,i,S);let y;s[9]!==$||s[10]!==a?(y=async J=>{a&&await $.update.mutateAsync({id:a,data:J})},s[9]=$,s[10]=a,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const b=w,k=b&&Vt[b];let D;s[14]!==i?(D=Kt(i),s[14]=i,s[15]=D):D=s[15];const R=D;let C;s[16]!==r.slug?(C=t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(O=u&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(X,{children:t.jsx(_e,{children:R})}),s[24]=R,s[25]=U):U=s[25];let z;s[26]!==O||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Ue,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=z):z=s[29];const _=z;if(k){let J;return s[30]!==k||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(k,{itemId:a,onBack:d,onUpdate:P}),s[30]=k,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Rt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let M;s[36]!==l?(M=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=M):M=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let F;s[40]!==l?(F=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=F):F=s[41];let B;s[42]!==d||s[43]!==F?(B={onClick:d,children:F},s[42]=d,s[43]=F,s[44]=B):B=s[44];let q;s[45]!==M||s[46]!==V||s[47]!==B?(q=t.jsx(Et,{icon:v,title:M,description:V,buttonProps:B}),s[45]=M,s[46]=V,s[47]=B,s[48]=q):q=s[48];let W;return s[49]!==_||s[50]!==q?(W=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=W):W=s[51],W}function Wt(){const s=A.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _o(){const s=A.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Wt,{})})}),s[0]=e):e=s[0],e}export{_o as default};
@@ -1 +1 @@
1
- import{c as R,b as S,j as s,G as z,l as A,F as V,B as $,H as E,I as _}from"./index-D7hYEfbN.js";import{i as I,n as L}from"./ArrowUp-DQk9lIXC.js";import{i as F}from"./Check-BhlN5Gfa.js";import{a as O,i as P,c as Y}from"./XClose-KUaLXy6Q.js";import{T as G,a as H,c as K,b as W}from"./tooltip-Ch7JwSjZ.js";import{V as q}from"./view-mode-toggle-Chs9e6xz.js";import{B as J}from"./badge-C70X12A9.js";const M=[];function oe(t){const e=R.c(35),{viewMode:i,onViewModeChange:h,sortKey:T,sortDirection:g,onSort:j,sortOptions:B,filters:D}=t,b=B===void 0?M:B,o=D===void 0?M:D,l=S();let v;e[0]!==o?(v=o.filter(U),e[0]=o,e[1]=v):v=e[1];const N=v.length;let r;e[2]!==l?(r=l("collections.collectionDisplayButton.displayAndFilters"),e[2]=l,e[3]=r):r=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(O,{size:16}),e[4]=w):w=e[4];let n;e[5]!==N?(n=N>0&&s.jsx(J,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[5]=N,e[6]=n):n=e[6];let a;e[7]!==r||e[8]!==n?(a=s.jsx(G,{asChild:!0,children:s.jsx(V,{asChild:!0,children:s.jsxs($,{variant:"outline",size:"icon",className:"relative","aria-label":r,children:[w,n]})})}),e[7]=r,e[8]=n,e[9]=a):a=e[9];let c;e[10]!==l?(c=l("collections.collectionDisplayButton.displayAndFilters"),e[10]=l,e[11]=c):c=e[11];let d;e[12]!==c?(d=s.jsx(H,{children:c}),e[12]=c,e[13]=d):d=e[13];let x;e[14]!==a||e[15]!==d?(x=s.jsx(K,{children:s.jsxs(W,{children:[a,d]})}),e[14]=a,e[15]=d,e[16]=x):x=e[16];let m;e[17]!==h||e[18]!==i?(m=h&&i&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:i,onValueChange:h,fullWidth:!0,options:[{value:"table",icon:s.jsx(P,{})},{value:"cards",icon:s.jsx(Y,{})}]})}),e[17]=h,e[18]=i,e[19]=m):m=e[19];let p;e[20]!==j||e[21]!==g||e[22]!==T||e[23]!==b||e[24]!==l?(p=b.length>0&&j&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l("collections.collectionDisplayButton.sortBy")}),b.map(C=>{const k=T===C.id;return s.jsx(z,{onClick:()=>j(C.id),className:A("h-8 px-2 py-0 cursor-pointer",k&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[k&&s.jsx(F,{size:16,className:"text-foreground shrink-0"}),!k&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:C.label}),k&&g&&(g==="asc"?s.jsx(I,{size:16,className:"text-foreground shrink-0"}):s.jsx(L,{size:16,className:"text-foreground shrink-0"}))]})},C.id)})]}),e[20]=j,e[21]=g,e[22]=T,e[23]=b,e[24]=l,e[25]=p):p=e[25];let u;e[26]!==o?(u=o.map(Q),e[26]=o,e[27]=u):u=e[27];let f;e[28]!==m||e[29]!==p||e[30]!==u?(f=s.jsxs(E,{align:"end",className:"w-[200px] p-0 gap-0",children:[m,p,u]}),e[28]=m,e[29]=p,e[30]=u,e[31]=f):f=e[31];let y;return e[32]!==x||e[33]!==f?(y=s.jsxs(_,{children:[x,f]}),e[32]=x,e[33]=f,e[34]=y):y=e[34],y}function Q(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const i=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:A("h-8 px-2 py-0 cursor-pointer",i&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&s.jsx(F,{size:16,className:"text-foreground shrink-0"}),!i&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function U(t){return t.value!=="ALL"}export{oe as C};
1
+ import{c as R,b as S,j as s,G as z,l as A,F as V,B as $,H as E,I as _}from"./index-BOGZM7Pw.js";import{i as I,n as L}from"./ArrowUp-Duh-8Vv0.js";import{i as F}from"./Check-CcPSzxsY.js";import{a as O,i as P,c as Y}from"./XClose-Bsj_jKUE.js";import{T as G,a as H,c as K,b as W}from"./tooltip-DoWVDYxv.js";import{V as q}from"./view-mode-toggle-BjrOeE_u.js";import{B as J}from"./badge-DTNkOzY0.js";const M=[];function oe(t){const e=R.c(35),{viewMode:i,onViewModeChange:h,sortKey:T,sortDirection:g,onSort:j,sortOptions:B,filters:D}=t,b=B===void 0?M:B,o=D===void 0?M:D,l=S();let v;e[0]!==o?(v=o.filter(U),e[0]=o,e[1]=v):v=e[1];const N=v.length;let r;e[2]!==l?(r=l("collections.collectionDisplayButton.displayAndFilters"),e[2]=l,e[3]=r):r=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(O,{size:16}),e[4]=w):w=e[4];let n;e[5]!==N?(n=N>0&&s.jsx(J,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[5]=N,e[6]=n):n=e[6];let a;e[7]!==r||e[8]!==n?(a=s.jsx(G,{asChild:!0,children:s.jsx(V,{asChild:!0,children:s.jsxs($,{variant:"outline",size:"icon",className:"relative","aria-label":r,children:[w,n]})})}),e[7]=r,e[8]=n,e[9]=a):a=e[9];let c;e[10]!==l?(c=l("collections.collectionDisplayButton.displayAndFilters"),e[10]=l,e[11]=c):c=e[11];let d;e[12]!==c?(d=s.jsx(H,{children:c}),e[12]=c,e[13]=d):d=e[13];let x;e[14]!==a||e[15]!==d?(x=s.jsx(K,{children:s.jsxs(W,{children:[a,d]})}),e[14]=a,e[15]=d,e[16]=x):x=e[16];let m;e[17]!==h||e[18]!==i?(m=h&&i&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:i,onValueChange:h,fullWidth:!0,options:[{value:"table",icon:s.jsx(P,{})},{value:"cards",icon:s.jsx(Y,{})}]})}),e[17]=h,e[18]=i,e[19]=m):m=e[19];let p;e[20]!==j||e[21]!==g||e[22]!==T||e[23]!==b||e[24]!==l?(p=b.length>0&&j&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l("collections.collectionDisplayButton.sortBy")}),b.map(C=>{const k=T===C.id;return s.jsx(z,{onClick:()=>j(C.id),className:A("h-8 px-2 py-0 cursor-pointer",k&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[k&&s.jsx(F,{size:16,className:"text-foreground shrink-0"}),!k&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:C.label}),k&&g&&(g==="asc"?s.jsx(I,{size:16,className:"text-foreground shrink-0"}):s.jsx(L,{size:16,className:"text-foreground shrink-0"}))]})},C.id)})]}),e[20]=j,e[21]=g,e[22]=T,e[23]=b,e[24]=l,e[25]=p):p=e[25];let u;e[26]!==o?(u=o.map(Q),e[26]=o,e[27]=u):u=e[27];let f;e[28]!==m||e[29]!==p||e[30]!==u?(f=s.jsxs(E,{align:"end",className:"w-[200px] p-0 gap-0",children:[m,p,u]}),e[28]=m,e[29]=p,e[30]=u,e[31]=f):f=e[31];let y;return e[32]!==x||e[33]!==f?(y=s.jsxs(_,{children:[x,f]}),e[32]=x,e[33]=f,e[34]=y):y=e[34],y}function Q(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const i=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:A("h-8 px-2 py-0 cursor-pointer",i&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&s.jsx(F,{size:16,className:"text-foreground shrink-0"}),!i&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function U(t){return t.value!=="ALL"}export{oe as C};
@@ -1 +1 @@
1
- import{c as v,l as b,j as a,h as w}from"./index-D7hYEfbN.js";import{i as C}from"./SearchMd-B4g7zoIg.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
1
+ import{c as v,l as b,j as a,h as w}from"./index-BOGZM7Pw.js";import{i as C}from"./SearchMd-DJptVqPP.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
@@ -1 +1 @@
1
- import{c as S,j as n,l as y,b as D}from"./index-D7hYEfbN.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-cs-obaRn.js";import{i as W,n as z}from"./ArrowUp-DQk9lIXC.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
1
+ import{c as S,j as n,l as y,b as D}from"./index-BOGZM7Pw.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-BCWfTyhH.js";import{i as W,n as z}from"./ArrowUp-Duh-8Vv0.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
@@ -1 +1 @@
1
- import{c as b,j as r,n as p,P as j,l as h}from"./index-D7hYEfbN.js";import{B as v}from"./badge-C70X12A9.js";function P(g){const e=b.c(13),{tabs:d,activeTab:o,onTabChange:s,className:m,placement:u}=g,f=u===void 0?"inline":u;let t;if(e[0]!==o||e[1]!==s||e[2]!==d){let c;e[4]!==o||e[5]!==s?(c=n=>{const x=o===n.id;return r.jsxs(p.Tab,{active:x,onClick:()=>s(n.id),children:[n.label,n.count!==void 0&&r.jsx(v,{variant:"secondary",className:h("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",x?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:n.count})]},n.id)},e[4]=o,e[5]=s,e[6]=c):c=e[6],t=d.map(c),e[0]=o,e[1]=s,e[2]=d,e[3]=t}else t=e[3];let l;e[7]!==m||e[8]!==t?(l=r.jsx(p.Tabs,{className:m,children:t}),e[7]=m,e[8]=t,e[9]=l):l=e[9];const i=l;let a;return e[10]!==i||e[11]!==f?(a=f==="page"?r.jsx(j.Toolbar.Left.Portal,{fallback:i,children:i}):i,e[10]=i,e[11]=f,e[12]=a):a=e[12],a}export{P as C};
1
+ import{c as b,j as r,n as p,P as j,l as h}from"./index-BOGZM7Pw.js";import{B as v}from"./badge-DTNkOzY0.js";function P(g){const e=b.c(13),{tabs:d,activeTab:o,onTabChange:s,className:m,placement:u}=g,f=u===void 0?"inline":u;let t;if(e[0]!==o||e[1]!==s||e[2]!==d){let c;e[4]!==o||e[5]!==s?(c=n=>{const x=o===n.id;return r.jsxs(p.Tab,{active:x,onClick:()=>s(n.id),children:[n.label,n.count!==void 0&&r.jsx(v,{variant:"secondary",className:h("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",x?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:n.count})]},n.id)},e[4]=o,e[5]=s,e[6]=c):c=e[6],t=d.map(c),e[0]=o,e[1]=s,e[2]=d,e[3]=t}else t=e[3];let l;e[7]!==m||e[8]!==t?(l=r.jsx(p.Tabs,{className:m,children:t}),e[7]=m,e[8]=t,e[9]=l):l=e[9];const i=l;let a;return e[10]!==i||e[11]!==f?(a=f==="page"?r.jsx(j.Toolbar.Left.Portal,{fallback:i,children:i}):i,e[10]=i,e[11]=f,e[12]=a):a=e[12],a}export{P as C};
@@ -1,3 +1,3 @@
1
- import{c as $,X as J,o as re,r as V,a2 as ee,K as Y,m as ce,e as ue,b as te,l as Z,j as n,t as se,B as le}from"./index-D7hYEfbN.js";import{s as de}from"./Plus-CLQei2e6.js";import{s as fe}from"./XClose-KUaLXy6Q.js";import{B as ae}from"./badge-C70X12A9.js";import{f as pe,C as xe,c as he,a as ke,e as je,b as Se}from"./command-a4IN63yc.js";import{I as ge}from"./icon-button-BRiA9kiV.js";import{c as Be,S as Re,a as Te,b as Ce,e as be}from"./sheet-Bp0OaYM9.js";import{S as ye}from"./switch-O2yDEU3w.js";import{T as oe}from"./textarea-C8e48cUD.js";import{j as ve}from"./task-board-B1uWZU9K.js";import{o as Ne}from"./use-org-fs-BONY9uyR.js";import{B as Ae}from"./thread-intent-DD3seycr.js";function Oe(){const t=$.c(7),{org:e}=J(),a=ee();let l;t[0]!==e.id?(l=Y.taskBoardPrompts(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=i):i=t[3];let o;return t[4]!==l||t[5]!==i?(o={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=o):o=t[6],ce(o)}function Pe(){const t=$.c(7),{org:e}=J(),a=ee();let l;t[0]!==e.id?(l=Y.taskBoardColumnAutomations(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_AUTOMATION_LIST",{})).automations,t[2]=a,t[3]=i):i=t[3];let o;return t[4]!==l||t[5]!==i?(o={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=o):o=t[6],ce(o)}function Ee(){const t=$.c(8),{org:e}=J(),a=ee(),l=re();let i;t[0]!==a?(i=async x=>{const{columnKey:r,rules:m,automation:u}=x;if(m){const d=m.prompt.trim();await(d||m.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:r,prompt:d,skills:m.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:r}))}r!==null&&u!==void 0&&await(u===null?a.call("TASK_BOARD_AUTOMATION_DELETE",{columnKey:r}):a.call("TASK_BOARD_AUTOMATION_UPSERT",{columnKey:r,prompt:u.trim()||null}))},t[0]=a,t[1]=i):i=t[1];let o;t[2]!==e||t[3]!==l?(o=()=>Promise.all([l.invalidateQueries({queryKey:Y.taskBoardPrompts(e.id)}),l.invalidateQueries({queryKey:Y.taskBoardColumnAutomations(e.id)})]),t[2]=e,t[3]=l,t[4]=o):o=t[4];let s;return t[5]!==i||t[6]!==o?(s={mutationFn:i,onSettled:o},t[5]=i,t[6]=o,t[7]=s):s=t[7],ue(s)}const ne=()=>0;function Ve(){const t=$.c(6),{org:e}=J(),a=re();let l;t[0]!==e.id||t[1]!==a?(l=()=>Promise.all([a.invalidateQueries({queryKey:Y.taskBoardPrompts(e.id)}),a.invalidateQueries({queryKey:Y.taskBoardColumnAutomations(e.id)})]),t[0]=e.id,t[1]=a,t[2]=l):l=t[2];const i=l;let o;t[3]!==e.slug||t[4]!==i?(o=()=>Ae.subscribe(e.slug,i,i),t[3]=e.slug,t[4]=i,t[5]=o):o=t[5];const s=o;V.useSyncExternalStore(s,ne,ne)}function Ke(t){const e=$.c(18),a=te(),l=Oe(),i=Pe();let o,s,x;if(e[0]!==i.data||e[1]!==t||e[2]!==l.data||e[3]!==a){s=l.data?.find(c=>c.columnKey===t);let f;e[7]!==i.data||e[8]!==t?(f=i.data?.find(c=>c.columnKey===t),e[7]=i.data,e[8]=t,e[9]=f):f=e[9],o=f;const S=s?.skills.length??0;x=o?.prompt||s?.prompt||(o?a("taskBoard.columnRules.defaultRun"):a("taskBoard.columnRules.skillsOnly",{count:S})),e[0]=i.data,e[1]=t,e[2]=l.data,e[3]=a,e[4]=o,e[5]=s,e[6]=x}else o=e[4],s=e[5],x=e[6];const r=x,m=!!o||!!s;let u;e[10]!==l.data?(u=l.data?.find(we)?.skills??[],e[10]=l.data,e[11]=u):u=e[11];let d;return e[12]!==o||e[13]!==s||e[14]!==r||e[15]!==m||e[16]!==u?(d={scope:s,automation:o,configured:m,summary:r,boardSkills:u},e[12]=o,e[13]=s,e[14]=r,e[15]=m,e[16]=u,e[17]=d):d=e[17],d}function we(t){return t.columnKey===null}function We(t){const e=$.c(23),{columnKey:a,label:l,open:i,onOpenChange:o}=t,{scope:s,automation:x,boardSkills:r}=Ke(a);let m;e[0]!==l?(m=n.jsx(Be,{className:"border-b",children:n.jsx(Re,{children:l})}),e[0]=l,e[1]=m):m=e[1];const u=!!x,d=x?.prompt??"",f=s?.prompt??"";let S;e[2]!==s?.skills?(S=s?.skills??[],e[2]=s?.skills,e[3]=S):S=e[3];let c;e[4]!==u||e[5]!==d||e[6]!==f||e[7]!==S?(c={run:u,automation:d,prompt:f,skills:S},e[4]=u,e[5]=d,e[6]=f,e[7]=S,e[8]=c):c=e[8];let g;e[9]!==o?(g=()=>o(!1),e[9]=o,e[10]=g):g=e[10];let k;e[11]!==r||e[12]!==a||e[13]!==c||e[14]!==g?(k=n.jsx(Le,{columnKey:a,initial:c,boardSkills:r,onDone:g}),e[11]=r,e[12]=a,e[13]=c,e[14]=g,e[15]=k):k=e[15];let h;e[16]!==m||e[17]!==k?(h=n.jsxs(Te,{className:"w-full gap-0 sm:max-w-md","aria-describedby":void 0,children:[m,k]}),e[16]=m,e[17]=k,e[18]=h):h=e[18];let j;return e[19]!==i||e[20]!==o||e[21]!==h?(j=n.jsx(n.Fragment,{children:n.jsx(Ce,{open:i,onOpenChange:o,children:h})}),e[19]=i,e[20]=o,e[21]=h,e[22]=j):j=e[22],j}function Le(t){const e=$.c(81),{columnKey:a,initial:l,boardSkills:i,onDone:o}=t,s=te(),x=Ee(),[r,m]=V.useState(l.run),[u,d]=V.useState(l.automation),[f,S]=V.useState(l.prompt),[c,g]=V.useState(l.skills),k=r?u:null,h=l.run?l.automation:null;let j;e[0]!==a||e[1]!==l.prompt||e[2]!==l.skills||e[3]!==h||e[4]!==k||e[5]!==o||e[6]!==f||e[7]!==x||e[8]!==c||e[9]!==s?(j=()=>x.mutate({columnKey:a,...f!==l.prompt||c.join(`
1
+ import{c as $,X as J,o as re,r as V,a2 as ee,K as Y,m as ce,e as ue,b as te,l as Z,j as n,t as se,B as le}from"./index-BOGZM7Pw.js";import{s as de}from"./Plus-Dk5G0eGJ.js";import{s as fe}from"./XClose-Bsj_jKUE.js";import{B as ae}from"./badge-DTNkOzY0.js";import{f as pe,C as xe,c as he,a as ke,e as je,b as Se}from"./command-D4xFqyr9.js";import{I as ge}from"./icon-button-c-SlONOU.js";import{c as Be,S as Re,a as Te,b as Ce,e as be}from"./sheet-DOIzAtMq.js";import{S as ye}from"./switch-Ctdc8it1.js";import{T as oe}from"./textarea-e3h0PKfc.js";import{j as ve}from"./task-board-Dh6sWb9t.js";import{o as Ne}from"./use-org-fs-DF_BlZtj.js";import{B as Ae}from"./thread-intent-CNOpHUCE.js";function Oe(){const t=$.c(7),{org:e}=J(),a=ee();let l;t[0]!==e.id?(l=Y.taskBoardPrompts(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=i):i=t[3];let o;return t[4]!==l||t[5]!==i?(o={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=o):o=t[6],ce(o)}function Pe(){const t=$.c(7),{org:e}=J(),a=ee();let l;t[0]!==e.id?(l=Y.taskBoardColumnAutomations(e.id),t[0]=e.id,t[1]=l):l=t[1];let i;t[2]!==a?(i=async()=>(await a.call("TASK_BOARD_AUTOMATION_LIST",{})).automations,t[2]=a,t[3]=i):i=t[3];let o;return t[4]!==l||t[5]!==i?(o={queryKey:l,staleTime:6e4,queryFn:i},t[4]=l,t[5]=i,t[6]=o):o=t[6],ce(o)}function Ee(){const t=$.c(8),{org:e}=J(),a=ee(),l=re();let i;t[0]!==a?(i=async x=>{const{columnKey:r,rules:m,automation:u}=x;if(m){const d=m.prompt.trim();await(d||m.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:r,prompt:d,skills:m.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:r}))}r!==null&&u!==void 0&&await(u===null?a.call("TASK_BOARD_AUTOMATION_DELETE",{columnKey:r}):a.call("TASK_BOARD_AUTOMATION_UPSERT",{columnKey:r,prompt:u.trim()||null}))},t[0]=a,t[1]=i):i=t[1];let o;t[2]!==e||t[3]!==l?(o=()=>Promise.all([l.invalidateQueries({queryKey:Y.taskBoardPrompts(e.id)}),l.invalidateQueries({queryKey:Y.taskBoardColumnAutomations(e.id)})]),t[2]=e,t[3]=l,t[4]=o):o=t[4];let s;return t[5]!==i||t[6]!==o?(s={mutationFn:i,onSettled:o},t[5]=i,t[6]=o,t[7]=s):s=t[7],ue(s)}const ne=()=>0;function Ve(){const t=$.c(6),{org:e}=J(),a=re();let l;t[0]!==e.id||t[1]!==a?(l=()=>Promise.all([a.invalidateQueries({queryKey:Y.taskBoardPrompts(e.id)}),a.invalidateQueries({queryKey:Y.taskBoardColumnAutomations(e.id)})]),t[0]=e.id,t[1]=a,t[2]=l):l=t[2];const i=l;let o;t[3]!==e.slug||t[4]!==i?(o=()=>Ae.subscribe(e.slug,i,i),t[3]=e.slug,t[4]=i,t[5]=o):o=t[5];const s=o;V.useSyncExternalStore(s,ne,ne)}function Ke(t){const e=$.c(18),a=te(),l=Oe(),i=Pe();let o,s,x;if(e[0]!==i.data||e[1]!==t||e[2]!==l.data||e[3]!==a){s=l.data?.find(c=>c.columnKey===t);let f;e[7]!==i.data||e[8]!==t?(f=i.data?.find(c=>c.columnKey===t),e[7]=i.data,e[8]=t,e[9]=f):f=e[9],o=f;const S=s?.skills.length??0;x=o?.prompt||s?.prompt||(o?a("taskBoard.columnRules.defaultRun"):a("taskBoard.columnRules.skillsOnly",{count:S})),e[0]=i.data,e[1]=t,e[2]=l.data,e[3]=a,e[4]=o,e[5]=s,e[6]=x}else o=e[4],s=e[5],x=e[6];const r=x,m=!!o||!!s;let u;e[10]!==l.data?(u=l.data?.find(we)?.skills??[],e[10]=l.data,e[11]=u):u=e[11];let d;return e[12]!==o||e[13]!==s||e[14]!==r||e[15]!==m||e[16]!==u?(d={scope:s,automation:o,configured:m,summary:r,boardSkills:u},e[12]=o,e[13]=s,e[14]=r,e[15]=m,e[16]=u,e[17]=d):d=e[17],d}function we(t){return t.columnKey===null}function We(t){const e=$.c(23),{columnKey:a,label:l,open:i,onOpenChange:o}=t,{scope:s,automation:x,boardSkills:r}=Ke(a);let m;e[0]!==l?(m=n.jsx(Be,{className:"border-b",children:n.jsx(Re,{children:l})}),e[0]=l,e[1]=m):m=e[1];const u=!!x,d=x?.prompt??"",f=s?.prompt??"";let S;e[2]!==s?.skills?(S=s?.skills??[],e[2]=s?.skills,e[3]=S):S=e[3];let c;e[4]!==u||e[5]!==d||e[6]!==f||e[7]!==S?(c={run:u,automation:d,prompt:f,skills:S},e[4]=u,e[5]=d,e[6]=f,e[7]=S,e[8]=c):c=e[8];let g;e[9]!==o?(g=()=>o(!1),e[9]=o,e[10]=g):g=e[10];let k;e[11]!==r||e[12]!==a||e[13]!==c||e[14]!==g?(k=n.jsx(Le,{columnKey:a,initial:c,boardSkills:r,onDone:g}),e[11]=r,e[12]=a,e[13]=c,e[14]=g,e[15]=k):k=e[15];let h;e[16]!==m||e[17]!==k?(h=n.jsxs(Te,{className:"w-full gap-0 sm:max-w-md","aria-describedby":void 0,children:[m,k]}),e[16]=m,e[17]=k,e[18]=h):h=e[18];let j;return e[19]!==i||e[20]!==o||e[21]!==h?(j=n.jsx(n.Fragment,{children:n.jsx(Ce,{open:i,onOpenChange:o,children:h})}),e[19]=i,e[20]=o,e[21]=h,e[22]=j):j=e[22],j}function Le(t){const e=$.c(81),{columnKey:a,initial:l,boardSkills:i,onDone:o}=t,s=te(),x=Ee(),[r,m]=V.useState(l.run),[u,d]=V.useState(l.automation),[f,S]=V.useState(l.prompt),[c,g]=V.useState(l.skills),k=r?u:null,h=l.run?l.automation:null;let j;e[0]!==a||e[1]!==l.prompt||e[2]!==l.skills||e[3]!==h||e[4]!==k||e[5]!==o||e[6]!==f||e[7]!==x||e[8]!==c||e[9]!==s?(j=()=>x.mutate({columnKey:a,...f!==l.prompt||c.join(`
2
2
  `)!==l.skills.join(`
3
3
  `)?{rules:{prompt:f,skills:c}}:{},...k!==h?{automation:k}:{}},{onSuccess:()=>{se.success(s("taskBoard.columnRules.saved")),o()},onError:X=>se.error(X instanceof Error?X.message:s("taskBoard.columnRules.failed"))}),e[0]=a,e[1]=l.prompt,e[2]=l.skills,e[3]=h,e[4]=k,e[5]=o,e[6]=f,e[7]=x,e[8]=c,e[9]=s,e[10]=j):j=e[10];const A=j;let R;e[11]!==s?(R=s("taskBoard.columnRules.runLabel"),e[11]=s,e[12]=R):R=e[12];let T;e[13]!==R?(T=n.jsx("span",{className:"block text-sm font-medium text-foreground",children:R}),e[13]=R,e[14]=T):T=e[14];let C;e[15]!==s?(C=s("taskBoard.columnRules.runHint"),e[15]=s,e[16]=C):C=e[16];let b;e[17]!==C?(b=n.jsx("span",{className:"text-meta mt-0.5 block",children:C}),e[17]=C,e[18]=b):b=e[18];let y;e[19]!==T||e[20]!==b?(y=n.jsxs("span",{className:"flex-1",children:[T,b]}),e[19]=T,e[20]=b,e[21]=y):y=e[21];let v;e[22]!==r?(v=n.jsx(ye,{checked:r,onCheckedChange:m}),e[22]=r,e[23]=v):v=e[23];let O;e[24]!==y||e[25]!==v?(O=n.jsxs("label",{className:"flex items-start gap-3",children:[y,v]}),e[24]=y,e[25]=v,e[26]=O):O=e[26];let B;e[27]!==u||e[28]!==r||e[29]!==s?(B=r&&n.jsx(oe,{value:u,rows:5,onChange:X=>d(X.target.value),placeholder:s("taskBoard.columnRules.automationPlaceholder"),"aria-label":s("taskBoard.columnRules.automationLabel")}),e[27]=u,e[28]=r,e[29]=s,e[30]=B):B=e[30];let K;e[31]!==O||e[32]!==B?(K=n.jsxs("section",{className:"flex flex-col gap-2",children:[O,B]}),e[31]=O,e[32]=B,e[33]=K):K=e[33];let w;e[34]!==s?(w=s("taskBoard.columnRules.promptLabel"),e[34]=s,e[35]=w):w=e[35];let L;e[36]!==w?(L=n.jsx(ie,{children:w}),e[36]=w,e[37]=L):L=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=X=>S(X.target.value),e[38]=P):P=e[38];let _;e[39]!==s?(_=s("taskBoard.columnRules.promptPlaceholder"),e[39]=s,e[40]=_):_=e[40];let N;e[41]!==s?(N=s("taskBoard.columnRules.promptLabel"),e[41]=s,e[42]=N):N=e[42];let E;e[43]!==f||e[44]!==_||e[45]!==N?(E=n.jsx(oe,{value:f,rows:5,maxLength:ve,onChange:P,placeholder:_,"aria-label":N}),e[43]=f,e[44]=_,e[45]=N,e[46]=E):E=e[46];let p;e[47]!==L||e[48]!==E?(p=n.jsxs("section",{className:"flex flex-col gap-2",children:[L,E]}),e[47]=L,e[48]=E,e[49]=p):p=e[49];let I;e[50]!==s?(I=s("taskBoard.columnRules.skillsLabel"),e[50]=s,e[51]=I):I=e[51];let M;e[52]!==I?(M=n.jsx(ie,{children:I}),e[52]=I,e[53]=M):M=e[53];let q;e[54]!==i||e[55]!==c?(q=n.jsx($e,{fill:!0,value:c,onChange:g,inherited:i}),e[54]=i,e[55]=c,e[56]=q):q=e[56];let D;e[57]!==M||e[58]!==q?(D=n.jsxs("section",{className:"flex min-h-64 flex-1 flex-col gap-2",children:[M,q]}),e[57]=M,e[58]=q,e[59]=D):D=e[59];let F;e[60]!==K||e[61]!==p||e[62]!==D?(F=n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-4",children:[K,p,D]}),e[60]=K,e[61]=p,e[62]=D,e[63]=F):F=e[63];let Q;e[64]!==s?(Q=s("taskBoard.columnRules.cancel"),e[64]=s,e[65]=Q):Q=e[65];let U;e[66]!==o||e[67]!==Q?(U=n.jsx(le,{variant:"outline",onClick:o,children:Q}),e[66]=o,e[67]=Q,e[68]=U):U=e[68];const me=x.isPending;let H;e[69]!==s?(H=s("taskBoard.columnRules.save"),e[69]=s,e[70]=H):H=e[70];let z;e[71]!==x.isPending||e[72]!==A||e[73]!==H?(z=n.jsx(le,{disabled:me,onClick:A,children:H}),e[71]=x.isPending,e[72]=A,e[73]=H,e[74]=z):z=e[74];let G;e[75]!==U||e[76]!==z?(G=n.jsxs(be,{className:"flex-row justify-end border-t",children:[U,z]}),e[75]=U,e[76]=z,e[77]=G):G=e[77];let W;return e[78]!==F||e[79]!==G?(W=n.jsxs(n.Fragment,{children:[F,G]}),e[78]=F,e[79]=G,e[80]=W):W=e[80],W}function ie(t){const e=$.c(2),{children:a}=t;let l;return e[0]!==a?(l=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=l):l=e[1],l}const _e=[];function $e(t){const e=$.c(66),{value:a,onChange:l,inherited:i,fill:o}=t,s=i===void 0?_e:i,x=o===void 0?!1:o,r=te(),m=Ne();let u;e[0]!==m.data?(u=B=>m.data?.find(K=>K.id===B)?.name??B,e[0]=m.data,e[1]=u):u=e[1];const d=u;let f,S,c,g,k,h,j,A,R,T;if(e[2]!==m.data||e[3]!==x||e[4]!==s||e[5]!==d||e[6]!==l||e[7]!==r||e[8]!==a){let B;e[19]!==s||e[20]!==a?(B=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!s.includes(p.id),e[19]=s,e[20]=a,e[21]=B):B=e[21];const K=(m.data??[]).filter(B),w=x&&"min-h-0 flex-1";e[22]!==w?(T=Z("flex flex-col gap-2",w),e[22]=w,e[23]=T):T=e[23],e[24]!==d||e[25]!==l||e[26]!==r||e[27]!==a?(g=a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(p=>n.jsxs(ae,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(p),n.jsx(ge,{label:r("taskBoard.columnRules.removeSkill",{skill:d(p)}),onClick:()=>l(a.filter(I=>I!==p)),className:"size-5 text-muted-foreground",children:n.jsx(fe,{size:12})})]},p))}),e[24]=d,e[25]=l,e[26]=r,e[27]=a,e[28]=g):g=e[28],c=pe;const L=x&&"min-h-0 flex-1";e[29]!==L?(A=Z("h-auto border",L),e[29]=L,e[30]=A):A=e[30];let P;e[31]!==r?(P=r("taskBoard.columnRules.searchSkills"),e[31]=r,e[32]=P):P=e[32],e[33]!==P?(R=n.jsx(xe,{placeholder:P,className:"h-9"}),e[33]=P,e[34]=R):R=e[34],S=he;const _=x?"max-h-none flex-1":"max-h-56";e[35]!==_?(h=Z(_),e[35]=_,e[36]=h):h=e[36];let N;e[37]!==r?(N=r("taskBoard.columnRules.noSkills"),e[37]=r,e[38]=N):N=e[38],e[39]!==N?(j=n.jsx(ke,{children:N}),e[39]=N,e[40]=j):j=e[40],f=je;let E;e[41]!==l||e[42]!==a?(E=p=>n.jsxs(Se,{value:`${p.name} ${p.id}`,onSelect:()=>l([...a,p.id]),children:[n.jsx(de,{size:14,className:"shrink-0 text-muted-foreground"}),n.jsxs("span",{className:"flex min-w-0 flex-col",children:[n.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&n.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[41]=l,e[42]=a,e[43]=E):E=e[43],k=K.map(E),e[2]=m.data,e[3]=x,e[4]=s,e[5]=d,e[6]=l,e[7]=r,e[8]=a,e[9]=f,e[10]=S,e[11]=c,e[12]=g,e[13]=k,e[14]=h,e[15]=j,e[16]=A,e[17]=R,e[18]=T}else f=e[9],S=e[10],c=e[11],g=e[12],k=e[13],h=e[14],j=e[15],A=e[16],R=e[17],T=e[18];let C;e[44]!==f||e[45]!==k?(C=n.jsx(f,{children:k}),e[44]=f,e[45]=k,e[46]=C):C=e[46];let b;e[47]!==S||e[48]!==C||e[49]!==h||e[50]!==j?(b=n.jsxs(S,{className:h,children:[j,C]}),e[47]=S,e[48]=C,e[49]=h,e[50]=j,e[51]=b):b=e[51];let y;e[52]!==c||e[53]!==b||e[54]!==A||e[55]!==R?(y=n.jsxs(c,{className:A,children:[R,b]}),e[52]=c,e[53]=b,e[54]=A,e[55]=R,e[56]=y):y=e[56];let v;e[57]!==s||e[58]!==d||e[59]!==r?(v=s.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-meta",children:r("taskBoard.columnRules.inheritedHint")}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map(B=>n.jsx(ae,{variant:"muted",children:d(B)},B))})]}),e[57]=s,e[58]=d,e[59]=r,e[60]=v):v=e[60];let O;return e[61]!==g||e[62]!==y||e[63]!==v||e[64]!==T?(O=n.jsxs("div",{className:T,children:[g,y,v]}),e[61]=g,e[62]=y,e[63]=v,e[64]=T,e[65]=O):O=e[65],O}export{We as C,$e as S,Ke as a,Oe as b,Ee as c,Ve as u};
@@ -1 +1 @@
1
- import{c as J,r as K,j as s,l as y,B as Q}from"./index-D7hYEfbN.js";import{i as U}from"./Check-BhlN5Gfa.js";import{i as V}from"./Tool01-DyzplouF.js";import{C as W,a as X,b as Y,e as Z,c as _,f as ee}from"./command-a4IN63yc.js";import{a as se,P as te,b as le}from"./popover-Ddsbw8vr.js";function ne(q){const e=J.c(45),{options:j,value:l,onChange:v,placeholder:R,triggerClassName:$,contentClassName:N,width:A,renderTrigger:F,renderItem:r,emptyMessage:G,searchPlaceholder:L,filter:S,renderSearchAction:w}=q,z=R===void 0?"Select...":R,D=A===void 0?"w-[200px]":A,P=G===void 0?"No results found.":G,E=L===void 0?"Search...":L;let C;e[0]!==l?(C=x=>x.value===l,e[0]=l,e[1]=C):C=e[1];const T=j.find(C),[I,t]=K.useState(!1),O=te,B=se,H=!0,M=F?s.jsx("div",{className:y("cursor-pointer",$),children:F(T)}):s.jsxs(Q,{variant:"outline",role:"combobox",className:y("justify-between",D,$),children:[T?T.label:z,s.jsx(V,{className:"opacity-50"})]});let o;e[2]!==B||e[3]!==M?(o=s.jsx(B,{asChild:H,children:M}),e[2]=B,e[3]=M,e[4]=o):o=e[4];let i;e[5]!==N?(i=y("p-0",N),e[5]=N,e[6]=i):i=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[7]=g):g=e[7];let c;e[8]!==w||e[9]!==t?(c=w?.(()=>t(!1)),e[8]=w,e[9]=t,e[10]=c):c=e[10];let n;e[11]!==E||e[12]!==c?(n=s.jsx(W,{placeholder:E,className:"h-9",action:c}),e[11]=E,e[12]=c,e[13]=n):n=e[13];let m;e[14]!==P?(m=s.jsx(X,{children:P}),e[14]=P,e[15]=m):m=e[15];let d;if(e[16]!==v||e[17]!==j||e[18]!==r||e[19]!==t||e[20]!==l){let x;e[22]!==v||e[23]!==r||e[24]!==t||e[25]!==l?(x=a=>{const k=l===a.value;return s.jsx(Y,{value:a.label,onSelect:()=>{v(a.value===l?"":a.value),t(!1)},children:r?r(a,k):s.jsxs(s.Fragment,{children:[a.label,s.jsx(U,{className:y("ml-auto",k?"opacity-100":"opacity-0")})]})},a.value)},e[22]=v,e[23]=r,e[24]=t,e[25]=l,e[26]=x):x=e[26],d=j.map(x),e[16]=v,e[17]=j,e[18]=r,e[19]=t,e[20]=l,e[21]=d}else d=e[21];let f;e[27]!==d?(f=s.jsx(Z,{children:d}),e[27]=d,e[28]=f):f=e[28];let h;e[29]!==m||e[30]!==f?(h=s.jsxs(_,{children:[m,f]}),e[29]=m,e[30]=f,e[31]=h):h=e[31];let p;e[32]!==S||e[33]!==n||e[34]!==h?(p=s.jsxs(ee,{filter:S,children:[n,h]}),e[32]=S,e[33]=n,e[34]=h,e[35]=p):p=e[35];let u;e[36]!==p||e[37]!==i?(u=s.jsx(le,{className:i,style:g,children:p}),e[36]=p,e[37]=i,e[38]=u):u=e[38];let b;return e[39]!==O||e[40]!==I||e[41]!==t||e[42]!==u||e[43]!==o?(b=s.jsxs(O,{open:I,onOpenChange:t,children:[o,u]}),e[39]=O,e[40]=I,e[41]=t,e[42]=u,e[43]=o,e[44]=b):b=e[44],b}export{ne as C};
1
+ import{c as J,r as K,j as s,l as y,B as Q}from"./index-BOGZM7Pw.js";import{i as U}from"./Check-CcPSzxsY.js";import{i as V}from"./Tool01-CGCC9pfF.js";import{C as W,a as X,b as Y,e as Z,c as _,f as ee}from"./command-D4xFqyr9.js";import{a as se,P as te,b as le}from"./popover-DvKxqM1r.js";function ne(q){const e=J.c(45),{options:j,value:l,onChange:v,placeholder:R,triggerClassName:$,contentClassName:N,width:A,renderTrigger:F,renderItem:r,emptyMessage:G,searchPlaceholder:L,filter:S,renderSearchAction:w}=q,z=R===void 0?"Select...":R,D=A===void 0?"w-[200px]":A,P=G===void 0?"No results found.":G,E=L===void 0?"Search...":L;let C;e[0]!==l?(C=x=>x.value===l,e[0]=l,e[1]=C):C=e[1];const T=j.find(C),[I,t]=K.useState(!1),O=te,B=se,H=!0,M=F?s.jsx("div",{className:y("cursor-pointer",$),children:F(T)}):s.jsxs(Q,{variant:"outline",role:"combobox",className:y("justify-between",D,$),children:[T?T.label:z,s.jsx(V,{className:"opacity-50"})]});let o;e[2]!==B||e[3]!==M?(o=s.jsx(B,{asChild:H,children:M}),e[2]=B,e[3]=M,e[4]=o):o=e[4];let i;e[5]!==N?(i=y("p-0",N),e[5]=N,e[6]=i):i=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[7]=g):g=e[7];let c;e[8]!==w||e[9]!==t?(c=w?.(()=>t(!1)),e[8]=w,e[9]=t,e[10]=c):c=e[10];let n;e[11]!==E||e[12]!==c?(n=s.jsx(W,{placeholder:E,className:"h-9",action:c}),e[11]=E,e[12]=c,e[13]=n):n=e[13];let m;e[14]!==P?(m=s.jsx(X,{children:P}),e[14]=P,e[15]=m):m=e[15];let d;if(e[16]!==v||e[17]!==j||e[18]!==r||e[19]!==t||e[20]!==l){let x;e[22]!==v||e[23]!==r||e[24]!==t||e[25]!==l?(x=a=>{const k=l===a.value;return s.jsx(Y,{value:a.label,onSelect:()=>{v(a.value===l?"":a.value),t(!1)},children:r?r(a,k):s.jsxs(s.Fragment,{children:[a.label,s.jsx(U,{className:y("ml-auto",k?"opacity-100":"opacity-0")})]})},a.value)},e[22]=v,e[23]=r,e[24]=t,e[25]=l,e[26]=x):x=e[26],d=j.map(x),e[16]=v,e[17]=j,e[18]=r,e[19]=t,e[20]=l,e[21]=d}else d=e[21];let f;e[27]!==d?(f=s.jsx(Z,{children:d}),e[27]=d,e[28]=f):f=e[28];let h;e[29]!==m||e[30]!==f?(h=s.jsxs(_,{children:[m,f]}),e[29]=m,e[30]=f,e[31]=h):h=e[31];let p;e[32]!==S||e[33]!==n||e[34]!==h?(p=s.jsxs(ee,{filter:S,children:[n,h]}),e[32]=S,e[33]=n,e[34]=h,e[35]=p):p=e[35];let u;e[36]!==p||e[37]!==i?(u=s.jsx(le,{className:i,style:g,children:p}),e[36]=p,e[37]=i,e[38]=u):u=e[38];let b;return e[39]!==O||e[40]!==I||e[41]!==t||e[42]!==u||e[43]!==o?(b=s.jsxs(O,{open:I,onOpenChange:t,children:[o,u]}),e[39]=O,e[40]=I,e[41]=t,e[42]=u,e[43]=o,e[44]=b):b=e[44],b}export{ne as C};
@@ -1 +1 @@
1
- import{c as v,l as h,j as r,aH as N}from"./index-D7hYEfbN.js";import{_ as b}from"./index-CYlLocPz.js";import{D as j,d as w,h as y,c as C,b as z}from"./dialog--2DE59f4.js";import{i as D}from"./SearchMd-B4g7zoIg.js";function $(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=v.c(28);let t,s,o,l,n,_,u;e[0]!==a?({title:_,description:u,children:t,className:s,filter:o,shouldFilter:n,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n,e[6]=_,e[7]=u):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5],_=e[6],u=e[7]);const f=_===void 0?"Command Palette":_,x=u===void 0?"Search for a command to run...":u;let g;e[8]!==f?(g=r.jsx(w,{children:f}),e[8]=f,e[9]=g):g=e[9];let i;e[10]!==x?(i=r.jsx(y,{children:x}),e[10]=x,e[11]=i):i=e[11];let d;e[12]!==g||e[13]!==i?(d=r.jsxs(C,{className:"sr-only",children:[g,i]}),e[12]=g,e[13]=i,e[14]=d):d=e[14];let c;e[15]!==s?(c=h("overflow-hidden p-0",s),e[15]=s,e[16]=c):c=e[16];let m;e[17]!==t||e[18]!==o||e[19]!==n?(m=r.jsx($,{filter:o,shouldFilter:n,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:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=n,e[20]=m):m=e[20];let p;e[21]!==c||e[22]!==m?(p=r.jsx(z,{className:c,closeButtonClassName:"hidden",children:m}),e[21]=c,e[22]=m,e[23]=p):p=e[23];let k;return e[24]!==l||e[25]!==d||e[26]!==p?(k=r.jsxs(j,{...l,children:[d,p]}),e[24]=l,e[25]=d,e[26]=p,e[27]=k):k=e[27],k}function R(a){const e=v.c(23);let t,s,o,l,n;e[0]!==a?({className:s,size:l,variant:n,action:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5]);const _=l===void 0?"default":l,u=n===void 0?"underline":n,f=_==="sm"?"h-9":"h-10",x=u==="boxed",g=x?"rounded-xl border border-input bg-transparent focus-within:border-ring":"border-b";let i;e[6]!==f||e[7]!==g?(i=h("flex items-center gap-2 px-3",f,g),e[6]=f,e[7]=g,e[8]=i):i=e[8];let d;e[9]!==x?(d=!x&&r.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[9]=x,e[10]=d):d=e[10];let c;e[11]!==s||e[12]!==f?(c=h("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",f,s),e[11]=s,e[12]=f,e[13]=c):c=e[13];let m;e[14]!==o||e[15]!==c?(m=r.jsx(b.Input,{"data-slot":"command-input",className:c,...o}),e[14]=o,e[15]=c,e[16]=m):m=e[16];let p;return e[17]!==t||e[18]!==i||e[19]!==d||e[20]!==m||e[21]!==u?(p=r.jsxs("div",{"data-slot":"command-input-wrapper","data-variant":u,className:i,children:[d,m,t]}),e[17]=t,e[18]=i,e[19]=d,e[20]=m,e[21]=u,e[22]=p):p=e[22],p}function V(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=v.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=r.jsx(b.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function P(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}const I=N("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"},size:{default:"",lg:"min-h-11 gap-3 rounded-lg px-2.5 py-2"}},defaultVariants:{highlight:"selected",size:"default"}});function T(a){const e=v.c(10);let t,s,o;e[0]!==a?({className:t,size:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let l;e[4]!==t||e[5]!==o?(l=h(I({size:o}),t),e[4]=t,e[5]=o,e[6]=l):l=e[6];let n;return e[7]!==s||e[8]!==l?(n=r.jsx(b.Item,{"data-slot":"command-item",className:l,...s}),e[7]=s,e[8]=l,e[9]=n):n=e[9],n}export{R as C,B as a,T as b,V as c,L as d,F as e,$ as f,I as g,P as h};
1
+ import{c as v,l as h,j as r,aH as N}from"./index-BOGZM7Pw.js";import{_ as b}from"./index-Ccz5AaI_.js";import{D as j,d as w,h as y,c as C,b as z}from"./dialog-CwJ0Tacd.js";import{i as D}from"./SearchMd-DJptVqPP.js";function $(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=v.c(28);let t,s,o,l,n,_,u;e[0]!==a?({title:_,description:u,children:t,className:s,filter:o,shouldFilter:n,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n,e[6]=_,e[7]=u):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5],_=e[6],u=e[7]);const f=_===void 0?"Command Palette":_,x=u===void 0?"Search for a command to run...":u;let g;e[8]!==f?(g=r.jsx(w,{children:f}),e[8]=f,e[9]=g):g=e[9];let i;e[10]!==x?(i=r.jsx(y,{children:x}),e[10]=x,e[11]=i):i=e[11];let d;e[12]!==g||e[13]!==i?(d=r.jsxs(C,{className:"sr-only",children:[g,i]}),e[12]=g,e[13]=i,e[14]=d):d=e[14];let c;e[15]!==s?(c=h("overflow-hidden p-0",s),e[15]=s,e[16]=c):c=e[16];let m;e[17]!==t||e[18]!==o||e[19]!==n?(m=r.jsx($,{filter:o,shouldFilter:n,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:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=n,e[20]=m):m=e[20];let p;e[21]!==c||e[22]!==m?(p=r.jsx(z,{className:c,closeButtonClassName:"hidden",children:m}),e[21]=c,e[22]=m,e[23]=p):p=e[23];let k;return e[24]!==l||e[25]!==d||e[26]!==p?(k=r.jsxs(j,{...l,children:[d,p]}),e[24]=l,e[25]=d,e[26]=p,e[27]=k):k=e[27],k}function R(a){const e=v.c(23);let t,s,o,l,n;e[0]!==a?({className:s,size:l,variant:n,action:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5]);const _=l===void 0?"default":l,u=n===void 0?"underline":n,f=_==="sm"?"h-9":"h-10",x=u==="boxed",g=x?"rounded-xl border border-input bg-transparent focus-within:border-ring":"border-b";let i;e[6]!==f||e[7]!==g?(i=h("flex items-center gap-2 px-3",f,g),e[6]=f,e[7]=g,e[8]=i):i=e[8];let d;e[9]!==x?(d=!x&&r.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[9]=x,e[10]=d):d=e[10];let c;e[11]!==s||e[12]!==f?(c=h("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",f,s),e[11]=s,e[12]=f,e[13]=c):c=e[13];let m;e[14]!==o||e[15]!==c?(m=r.jsx(b.Input,{"data-slot":"command-input",className:c,...o}),e[14]=o,e[15]=c,e[16]=m):m=e[16];let p;return e[17]!==t||e[18]!==i||e[19]!==d||e[20]!==m||e[21]!==u?(p=r.jsxs("div",{"data-slot":"command-input-wrapper","data-variant":u,className:i,children:[d,m,t]}),e[17]=t,e[18]=i,e[19]=d,e[20]=m,e[21]=u,e[22]=p):p=e[22],p}function V(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=v.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=r.jsx(b.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function P(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}const I=N("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"},size:{default:"",lg:"min-h-11 gap-3 rounded-lg px-2.5 py-2"}},defaultVariants:{highlight:"selected",size:"default"}});function T(a){const e=v.c(10);let t,s,o;e[0]!==a?({className:t,size:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let l;e[4]!==t||e[5]!==o?(l=h(I({size:o}),t),e[4]=t,e[5]=o,e[6]=l):l=e[6];let n;return e[7]!==s||e[8]!==l?(n=r.jsx(b.Item,{"data-slot":"command-item",className:l,...s}),e[7]=s,e[8]=l,e[9]=n):n=e[9],n}export{R as C,B as a,T as b,V as c,L as d,F as e,$ as f,I as g,P as h};