decocms 4.407.1 → 4.408.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 (347) hide show
  1. package/dist/client/assets/{AlertCircle-CqiDjZtO.js → AlertCircle-B4TBXI97.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DmB0UyKI.js → AreaChart-BT_BBtMg.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CoTYI8n8.js → ArrowLeft-Du5HwAty.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CBrn5XhG.js → ArrowRight-Bk-h8Spa.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CIy98yKC.js → ArrowUp-DfYHJg8n.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-Zpi0oHsU.js → CartesianChart-B5akGwBy.js} +1 -1
  7. package/dist/client/assets/{Check-D8fh3HxN.js → Check-e9hufNdV.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-OhMMVayl.js → CheckCircle-Du0Z4Mo4.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B02P5KVq.js → ChevronUp-Dijj6L1D.js} +1 -1
  10. package/dist/client/assets/{Copy01-D1VXAb_E.js → Copy01-Rd2DUITb.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-Buj0ay80.js → CreditCard01-CuV3PHbW.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BRGjxbLE.js → DotsVertical-CUOWG-18.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-B6URqiwQ.js → ErrorBarContext-BCo_1Dyd.js} +1 -1
  14. package/dist/client/assets/{Eye-CHDK5SzP.js → Eye-CATcYqq7.js} +1 -1
  15. package/dist/client/assets/{Globe04-DVrgctQH.js → Globe04-dvDQwL6D.js} +1 -1
  16. package/dist/client/assets/{Image01-Bospa-dw.js → Image01-CK0bgOXc.js} +1 -1
  17. package/dist/client/assets/{Key01-CDWjnJp8.js → Key01-B2Ks3SjW.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-BikLyKZh.js → LayoutLeft-o4EwT_f4.js} +1 -1
  19. package/dist/client/assets/{Line-DdFX7Wqo.js → Line-51pigb_T.js} +1 -1
  20. package/dist/client/assets/{Link01-D8neQKry.js → Link01-t9xcN1_J.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-6pj5RpJR.js → LinkExternal01-E0yllQfW.js} +1 -1
  22. package/dist/client/assets/{Monitor01-EpELW75B.js → Monitor01-2SrwE2A4.js} +1 -1
  23. package/dist/client/assets/{Palette-DWn5bbaO.js → Palette-DdJDZNuI.js} +1 -1
  24. package/dist/client/assets/{Plus-dO-o-OZ1.js → Plus-BfQMVZRL.js} +1 -1
  25. package/dist/client/assets/{SearchMd-BxSEQNj1.js → SearchMd-BPxAMeCu.js} +1 -1
  26. package/dist/client/assets/{Sector-De7bawQH.js → Sector-DomxOOd2.js} +1 -1
  27. package/dist/client/assets/{Share07-CpK9-QLV.js → Share07-CAPMGK5H.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-CqpFwFw-.js → ShoppingBag01-Dj-9rxCI.js} +1 -1
  29. package/dist/client/assets/{Sun-BIEAAQBy.js → Sun-Dc2rioTm.js} +1 -1
  30. package/dist/client/assets/{Tool01-wdU6mbFw.js → Tool01-DAfFPt6l.js} +1 -1
  31. package/dist/client/assets/{Trash01-Dy5IpZCR.js → Trash01-BpbNxWxU.js} +1 -1
  32. package/dist/client/assets/{Upload01-k78JIhqS.js → Upload01-Cu5y084h.js} +1 -1
  33. package/dist/client/assets/{User01-CRjEXTD9.js → User01-DZIaW3qt.js} +1 -1
  34. package/dist/client/assets/{UserSquare-XdFChMN5.js → UserSquare-CMMvch3p.js} +1 -1
  35. package/dist/client/assets/{Users01-LNPkBtQM.js → Users01-B6wD4vfR.js} +1 -1
  36. package/dist/client/assets/{X-BwnLOPPu.js → X-7V7RNG20.js} +1 -1
  37. package/dist/client/assets/{XClose-mbsgepx1.js → XClose-CgE_NvFQ.js} +1 -1
  38. package/dist/client/assets/{Zap-CKU9kVKj.js → Zap-BnKV6W7m.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-D1F1D8yI.js → ZoomOut-9vKhCWKn.js} +1 -1
  40. package/dist/client/assets/{access-gate-0oyoHLh0.js → access-gate-C2DM5elO.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-B2Lm5FSw.js → add-connection-dialog-CfJFvo0n.js} +1 -1
  42. package/dist/client/assets/{agent-analytics-BZhII6Sc.js → agent-analytics-D3NPULfo.js} +1 -1
  43. package/dist/client/assets/agent-app-CbeamK3b.js +1 -0
  44. package/dist/client/assets/{agent-assets-CuooEtas.js → agent-assets-Csm6M0Fe.js} +1 -1
  45. package/dist/client/assets/{agent-automation-qNPu2J1J.js → agent-automation-LvpxhSzD.js} +1 -1
  46. package/dist/client/assets/{agent-automations-DybjCNwT.js → agent-automations-CCXip6X6.js} +1 -1
  47. package/dist/client/assets/{agent-connect-sources-Bc1EY-5M.js → agent-connect-sources-Cx2sX-zQ.js} +1 -1
  48. package/dist/client/assets/agent-deck-DtYstLjo.js +1 -0
  49. package/dist/client/assets/{agent-e2e-CNS1tBeu.js → agent-e2e-Dd6W8dQn.js} +1 -1
  50. package/dist/client/assets/{agent-experiments-BNJx2Uga.js → agent-experiments-CcAMb-uk.js} +1 -1
  51. package/dist/client/assets/{agent-file-DFb8cNXj.js → agent-file-1tvyjICj.js} +1 -1
  52. package/dist/client/assets/{agent-git-Bf2Q05gW.js → agent-git-DAcJMVD4.js} +1 -1
  53. package/dist/client/assets/{agent-hosting-2OXTpkaH.js → agent-hosting-TSmf3TUW.js} +1 -1
  54. package/dist/client/assets/{agent-icon-BVQ4eiSp.js → agent-icon-CP5XN9a-.js} +1 -1
  55. package/dist/client/assets/agent-library-file-DQKMT-An.js +1 -0
  56. package/dist/client/assets/{agent-monitor-BOdJD8Za.js → agent-monitor-DFJdCDDa.js} +1 -1
  57. package/dist/client/assets/{agent-overview-Dq2ivtgU.js → agent-overview-DsLUNfy5.js} +1 -1
  58. package/dist/client/assets/agent-settings-DjUOw7yi.js +1 -0
  59. package/dist/client/assets/{agent-site-editor-BwFJgMkq.js → agent-site-editor-DVPUbL6E.js} +1 -1
  60. package/dist/client/assets/agent-site-editor-code-Btc2xHC2.js +2 -0
  61. package/dist/client/assets/{agent-site-editor-content-CEK4dCAj.js → agent-site-editor-content-D16Neg7_.js} +3 -3
  62. package/dist/client/assets/{agent-site-editor-preview-B3IcD5Vx.js → agent-site-editor-preview-DsyVdlnU.js} +3 -3
  63. package/dist/client/assets/agent-view-2NBoqN30.js +1 -0
  64. package/dist/client/assets/{agent-view-guard-8DkADQnc.js → agent-view-guard-B21vN7fV.js} +1 -1
  65. package/dist/client/assets/{agents-list-Ms4vP1N_.js → agents-list-CXO3qqSU.js} +1 -1
  66. package/dist/client/assets/{ai-providers-nE8SmeZZ.js → ai-providers-CS-7rqRe.js} +1 -1
  67. package/dist/client/assets/{alert-BXAqKYMq.js → alert-DA8xSuNw.js} +1 -1
  68. package/dist/client/assets/{alert-dialog-CZds33Na.js → alert-dialog-DOZYkVkM.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-BA_72ni2.js → analytics-sections-D-vmE_mj.js} +1 -1
  70. package/dist/client/assets/api-keys-B_m68tgF.js +1 -0
  71. package/dist/client/assets/{api-keys-C2mTwzEm.js → api-keys-Dw0ULTM2.js} +1 -1
  72. package/dist/client/assets/app-editor-BUq8LbjS.js +1 -0
  73. package/dist/client/assets/{asset-utils-BlHyLIZk.js → asset-utils-KW2eRq0C.js} +1 -1
  74. package/dist/client/assets/{auth-H8QpcxPz.js → auth-WDJFc9Hm.js} +1 -1
  75. package/dist/client/assets/{auth-catchall-DSeRpLFk.js → auth-catchall-DFKT24Uv.js} +1 -1
  76. package/dist/client/assets/{auth-entry-ItG1LnnA.js → auth-entry-D_MUtVLc.js} +1 -1
  77. package/dist/client/assets/{auth-split-layout-D4cQ_TzY.js → auth-split-layout-C2beZWug.js} +1 -1
  78. package/dist/client/assets/{authenticate-and-persist-oauth-CByyYh2r.js → authenticate-and-persist-oauth-BdWTTo89.js} +1 -1
  79. package/dist/client/assets/{automation-list-row-CVtICczc.js → automation-list-row-DF4C0izx.js} +1 -1
  80. package/dist/client/assets/{automation-runs-B-726bZk.js → automation-runs-a1jd9j7n.js} +1 -1
  81. package/dist/client/assets/{automations-DMGTV0n1.js → automations-Cn4R0PwJ.js} +1 -1
  82. package/dist/client/assets/{autosend-C9P73iEp.js → autosend-BUpRVcwj.js} +1 -1
  83. package/dist/client/assets/{avatar-CU8lt9cG.js → avatar-JIBRtdC_.js} +1 -1
  84. package/dist/client/assets/{badge-DFURQVVL.js → badge-6y8k_9-5.js} +1 -1
  85. package/dist/client/assets/{block-document-D8PH4-_C.js → block-document-CIJVCQ3G.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-BWEYeVE-.js → blocks-preview-workspace-context-D1BaC02Q.js} +1 -1
  87. package/dist/client/assets/{buckets-D-Ou3nAx.js → buckets-C9rH2WAo.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-Cr2dVb8Z.js → build-improve-prompt-doc-uYATas8q.js} +1 -1
  89. package/dist/client/assets/{calendar-C0TNAbuF.js → calendar-C9s_iZ3-.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-IMp7H0U5.js → capability-load-error-BPW-viM7.js} +1 -1
  91. package/dist/client/assets/{cards-C0HEmP6V.js → cards-j_YM4uLm.js} +1 -1
  92. package/dist/client/assets/{category-editor-BOryu3oh.js → category-editor-CJshYeZK.js} +1 -1
  93. package/dist/client/assets/{chart-DQxGCNwG.js → chart-BXtamRvp.js} +1 -1
  94. package/dist/client/assets/{chat-context-BSiYT6x-.js → chat-context-B6r2nJ6g.js} +1 -1
  95. package/dist/client/assets/{chat-draft-BYWaPW2i.js → chat-draft-CerneUSv.js} +1 -1
  96. package/dist/client/assets/{checkbox-CFcmjH8P.js → checkbox-CjlcA4Zf.js} +1 -1
  97. package/dist/client/assets/{choose-editor-D_Q-s8bQ.js → choose-editor-CCjCgFix.js} +1 -1
  98. package/dist/client/assets/{claim-phase-copy-BwvtJUCV.js → claim-phase-copy-Dvvzpbgr.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-DSnJnolh.js → cli-auth-success-Cp9ve11h.js} +1 -1
  100. package/dist/client/assets/{client-icons-DEUB9Vg6.js → client-icons-CZY4712U.js} +1 -1
  101. package/dist/client/assets/{collapsible-a49rGOz6.js → collapsible-D8RyGf9b.js} +1 -1
  102. package/dist/client/assets/{collection-detail-CZEkDE3N.js → collection-detail-ivXkBsms.js} +1 -1
  103. package/dist/client/assets/{collection-display-button-BlP4Uqw9.js → collection-display-button-COB8om2q.js} +1 -1
  104. package/dist/client/assets/{collection-search-BSlnvqKA.js → collection-search-Bm4yfKio.js} +1 -1
  105. package/dist/client/assets/{collection-table-wrapper-CAb0M2wu.js → collection-table-wrapper-DR3ABum3.js} +1 -1
  106. package/dist/client/assets/{collection-tabs-DmB7ERnW.js → collection-tabs-CyEDGPVJ.js} +1 -1
  107. package/dist/client/assets/{combobox-mwCqJmES.js → combobox--akRwZt5.js} +1 -1
  108. package/dist/client/assets/{command-CaEhDN7h.js → command-BXe_2Y8J.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-By__A48R.js → companion-mcps-section-bE4HzUrd.js} +1 -1
  110. package/dist/client/assets/{connect-C4yHJZCA.js → connect-CA2SeR7c.js} +1 -1
  111. package/dist/client/assets/{connect-layout-C61-VnOR.js → connect-layout-D-VHpq78.js} +1 -1
  112. package/dist/client/assets/{connection-Ca2YXP4J.js → connection-C1K_L2Xe.js} +1 -1
  113. package/dist/client/assets/{connection-card-BY3_Gacl.js → connection-card-C0UBOriU.js} +1 -1
  114. package/dist/client/assets/{connection-detail-sfM64Mg-.js → connection-detail-B54gylCL.js} +1 -1
  115. package/dist/client/assets/{connection-form-helpers-DrqEsKFW.js → connection-form-helpers-DmenEJQq.js} +1 -1
  116. package/dist/client/assets/{connections-Zz3LzI2c.js → connections-qW3uwEes.js} +1 -1
  117. package/dist/client/assets/{context-Bhv0bFWJ.js → context-D8xt-q96.js} +1 -1
  118. package/dist/client/assets/{create-organization-dialog-BgUibshB.js → create-organization-dialog-CfY_Fp3w.js} +1 -1
  119. package/dist/client/assets/{decopilot-BOdao_R4.js → decopilot-C7BBIc4w.js} +1 -1
  120. package/dist/client/assets/{dialog-DJsfAYzZ.js → dialog-B9AmIVi-.js} +1 -1
  121. package/dist/client/assets/{discover-BPSUFufF.js → discover-C2vIznYH.js} +1 -1
  122. package/dist/client/assets/{domain-settings-Yo5MD25-.js → domain-settings-CadsJlyS.js} +1 -1
  123. package/dist/client/assets/{download-app-dialog-58eeoMgv.js → download-app-dialog-BngIghKX.js} +1 -1
  124. package/dist/client/assets/{drawer-B2h_E7ZU.js → drawer-Cmzocoxj.js} +1 -1
  125. package/dist/client/assets/{editor-BN9OQ3T_.js → editor-B64zb0TF.js} +1 -1
  126. package/dist/client/assets/{empty-state-Tcy6goml.js → empty-state-CnuzaP1O.js} +1 -1
  127. package/dist/client/assets/{empty-state-BShA_Zt_.js → empty-state-Df0p9Roq.js} +1 -1
  128. package/dist/client/assets/{extract-connection-data-BlOiGNBy.js → extract-connection-data-ZkeqSXbM.js} +1 -1
  129. package/dist/client/assets/{feature-gate-BlZO1dlo.js → feature-gate-D1_CJv3S.js} +1 -1
  130. package/dist/client/assets/{feature-paywall-Bvq165uY.js → feature-paywall-BK6Diems.js} +1 -1
  131. package/dist/client/assets/{file-explorer-t-yyOrQ2.js → file-explorer-B5hK7sWB.js} +1 -1
  132. package/dist/client/assets/{file-preview-DV0egHtJ.js → file-preview-BAf9QLKP.js} +1 -1
  133. package/dist/client/assets/{file-share-button--q2NXT9M.js → file-share-button-z0zbJCjq.js} +1 -1
  134. package/dist/client/assets/{file-type-icon-eovymU8z.js → file-type-icon-ddHjZWG7.js} +1 -1
  135. package/dist/client/assets/{folder-icon-DM-fT3_E.js → folder-icon-CGbzITGc.js} +1 -1
  136. package/dist/client/assets/{form-CQb0RBzJ.js → form-CIkzBIkD.js} +1 -1
  137. package/dist/client/assets/{gateway-client-BQJuH-u5.js → gateway-client-BfoDyNyS.js} +1 -1
  138. package/dist/client/assets/{general-DlwjNv1u.js → general-0uJSAIg1.js} +1 -1
  139. package/dist/client/assets/{github-icon-czgJF8rE.js → github-icon-ZHfVS9cH.js} +1 -1
  140. package/dist/client/assets/{home-CPOYzyNO.js → home-fbC7tn9p.js} +1 -1
  141. package/dist/client/assets/{hooks-BjpNlqA7.js → hooks-DETt4AT1.js} +1 -1
  142. package/dist/client/assets/{icon-button-tuRLg8j7.js → icon-button-B2SkFvD9.js} +1 -1
  143. package/dist/client/assets/{index-DL9QYxDl.js → index-5-VvRKCO.js} +1 -1
  144. package/dist/client/assets/{index-C-zKandM.js → index-B7X5CqyW.js} +1 -1
  145. package/dist/client/assets/{index-ChDRElR2.js → index-BAMGe25h.js} +1 -1
  146. package/dist/client/assets/{index-CRWXLb_O.js → index-BEGmWtb3.js} +1 -1
  147. package/dist/client/assets/{index-CdRlCc6V.js → index-CIQBtrDT.js} +1 -1
  148. package/dist/client/assets/{index-DKHVLAZY.js → index-CKwDISQd.js} +1 -1
  149. package/dist/client/assets/{index-BFsoPEqX.js → index-DIXFYX3T.js} +1 -1
  150. package/dist/client/assets/{index-AQWsWtp7.js → index-DNZ8aOGc.js} +1 -1
  151. package/dist/client/assets/{index-DYoRF-O4.js → index-DRbZIwZq.js} +1 -1
  152. package/dist/client/assets/{index-MsCW10BI.js → index-DeHNRxdT.js} +1 -1
  153. package/dist/client/assets/{index-D5YaP9fl.js → index-SYS1m8f-.js} +1 -1
  154. package/dist/client/assets/{index-la7MvvCD.js → index-izHBwn3I.js} +2 -2
  155. package/dist/client/assets/{index-mhdC9JUY.js → index-nrrh0CII.js} +1 -1
  156. package/dist/client/assets/{index-redirect-DnYgi54M.js → index-redirect-9bNSLe_3.js} +1 -1
  157. package/dist/client/assets/{index-HrpTfEP9.js → index-xb9O7QC9.js} +1 -1
  158. package/dist/client/assets/{infiniteQueryObserver-DHGpRERl.js → infiniteQueryObserver-DiUuMuMD.js} +1 -1
  159. package/dist/client/assets/{infra-billing-BF-bWe5S.js → infra-billing-MS1pmTh3.js} +1 -1
  160. package/dist/client/assets/{input-BCLmKz5x.js → input-BLSONHqE.js} +1 -1
  161. package/dist/client/assets/{input-B0WmrbVe.js → input-C9yULiWh.js} +1 -1
  162. package/dist/client/assets/{input-DtLRf-AB.js → input-tXV80IJ3.js} +1 -1
  163. package/dist/client/assets/{integration-icon-CJHZMMbJ.js → integration-icon-Vvc8ojiC.js} +1 -1
  164. package/dist/client/assets/{label-2xig-2_L.js → label-BIuQy2__.js} +1 -1
  165. package/dist/client/assets/{last-preview-page-bq3_FCxn.js → last-preview-page-PW6mp0AD.js} +1 -1
  166. package/dist/client/assets/{layout-R3Ne2FL_.js → layout-CGB_h5K-.js} +1 -1
  167. package/dist/client/assets/{legacy-agents-deep-Buz-954t.js → legacy-agents-deep-CUAA26fQ.js} +1 -1
  168. package/dist/client/assets/{legacy-main-redirect-Dx9gt9UU.js → legacy-main-redirect-BMP2JlQ8.js} +1 -1
  169. package/dist/client/assets/{library-BL5YGRzC.js → library-SSPs2Mk7.js} +1 -1
  170. package/dist/client/assets/{login-BZVErza-.js → login-CFVOuIMS.js} +1 -1
  171. package/dist/client/assets/{markdown-D6wMhWiM.js → markdown-BNo5hmT4.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-CDjIsVDu.js → mcp-app-renderer-DC6jfKUS.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-W0WZ-aUZ.js → mcp-oauth-B-JicvF4.js} +1 -1
  174. package/dist/client/assets/{members-Qfvwu1Jq.js → members-BPE4uAmB.js} +1 -1
  175. package/dist/client/assets/{message-templates-hrxYBvQV.js → message-templates-Dbunnp9s.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-DjujmGFr.js → mini-report-page-BV-nrHu-.js} +1 -1
  177. package/dist/client/assets/{mock-board-BeeOkGmH.js → mock-board-BG3v7vPA.js} +3 -3
  178. package/dist/client/assets/{monaco-editor-DNIvxekG.js → monaco-editor-BhwzWl9K.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-DHuwpNpA.js → monitoring-stats-row-SjTsJ9Vo.js} +1 -1
  180. package/dist/client/assets/{multi-select-CVLav2Kg.js → multi-select-DsBbPc3L.js} +1 -1
  181. package/dist/client/assets/{mustache-D2pffCPO.js → mustache-Dhzc6QWC.js} +1 -1
  182. package/dist/client/assets/{oauth-callback-1SRi76nH.js → oauth-callback-C9qvlwPd.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-ai-provider-LQfrzFT9.js → oauth-callback-ai-provider-BLsrFMT9.js} +1 -1
  184. package/dist/client/assets/{onboarding-CHQ2K1zC.js → onboarding-DdgObshe.js} +1 -1
  185. package/dist/client/assets/{optimistic-project-sidebar-views-CKMtyBc7.js → optimistic-project-sidebar-views-BCSGdK6N.js} +1 -1
  186. package/dist/client/assets/{org-file-open-context-0Xek-YPZ.js → org-file-open-context-LEXGiXCZ.js} +1 -1
  187. package/dist/client/assets/{organization-choice-Cg6gj7Tb.js → organization-choice-DWiDrQVs.js} +1 -1
  188. package/dist/client/assets/{orgs-auyCtT1J.js → orgs-CYRhbeGN.js} +1 -1
  189. package/dist/client/assets/{page-seo-form-CpOqrpjk.js → page-seo-form-Cp5_stqo.js} +1 -1
  190. package/dist/client/assets/{pair-BvJe2vuW.js → pair-BJZlwx5z.js} +1 -1
  191. package/dist/client/assets/{plan-ladder-BDecMKba.js → plan-ladder-BCVwOSVp.js} +1 -1
  192. package/dist/client/assets/{popover-57eEekDu.js → popover-BiGAM8js.js} +1 -1
  193. package/dist/client/assets/{post-calendar-DeEV8AFn.js → post-calendar-DKkZ8xsV.js} +1 -1
  194. package/dist/client/assets/{post-editor-CmLdNVzQ.js → post-editor-C-1jCs1B.js} +1 -1
  195. package/dist/client/assets/{preview-content-WYDokyps.js → preview-content-CJyGfLqn.js} +1 -1
  196. package/dist/client/assets/{preview-dialog-BxYYoE1U.js → preview-dialog-D4GsgUKO.js} +1 -1
  197. package/dist/client/assets/{profile-B6Yyj2rq.js → profile-FdAYJLKb.js} +1 -1
  198. package/dist/client/assets/{project-app-view-pAOgWYFa.js → project-app-view-B9SXqzvV.js} +1 -1
  199. package/dist/client/assets/{project-feed-BbLtZ21V.js → project-feed-D09MAcoq.js} +1 -1
  200. package/dist/client/assets/{project-icon-Cbpot0NA.js → project-icon-BfMBNeXz.js} +1 -1
  201. package/dist/client/assets/project-reports-DwtBmH51.js +1 -0
  202. package/dist/client/assets/project-tasks-CN6hEoJ8.js +1 -0
  203. package/dist/client/assets/{prompts-BALUrguv.js → prompts-DDRxwhhq.js} +1 -1
  204. package/dist/client/assets/record-editor-VDQOze8g.js +1 -0
  205. package/dist/client/assets/{redirect-editor-B2IozbZ6.js → redirect-editor-Cbk1QsyX.js} +1 -1
  206. package/dist/client/assets/{reports-RkxkIHme.js → reports-C7YnJw_5.js} +1 -1
  207. package/dist/client/assets/{reports-onboarding-DOwSa27p.js → reports-onboarding-DhCB4bD9.js} +1 -1
  208. package/dist/client/assets/{reports-tab-Bm6higcG.js → reports-tab-Do-8_DzV.js} +2 -2
  209. package/dist/client/assets/reports-wlU1uxEN.js +1 -0
  210. package/dist/client/assets/{repositories-krbAkvGh.js → repositories-BDnwrsmL.js} +1 -1
  211. package/dist/client/assets/{repository-import-picker-B_v72BhY.js → repository-import-picker-DHUG6o-B.js} +1 -1
  212. package/dist/client/assets/{repository-picker-LOfOejYP.js → repository-picker-TE4ZcEAF.js} +1 -1
  213. package/dist/client/assets/{require-capability-DKLCcKep.js → require-capability-Hi6Rc10j.js} +1 -1
  214. package/dist/client/assets/{required-auth-layout-CGa3XL_A.js → required-auth-layout-qs1Hm0B9.js} +1 -1
  215. package/dist/client/assets/{reset-password-ClXtKGtt.js → reset-password-BHO5OYEQ.js} +1 -1
  216. package/dist/client/assets/{resizable-DY3zDAh-.js → resizable-DvI1E7pk.js} +1 -1
  217. package/dist/client/assets/{resolve-tab-icon-BSK_ZtfY.js → resolve-tab-icon-nUEsT-q-.js} +1 -1
  218. package/dist/client/assets/{review-settings-CvTj3ng-.js → review-settings-QvrNgLQu.js} +1 -1
  219. package/dist/client/assets/{rich-text-link-control-B1xoqjFM.js → rich-text-link-control-DxPxXWmB.js} +1 -1
  220. package/dist/client/assets/{roles-CV5sMEK7.js → roles-Cgr78ewd.js} +1 -1
  221. package/dist/client/assets/{route-Cq82r011.js → route-BZFTlR2C.js} +1 -1
  222. package/dist/client/assets/{route-Dcm53IEy.js → route-CTkokDka.js} +1 -1
  223. package/dist/client/assets/{route-B0wlApnN.js → route-CawzfcpW.js} +1 -1
  224. package/dist/client/assets/{route-page-header-B1JKzg0J.js → route-page-header-KSRwTD4y.js} +1 -1
  225. package/dist/client/assets/{runnable-block-editor-BW1O_q1l.js → runnable-block-editor-CJpnHgrX.js} +1 -1
  226. package/dist/client/assets/{sandbox-lifecycle-context-IVo09SV7.js → sandbox-lifecycle-context-D0nuKJ_b.js} +1 -1
  227. package/dist/client/assets/{schema-D41P9rFK.js → schema-DNqDLF82.js} +1 -1
  228. package/dist/client/assets/{scroll-area-DtUzJSfO.js → scroll-area-DQZQeCpt.js} +1 -1
  229. package/dist/client/assets/{search-input-QqxNG-MM.js → search-input-BQOyz7rC.js} +1 -1
  230. package/dist/client/assets/{search-toggle-BatppdaH.js → search-toggle-B9bFME_G.js} +1 -1
  231. package/dist/client/assets/{secret-picker-C-mBD0ue.js → secret-picker-BprAET2c.js} +1 -1
  232. package/dist/client/assets/{secrets-xSiF3fuq.js → secrets-BrFL2imQ.js} +1 -1
  233. package/dist/client/assets/{sections-editor-BrGiGYM9.js → sections-editor-6HKWBNOE.js} +1 -1
  234. package/dist/client/assets/{select-Z1B5hMAv.js → select-BsUP6XU-.js} +1 -1
  235. package/dist/client/assets/{select-model-DARJfYvZ.js → select-model-DX5_kOlo.js} +1 -1
  236. package/dist/client/assets/{seo-editor-DkZTFtbW.js → seo-editor-DCzXUICs.js} +1 -1
  237. package/dist/client/assets/{separator-DO9SDVcD.js → separator-gB9bmgZ5.js} +1 -1
  238. package/dist/client/assets/{settings-tab-DkiqqnlX.js → settings-tab-C6cS3QDh.js} +1 -1
  239. package/dist/client/assets/{sheet-CvN1ikSs.js → sheet-DTIr0quY.js} +1 -1
  240. package/dist/client/assets/{shell-layout-BIxmWbtr.js → shell-layout-BadbomY4.js} +1 -1
  241. package/dist/client/assets/{skill-preview-CHP7SuX_.js → skill-preview-CrxujJbZ.js} +1 -1
  242. package/dist/client/assets/{skills-TAgw84aD.js → skills-BjCVlq9E.js} +1 -1
  243. package/dist/client/assets/{sso-Lmq-9UoE.js → sso-H7fs23iU.js} +1 -1
  244. package/dist/client/assets/{suggestion-5RVby0S_.js → suggestion-Cub6xPAJ.js} +1 -1
  245. package/dist/client/assets/{switch-CtDu-MBx.js → switch-BjEW4lQy.js} +1 -1
  246. package/dist/client/assets/{synced-repos-BwvEZogL.js → synced-repos-BOQveWA9.js} +1 -1
  247. package/dist/client/assets/{tab-icon-glyph-DUN-h4u2.js → tab-icon-glyph-BvrqhHgJ.js} +1 -1
  248. package/dist/client/assets/{table-B9-VMZYP.js → table-DeAQZdMp.js} +1 -1
  249. package/dist/client/assets/{tabs-Q0hITVpE.js → tabs-UXACuQIA.js} +1 -1
  250. package/dist/client/assets/{task-board-DVxNVXhb.js → task-board-CFetJZKk.js} +1 -1
  251. package/dist/client/assets/{task-route-DMmR_2lC.js → task-route-uQ4EUqTW.js} +1 -1
  252. package/dist/client/assets/{task-status-DU--pTl-.js → task-status-VgarGQNj.js} +1 -1
  253. package/dist/client/assets/{taskboard-analytics-DOI9G9_P.js → taskboard-analytics-057esZ8F.js} +1 -1
  254. package/dist/client/assets/tasks-B88XVIi1.js +1 -0
  255. package/dist/client/assets/{tasks-Cilk6wif.js → tasks-DM161h6Q.js} +1 -1
  256. package/dist/client/assets/{textarea-qfhaNSmC.js → textarea-tfNNqm-_.js} +1 -1
  257. package/dist/client/assets/{thread-analytics-BZ3RK1l1.js → thread-analytics-D6lYkGRr.js} +1 -1
  258. package/dist/client/assets/{thread-button-CMx8Gju3.js → thread-button-CqHz48Ii.js} +1 -1
  259. package/dist/client/assets/{thread-intent-CqTshOQy.js → thread-intent-EOvgTchU.js} +1 -1
  260. package/dist/client/assets/{thread-route-TlKg3LdX.js → thread-route-Dg7kv_hv.js} +1 -1
  261. package/dist/client/assets/{thread-route-9TfWumfl.js → thread-route-DwXk0pzt.js} +1 -1
  262. package/dist/client/assets/{thread-sheet-body-CokQYhbs.js → thread-sheet-body-BN1cpBVG.js} +1 -1
  263. package/dist/client/assets/{toggle-group-DPbXSYWV.js → toggle-group-DfCcVTyX.js} +1 -1
  264. package/dist/client/assets/{toolbar-icon-button-B9nlex_6.js → toolbar-icon-button-DOCtjUrJ.js} +1 -1
  265. package/dist/client/assets/{tooltip-CoZI31uD.js → tooltip-DqtfkXwI.js} +1 -1
  266. package/dist/client/assets/{track-BKL5LAvY.js → track-CWXt8cRU.js} +1 -1
  267. package/dist/client/assets/{types-rPt_-Qll.js → types-QqaS24ZV.js} +1 -1
  268. package/dist/client/assets/{usage-stats-BuI3unRc.js → usage-stats-GlPgZezF.js} +1 -1
  269. package/dist/client/assets/{use-ai-providers-D7OXOS-G.js → use-ai-providers-BGPaB7ua.js} +1 -1
  270. package/dist/client/assets/{use-automations-z7xbjQIQ.js → use-automations-DoGtKsiF.js} +1 -1
  271. package/dist/client/assets/{use-autosave-Bxiu0vla.js → use-autosave-D1L_iXh-.js} +1 -1
  272. package/dist/client/assets/{use-connect-companion-BTjPom26.js → use-connect-companion-C9bH45vI.js} +1 -1
  273. package/dist/client/assets/{use-connection-CPDdSysq.js → use-connection-BsLte2he.js} +1 -1
  274. package/dist/client/assets/{use-copy-C0ynkPTX.js → use-copy-CaOPCxF5.js} +1 -1
  275. package/dist/client/assets/{use-create-virtual-mcp-BZO8qY0j.js → use-create-virtual-mcp-BE_pJ71b.js} +1 -1
  276. package/dist/client/assets/{use-date-fns-locale-BqXKjYjg.js → use-date-fns-locale-Cjw89uE-.js} +1 -1
  277. package/dist/client/assets/{use-debounced-autosave-CLPi0hya.js → use-debounced-autosave-CmBQ3Dtm.js} +1 -1
  278. package/dist/client/assets/{use-debounced-value-B-zmOhoh.js → use-debounced-value-D1fDrXmw.js} +1 -1
  279. package/dist/client/assets/{use-deco-credits-CNEoBh1g.js → use-deco-credits-BnljnX-n.js} +1 -1
  280. package/dist/client/assets/{use-decopilot-events-BoV3es7X.js → use-decopilot-events-oRqi_MUt.js} +1 -1
  281. package/dist/client/assets/{use-delete-connection-LK4cZZqb.js → use-delete-connection-CfXTYsut.js} +1 -1
  282. package/dist/client/assets/{use-deployment-admin-C6TOor9I.js → use-deployment-admin-BYSK4yu-.js} +1 -1
  283. package/dist/client/assets/{use-entitlements-DlE4tXhq.js → use-entitlements-g5-cEVzp.js} +1 -1
  284. package/dist/client/assets/{use-fast-preview-draft-url-5uqeJHN1.js → use-fast-preview-draft-url-ByATm-6k.js} +1 -1
  285. package/dist/client/assets/{use-file-configs-yZYdsSBL.js → use-file-configs-D0LRhOPo.js} +1 -1
  286. package/dist/client/assets/{use-in-settings-BjcHlhO5.js → use-in-settings-BA5wQFQ2.js} +1 -1
  287. package/dist/client/assets/{use-infinite-scroll-KcE3dKaA.js → use-infinite-scroll-EFF__ehg.js} +1 -1
  288. package/dist/client/assets/{use-join-requests-DqLd88Kn.js → use-join-requests-Df_QAPcD.js} +1 -1
  289. package/dist/client/assets/{use-main-panel-tabs-UUqYOyvz.js → use-main-panel-tabs-4SKVKtlD.js} +1 -1
  290. package/dist/client/assets/{use-mcp-auth-status-CuSCsS3V.js → use-mcp-auth-status-r6Fv7Ux6.js} +1 -1
  291. package/dist/client/assets/{use-mcp-client-B9CL9mXZ.js → use-mcp-client-CNVDhuvd.js} +1 -1
  292. package/dist/client/assets/{use-mcp-prompts-DxFmwtgG.js → use-mcp-prompts-Bd28eC02.js} +1 -1
  293. package/dist/client/assets/{use-mcp-tools-NkAGGesA.js → use-mcp-tools-D1dyg5U7.js} +1 -1
  294. package/dist/client/assets/{use-members-mJ_vsORi.js → use-members-CcYULDVF.js} +1 -1
  295. package/dist/client/assets/{use-mobile-CO15Vvi5.js → use-mobile-Dn4_VWcj.js} +1 -1
  296. package/dist/client/assets/{use-navigate-to-agent-DXSW85Ka.js → use-navigate-to-agent-soNoKU2z.js} +1 -1
  297. package/dist/client/assets/use-new-blocks-editor-_DNbqg93.js +1 -0
  298. package/dist/client/assets/{use-open-billing-url-yYOsq126.js → use-open-billing-url-DLsqsUAn.js} +1 -1
  299. package/dist/client/assets/{use-org-auth-client-Bu1d-xI_.js → use-org-auth-client-BbRXHP84.js} +1 -1
  300. package/dist/client/assets/{use-org-fs-D3qiMbvK.js → use-org-fs-B9N-OGu5.js} +1 -1
  301. package/dist/client/assets/{use-org-sso-HLuhRfMG.js → use-org-sso-DcCWDiTW.js} +1 -1
  302. package/dist/client/assets/{use-organization-roles-Dt3Wxaut.js → use-organization-roles-CIWlEEfM.js} +1 -1
  303. package/dist/client/assets/{use-organization-settings-DAp3UXWL.js → use-organization-settings-BWZsG9HZ.js} +1 -1
  304. package/dist/client/assets/{use-panel-navigate-DpDJATeP.js → use-panel-navigate-BpzTFK7R.js} +1 -1
  305. package/dist/client/assets/{use-project-native-view-presence-oox2PoJv.js → use-project-native-view-presence-Bn9lK-SY.js} +1 -1
  306. package/dist/client/assets/{use-project-scope-CRxtlodI.js → use-project-scope-DIRKMaLK.js} +1 -1
  307. package/dist/client/assets/{use-releases-CFEyzv5l.js → use-releases-DBFdzdKG.js} +1 -1
  308. package/dist/client/assets/{use-reports-diagnostic-DTRVC09n.js → use-reports-diagnostic-M-tFAPHb.js} +1 -1
  309. package/dist/client/assets/{use-route-default-main-vbSzjPnk.js → use-route-default-main-BeQVGvWs.js} +1 -1
  310. package/dist/client/assets/{use-secrets-C-srj8mK.js → use-secrets-BtIO9CRs.js} +1 -1
  311. package/dist/client/assets/{use-section-preview-base-DKdR_SDL.js → use-section-preview-base-CgQax-JH.js} +1 -1
  312. package/dist/client/assets/{use-session-runtime-DX22bfMF.js → use-session-runtime-CHP3YGA3.js} +1 -1
  313. package/dist/client/assets/{use-tags-ZX6Z9wHS.js → use-tags-Dx91jKms.js} +1 -1
  314. package/dist/client/assets/{use-task-board-analytics-gGCzAptX.js → use-task-board-analytics-DO-u1jni.js} +1 -1
  315. package/dist/client/assets/{use-task-metadata-C8C_PmHj.js → use-task-metadata-BxMvdi8M.js} +1 -1
  316. package/dist/client/assets/{use-thread-analytics-BXxtgoOB.js → use-thread-analytics-Duxs7POX.js} +1 -1
  317. package/dist/client/assets/{use-thread-outputs-DWpGJipS.js → use-thread-outputs-BmNXBkF5.js} +1 -1
  318. package/dist/client/assets/{use-virtual-mcp-CWjAgZ_C.js → use-virtual-mcp-D8Whl5cH.js} +1 -1
  319. package/dist/client/assets/useInfiniteQuery-ByafV4ZI.js +1 -0
  320. package/dist/client/assets/{useQueries-DZcanOle.js → useQueries-e2PQJS28.js} +1 -1
  321. package/dist/client/assets/useSuspenseInfiniteQuery-CflcpPwQ.js +1 -0
  322. package/dist/client/assets/{users-7r6H1fxa.js → users-OvID5j24.js} +1 -1
  323. package/dist/client/assets/{utils-CqblQM8O.js → utils-Dn4NkWqd.js} +1 -1
  324. package/dist/client/assets/{variant-calendar-Dd4D8c-D.js → variant-calendar-D7VOB7kp.js} +1 -1
  325. package/dist/client/assets/{variant-matcher-override-B-CtC_QE.js → variant-matcher-override-CVQeLuOR.js} +1 -1
  326. package/dist/client/assets/{view-mode-toggle-BZtTUFXf.js → view-mode-toggle-5kJtAe-y.js} +1 -1
  327. package/dist/client/assets/{virtual-mcp-CPBnFFsB.js → virtual-mcp-DWa9T_f2.js} +1 -1
  328. package/dist/client/index.html +1 -1
  329. package/dist/server/cli.js +81 -81
  330. package/dist/server/server.js +223 -223
  331. package/package.json +1 -1
  332. package/dist/client/assets/agent-app-BNUwBXYq.js +0 -1
  333. package/dist/client/assets/agent-deck-Bp5a_bfF.js +0 -1
  334. package/dist/client/assets/agent-library-file-D1rkXH6g.js +0 -1
  335. package/dist/client/assets/agent-settings-CjmR1FyN.js +0 -1
  336. package/dist/client/assets/agent-site-editor-code-BJHtR0NW.js +0 -2
  337. package/dist/client/assets/agent-view-DSVixx3B.js +0 -1
  338. package/dist/client/assets/api-keys-QLTg329O.js +0 -1
  339. package/dist/client/assets/app-editor-3cEBKiKd.js +0 -1
  340. package/dist/client/assets/project-reports-CDn4J1zo.js +0 -1
  341. package/dist/client/assets/project-tasks-BME3lPuD.js +0 -1
  342. package/dist/client/assets/record-editor-Dly6eoym.js +0 -1
  343. package/dist/client/assets/reports-D_64de9i.js +0 -1
  344. package/dist/client/assets/tasks-CqM_oFvc.js +0 -1
  345. package/dist/client/assets/use-new-blocks-editor-CB_7yWVh.js +0 -1
  346. package/dist/client/assets/useInfiniteQuery-D2SNl7a0.js +0 -1
  347. package/dist/client/assets/useSuspenseInfiniteQuery-Dw6PIqvY.js +0 -1
@@ -1 +1 @@
1
- import{c as _,b as w,X as E,j as o,L as G,q as H,B as D,ad as q,a3 as J,K as X,m as Z,a as Q,r as L,ac as U,n as z,h as V}from"./index-la7MvvCD.js";import{ChatLayout as W}from"./index-DL9QYxDl.js";import{C as ee}from"./input-DtLRf-AB.js";import{D as te,C as oe}from"./chat-context-BSiYT6x-.js";import{a as re}from"./use-organization-settings-DAp3UXWL.js";import{s as ie}from"./Plus-dO-o-OZ1.js";import{a as se}from"./UserSquare-XdFChMN5.js";import{E as ne}from"./empty-state-BShA_Zt_.js";import{R as le}from"./repository-import-picker-B_v72BhY.js";import{o as me}from"./shell-layout-BIxmWbtr.js";import{i as K}from"./ArrowRight-CBrn5XhG.js";import{C as ae,a as ce,b as pe}from"./client-icons-DEUB9Vg6.js";import{u as fe,b as de,P as ue}from"./project-feed-BbLtZ21V.js";import{A as ge}from"./agent-icon-BVQ4eiSp.js";import{u as xe}from"./use-navigate-to-agent-DXSW85Ka.js";import{b as he}from"./task-route-DMmR_2lC.js";import{s as je}from"./use-project-scope-CRxtlodI.js";import{b as be}from"./use-virtual-mcp-CWjAgZ_C.js";import"./use-mobile-CO15Vvi5.js";import"./thread-button-CMx8Gju3.js";import"./use-in-settings-BjcHlhO5.js";import"./sheet-CvN1ikSs.js";import"./X-BwnLOPPu.js";import"./tooltip-CoZI31uD.js";import"./index-HrpTfEP9.js";import"./thread-route-TlKg3LdX.js";import"./use-panel-navigate-DpDJATeP.js";import"./use-route-default-main-vbSzjPnk.js";import"./hooks-BjpNlqA7.js";import"./use-mcp-client-B9CL9mXZ.js";import"./auth-H8QpcxPz.js";import"./backoff-8mStPHYB.js";import"./task-board-DVxNVXhb.js";import"./schema-D41P9rFK.js";import"./toolbar-icon-button-B9nlex_6.js";import"./resizable-DY3zDAh-.js";import"./route-page-header-B1JKzg0J.js";import"./LayoutLeft-BikLyKZh.js";import"./index-C-zKandM.js";import"./gateway-client-BQJuH-u5.js";import"./dialog-DJsfAYzZ.js";import"./form-CQb0RBzJ.js";import"./label-2xig-2_L.js";import"./input-BCLmKz5x.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-0Xek-YPZ.js";import"./autosend-C9P73iEp.js";import"./chat-draft-BYWaPW2i.js";import"./use-session-runtime-DX22bfMF.js";import"./thread-intent-CqTshOQy.js";import"./slugify-CEUa2lfQ.js";import"./ArrowUp-CIy98yKC.js";import"./ShoppingBag01-CqpFwFw-.js";import"./Check-D8fh3HxN.js";import"./Image01-Bospa-dw.js";import"./Upload01-k78JIhqS.js";import"./AlertCircle-CqiDjZtO.js";import"./Copy01-D1VXAb_E.js";import"./select-Z1B5hMAv.js";import"./ChevronUp-B02P5KVq.js";import"./ArrowLeft-CoTYI8n8.js";import"./usage-stats-BuI3unRc.js";import"./use-copy-C0ynkPTX.js";import"./markdown-D6wMhWiM.js";import"./Eye-CHDK5SzP.js";import"./ZoomOut-D1F1D8yI.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-entitlements-DlE4tXhq.js";import"./tabs-Q0hITVpE.js";import"./use-deco-credits-CNEoBh1g.js";import"./use-ai-providers-D7OXOS-G.js";import"./toggle-group-DPbXSYWV.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-yYOsq126.js";import"./XClose-mbsgepx1.js";import"./decopilot-BOdao_R4.js";import"./checkbox-CFcmjH8P.js";import"./Tool01-wdU6mbFw.js";import"./Key01-CDWjnJp8.js";import"./SearchMd-BxSEQNj1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-EpELW75B.js";import"./avatar-CU8lt9cG.js";import"./User01-CRjEXTD9.js";import"./download-app-dialog-58eeoMgv.js";import"./use-is-desktop-app-BNujXJc_.js";import"./popover-57eEekDu.js";import"./drawer-B2h_E7ZU.js";import"./index-D5YaP9fl.js";import"./input-B0WmrbVe.js";import"./suggestion-5RVby0S_.js";import"./use-mcp-prompts-DxFmwtgG.js";import"./use-org-fs-D3qiMbvK.js";import"./Link01-D8neQKry.js";import"./question-004-sINsf4GQ.js";import"./use-members-mJ_vsORi.js";import"./use-org-auth-client-Bu1d-xI_.js";import"./feature-paywall-Bvq165uY.js";import"./plan-ladder-BDecMKba.js";import"./add-connection-dialog-B2Lm5FSw.js";import"./collection-search-BSlnvqKA.js";import"./extract-connection-data-BlOiGNBy.js";import"./metadata-D72DunRR.js";import"./connection-Ca2YXP4J.js";import"./connection-card-BY3_Gacl.js";import"./useInfiniteQuery-D2SNl7a0.js";import"./infiniteQueryObserver-DHGpRERl.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-CJHZMMbJ.js";import"./textarea-qfhaNSmC.js";import"./use-connection-CPDdSysq.js";import"./connection-form-helpers-DrqEsKFW.js";import"./Trash01-Dy5IpZCR.js";import"./authenticate-and-persist-oauth-CByyYh2r.js";import"./mcp-oauth-W0WZ-aUZ.js";import"./collection-tabs-DmB7ERnW.js";import"./badge-DFURQVVL.js";import"./use-infinite-scroll-KcE3dKaA.js";import"./useSuspenseInfiniteQuery-Dw6PIqvY.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BoV3es7X.js";import"./repository-picker-LOfOejYP.js";import"./LinkExternal01-6pj5RpJR.js";import"./github-icon-czgJF8rE.js";import"./use-debounced-value-B-zmOhoh.js";import"./Globe04-DVrgctQH.js";import"./CheckCircle-OhMMVayl.js";import"./Zap-CKU9kVKj.js";import"./Share07-CpK9-QLV.js";import"./command-CaEhDN7h.js";import"./index-ChDRElR2.js";import"./project-icon-Cbpot0NA.js";import"./required-auth-layout-CGa3XL_A.js";import"./use-org-sso-HLuhRfMG.js";import"./get-initials-D-f_fDFw.js";import"./CreditCard01-Buj0ay80.js";import"./DotsVertical-BRGjxbLE.js";import"./Sun-BIEAAQBy.js";import"./Palette-DWn5bbaO.js";import"./Users01-LNPkBtQM.js";import"./github-repo-B15wwZ1g.js";const _e=[{name:"Claude",Icon:ae,size:14,bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ce,size:12,bg:"#000",fg:"#fff"},{name:"Codex",Icon:pe,size:12,bg:"#4F46E5",fg:"#fff"}];function ye(){const e=_.c(11),t=w(),{org:s}=E();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let i;e[2]!==t?(i=t("home.orgHome.connectPill"),e[2]=t,e[3]=i):i=e[3];let n;e[4]!==i?(n=o.jsx("span",{className:"font-medium text-foreground",children:i}),e[4]=i,e[5]=n):n=e[5];let l,a;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:_e.map(Ce)}),a=o.jsx(K,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[6]=l,e[7]=a):(l=e[6],a=e[7]);let m;return e[8]!==r||e[9]!==n?(m=o.jsxs(G,{to:"/$org/settings/connect",params:r,onClick:Ne,className:"group hidden max-w-full md:inline-flex flex-wrap items-center justify-center gap-x-3 gap-y-2 rounded-full border border-border bg-card py-1.5 pl-4 pr-2.5 text-sm transition-colors hover:bg-accent/60",children:[n,l,a]}),e[8]=r,e[9]=n,e[10]=m):m=e[10],m}function Ce(e){const{name:t,Icon:s,size:r,bg:i,fg:n}=e;return o.jsx("span",{title:t,className:"flex size-6 items-center justify-center rounded-full",style:{backgroundColor:i,color:n},children:o.jsx(s,{size:r})},t)}function Ne(){return H("connect_clients_opened",{source:"org_home"})}function Se(e){return e<12?"morning":e<18?"afternoon":"evening"}function ke(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}const F=6;function ve(e){const t=_.c(13),{project:s}=e,r=xe();let i;t[0]!==r||t[1]!==s.id||t[2]!==s.metadata?.ui?.layout?(i=()=>{H("org_home_project_clicked"),r(s.id,{panel:q(s.metadata?.ui?.layout)})},t[0]=r,t[1]=s.id,t[2]=s.metadata?.ui?.layout,t[3]=i):i=t[3];let n;t[4]!==s.icon||t[5]!==s.title?(n=o.jsx(ge,{icon:s.icon,name:s.title,size:"sm+"}),t[4]=s.icon,t[5]=s.title,t[6]=n):n=t[6];let l;t[7]!==s.title?(l=o.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.title}),t[7]=s.title,t[8]=l):l=t[8];let a;return t[9]!==i||t[10]!==n||t[11]!==l?(a=o.jsxs("button",{type:"button",onClick:i,className:"flex min-w-0 items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-accent/60",children:[n,l]}),t[9]=i,t[10]=n,t[11]=l,t[12]=a):a=t[12],a}function Te(e){const t=_.c(31),{projects:s,action:r}=e,i=w(),{org:n}=E();let l,a,m,c,p,u;if(t[0]!==r||t[1]!==s||t[2]!==i){const b=[...s].sort(we).slice(0,F);l=s.length>F,p="flex flex-col gap-4";let h;t[9]!==i?(h=i("home.projects.heading"),t[9]=i,t[10]=h):h=t[10];let j;t[11]!==h?(j=o.jsx("h2",{className:"text-lg font-medium text-foreground",children:h}),t[11]=h,t[12]=j):j=t[12],t[13]!==r||t[14]!==j?(u=o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[j,r]}),t[13]=r,t[14]=j,t[15]=u):u=t[15],c="@container",a="grid grid-cols-1 gap-1 @lg:grid-cols-2",m=b.map(Ae),t[0]=r,t[1]=s,t[2]=i,t[3]=l,t[4]=a,t[5]=m,t[6]=c,t[7]=p,t[8]=u}else l=t[3],a=t[4],m=t[5],c=t[6],p=t[7],u=t[8];let f;t[16]!==a||t[17]!==m?(f=o.jsx("div",{className:a,children:m}),t[16]=a,t[17]=m,t[18]=f):f=t[18];let d;t[19]!==c||t[20]!==f?(d=o.jsx("div",{className:c,children:f}),t[19]=c,t[20]=f,t[21]=d):d=t[21];let g;t[22]!==l||t[23]!==n||t[24]!==i?(g=l&&o.jsx("div",{children:o.jsx(D,{asChild:!0,variant:"ghost",size:"sm",children:o.jsx(G,{to:"/$org/settings/agents",params:{org:n.slug},children:i("home.projects.seeAll")})})}),t[22]=l,t[23]=n,t[24]=i,t[25]=g):g=t[25];let x;return t[26]!==p||t[27]!==u||t[28]!==d||t[29]!==g?(x=o.jsxs("section",{className:p,children:[u,d,g]}),t[26]=p,t[27]=u,t[28]=d,t[29]=g,t[30]=x):x=t[30],x}function Ae(e){return o.jsx(ve,{project:e},e.id)}function we(e,t){return(t.updated_at??"").localeCompare(e.updated_at??"")}function He(){const e=_.c(10),{org:t}=E(),s=J();let r;e[0]!==t.id?(r=X.orgHasSite(t.id),e[0]=t.id,e[1]=r):r=e[1];const i=!!t.id;let n;e[2]!==s?(n=()=>s.call("ORGANIZATION_HAS_SITE",{}),e[2]=s,e[3]=n):n=e[3];let l;e[4]!==r||e[5]!==i||e[6]!==n?(l={queryKey:r,staleTime:3e5,enabled:i,queryFn:n},e[4]=r,e[5]=i,e[6]=n,e[7]=l):l=e[7];const{data:a}=Z(l),m=a?.hasSite??!1;let c;return e[8]!==m?(c={hasSite:m},e[8]=m,e[9]=c):c=e[9],c}const Pe="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function Ie(e){const t=_.c(4),{className:s}=e;let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),i=o.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let n;return t[2]!==s?(n=o.jsxs("svg",{viewBox:"0 0 28 20",className:s,"aria-hidden":"true",focusable:"false",children:[r,i]}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const e=_.c(27),t=w(),{hasSite:s}=He();if(!s)return null;let r;e[0]!==t?(r=t("home.orgHome.trainingThumbnailAlt"),e[0]=t,e[1]=r):r=e[1];let i;e[2]!==r?(i=o.jsx("img",{src:"/cms-training.jpg",alt:r,className:"size-full object-cover"}),e[2]=r,e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:o.jsx(Ie,{className:"w-9"})}),e[4]=n):n=e[4];let l;e[5]!==i?(l=o.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[i,n]}),e[5]=i,e[6]=l):l=e[6];let a;e[7]!==t?(a=t("home.orgHome.trainingEyebrow"),e[7]=t,e[8]=a):a=e[8];let m;e[9]!==a?(m=o.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e[9]=a,e[10]=m):m=e[10];let c;e[11]!==t?(c=t("home.orgHome.trainingTitle"),e[11]=t,e[12]=c):c=e[12];let p;e[13]!==c?(p=o.jsx("h3",{className:"text-sm font-medium text-foreground",children:c}),e[13]=c,e[14]=p):p=e[14];let u;e[15]!==t?(u=t("home.orgHome.trainingDescription"),e[15]=t,e[16]=u):u=e[16];let f;e[17]!==u?(f=o.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:u}),e[17]=u,e[18]=f):f=e[18];let d;e[19]!==m||e[20]!==p||e[21]!==f?(d=o.jsxs("div",{className:"min-w-0 flex-1",children:[m,p,f]}),e[19]=m,e[20]=p,e[21]=f,e[22]=d):d=e[22];let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(K,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[23]=g):g=e[23];let x;return e[24]!==d||e[25]!==l?(x=o.jsxs("a",{href:Pe,target:"_blank",rel:"noreferrer",onClick:ze,className:"group card-shadow flex w-full items-center gap-4 rounded-xl bg-card p-3 text-left transition-colors hover:bg-accent/60",children:[l,d,g]}),e[24]=d,e[25]=l,e[26]=x):x=e[26],x}function ze(){return H("cms_training_opened",{source:"org_home"})}const Ee={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Oe(){const e=_.c(8),t=w();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(se,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=s):s=e[0];let r;e[1]!==t?(r=t("home.orgHome.searchPlaceholder"),e[1]=t,e[2]=r):r=e[2];let i;e[3]!==r?(i=o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:r}),e[3]=r,e[4]=i):i=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:"⌘K"}),e[5]=n):n=e[5];let l;return e[6]!==i?(l=o.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:Le,className:"card-shadow flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent/60",children:[s,i,n]}),e[6]=i,e[7]=l):l=e[7],l}function Le(){H("command_palette_opened",{source:"org_home_search"}),me()}function M(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(V,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Re(e){const t=_.c(28),{canManageAgents:s}=e,r=w(),{org:i}=E();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={pageSize:1e3},t[0]=n):n=t[0];const l=be(n),a=fe();let m,c,p;if(t[1]!==l||t[2]!==s||t[3]!==i||t[4]!==r||t[5]!==a){p=Symbol.for("react.early_return_sentinel");e:{let x;if(t[9]!==i?(x=b=>b.id!==i.id,t[9]=i,t[10]=x):x=t[10],m=je(l).filter(x),m.length===0){let b;t[11]!==r?(b=r("routes.agentsList.noAgentsYet"),t[11]=r,t[12]=b):b=t[12];let h;t[13]!==s||t[14]!==r?(h=r(s?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),t[13]=s,t[14]=r,t[15]=h):h=t[15];let j;t[16]!==b||t[17]!==h?(j=o.jsx("div",{className:"flex items-center justify-center py-10",children:o.jsx(ne,{actions:!1,image:null,title:b,description:h})}),t[16]=b,t[17]=h,t[18]=j):j=t[18],p=j;break e}c=de(he(m),a,null)}t[1]=l,t[2]=s,t[3]=i,t[4]=r,t[5]=a,t[6]=m,t[7]=c,t[8]=p}else m=t[6],c=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;const u=c.length>0;let f;t[19]!==m?(f=o.jsx(Te,{projects:m,action:!1}),t[19]=m,t[20]=f):f=t[20];let d;t[21]!==m||t[22]!==u||t[23]!==a?(d=u&&o.jsx(ue,{projects:m,tasks:a}),t[21]=m,t[22]=u,t[23]=a,t[24]=d):d=t[24];let g;return t[25]!==f||t[26]!==d?(g=o.jsxs("div",{className:"flex flex-col gap-12",children:[f,d]}),t[25]=f,t[26]=d,t[27]=g):g=t[27],g}function Be(){const e=_.c(55),t=w(),s=re("home_task_intake_enabled"),{data:r}=Q.useSession(),[i,n]=L.useState(!1),{granted:l}=U("agents:manage");let a,m,c,p,u,f,d,g,x,b,h,j;if(e[0]!==l||e[1]!==r?.user?.name||e[2]!==t){const R=ke(r?.user?.name),B=Ee[Se(new Date().getHours())];let $;e[15]!==t?($=Y=>o.jsxs(D,{size:"sm",variant:"default",onClick:()=>{H("agent_create_clicked",{source:Y,method:"github"}),n(!0)},children:[o.jsx(ie,{size:14}),t("home.orgAgents.importFromGitHub")]}),e[15]=t,e[16]=$):$=e[16];const O=$;c=z,e[17]!==l||e[18]!==O?(j=l&&o.jsx(z.Actions,{children:O("org_home")}),e[17]=l,e[18]=O,e[19]=j):j=e[19],m=z.Content,a=z.Container,b="reading",h="flex flex-col gap-12",d="flex flex-col items-center gap-12 text-center",e[20]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(ye,{}),x=o.jsx($e,{}),e[20]=g,e[21]=x):(g=e[20],x=e[21]),f="flex w-full flex-col items-center gap-5",p="text-3xl font-medium tracking-tight text-foreground",u=R?t(B.named,{name:R}):t(B.bare),e[0]=l,e[1]=r?.user?.name,e[2]=t,e[3]=a,e[4]=m,e[5]=c,e[6]=p,e[7]=u,e[8]=f,e[9]=d,e[10]=g,e[11]=x,e[12]=b,e[13]=h,e[14]=j}else a=e[3],m=e[4],c=e[5],p=e[6],u=e[7],f=e[8],d=e[9],g=e[10],x=e[11],b=e[12],h=e[13],j=e[14];let y;e[22]!==p||e[23]!==u?(y=o.jsx("h2",{className:p,children:u}),e[22]=p,e[23]=u,e[24]=y):y=e[24];let C;e[25]!==s?(C=s?o.jsx(L.Suspense,{fallback:o.jsx(M,{}),children:o.jsx(te,{children:o.jsx(oe,{children:o.jsx(ee,{homeTaskComposer:!0})})})}):o.jsx(Oe,{}),e[25]=s,e[26]=C):C=e[26];let N;e[27]!==C||e[28]!==f||e[29]!==y?(N=o.jsxs("div",{className:f,children:[y,C]}),e[27]=C,e[28]=f,e[29]=y,e[30]=N):N=e[30];let S;e[31]!==N||e[32]!==d||e[33]!==g||e[34]!==x?(S=o.jsxs("div",{className:d,children:[g,x,N]}),e[31]=N,e[32]=d,e[33]=g,e[34]=x,e[35]=S):S=e[35];let P;e[36]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(M,{}),e[36]=P):P=e[36];let k;e[37]!==l?(k=o.jsx(L.Suspense,{fallback:P,children:o.jsx(Re,{canManageAgents:l})}),e[37]=l,e[38]=k):k=e[38];let v;e[39]!==a||e[40]!==S||e[41]!==k||e[42]!==b||e[43]!==h?(v=o.jsxs(a,{width:b,className:h,children:[S,k]}),e[39]=a,e[40]=S,e[41]=k,e[42]=b,e[43]=h,e[44]=v):v=e[44];let T;e[45]!==m||e[46]!==v?(T=o.jsx(m,{children:v}),e[45]=m,e[46]=v,e[47]=T):T=e[47];let A;e[48]!==i?(A=o.jsx(le,{open:i,onOpenChange:n}),e[48]=i,e[49]=A):A=e[49];let I;return e[50]!==c||e[51]!==T||e[52]!==A||e[53]!==j?(I=o.jsxs(c,{children:[j,T,A]}),e[50]=c,e[51]=T,e[52]=A,e[53]=j,e[54]=I):I=e[54],I}function yr(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(W.Content,{children:o.jsx(Be,{})}),e[0]=t):t=e[0],t}export{yr as default};
1
+ import{c as _,b as w,X as E,j as o,L as G,q as H,B as D,ad as q,a3 as J,K as X,m as Z,a as Q,r as L,ac as U,n as z,h as V}from"./index-izHBwn3I.js";import{ChatLayout as W}from"./index-5-VvRKCO.js";import{C as ee}from"./input-tXV80IJ3.js";import{D as te,C as oe}from"./chat-context-B6r2nJ6g.js";import{a as re}from"./use-organization-settings-BWZsG9HZ.js";import{s as ie}from"./Plus-BfQMVZRL.js";import{a as se}from"./UserSquare-CMMvch3p.js";import{E as ne}from"./empty-state-Df0p9Roq.js";import{R as le}from"./repository-import-picker-DHUG6o-B.js";import{o as me}from"./shell-layout-BadbomY4.js";import{i as K}from"./ArrowRight-Bk-h8Spa.js";import{C as ae,a as ce,b as pe}from"./client-icons-CZY4712U.js";import{u as fe,b as de,P as ue}from"./project-feed-D09MAcoq.js";import{A as ge}from"./agent-icon-CP5XN9a-.js";import{u as xe}from"./use-navigate-to-agent-soNoKU2z.js";import{b as he}from"./task-route-uQ4EUqTW.js";import{s as je}from"./use-project-scope-DIRKMaLK.js";import{b as be}from"./use-virtual-mcp-D8Whl5cH.js";import"./use-mobile-Dn4_VWcj.js";import"./thread-button-CqHz48Ii.js";import"./use-in-settings-BA5wQFQ2.js";import"./sheet-DTIr0quY.js";import"./X-7V7RNG20.js";import"./tooltip-DqtfkXwI.js";import"./index-xb9O7QC9.js";import"./thread-route-Dg7kv_hv.js";import"./use-panel-navigate-BpzTFK7R.js";import"./use-route-default-main-BeQVGvWs.js";import"./hooks-DETt4AT1.js";import"./use-mcp-client-CNVDhuvd.js";import"./auth-WDJFc9Hm.js";import"./backoff-8mStPHYB.js";import"./task-board-CFetJZKk.js";import"./schema-DNqDLF82.js";import"./toolbar-icon-button-DOCtjUrJ.js";import"./resizable-DvI1E7pk.js";import"./route-page-header-KSRwTD4y.js";import"./LayoutLeft-o4EwT_f4.js";import"./index-B7X5CqyW.js";import"./gateway-client-BfoDyNyS.js";import"./dialog-B9AmIVi-.js";import"./form-CIkzBIkD.js";import"./label-BIuQy2__.js";import"./input-BLSONHqE.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-LEXGiXCZ.js";import"./autosend-BUpRVcwj.js";import"./chat-draft-CerneUSv.js";import"./use-session-runtime-CHP3YGA3.js";import"./thread-intent-EOvgTchU.js";import"./slugify-CEUa2lfQ.js";import"./ArrowUp-DfYHJg8n.js";import"./ShoppingBag01-Dj-9rxCI.js";import"./Check-e9hufNdV.js";import"./Image01-CK0bgOXc.js";import"./Upload01-Cu5y084h.js";import"./AlertCircle-B4TBXI97.js";import"./Copy01-Rd2DUITb.js";import"./select-BsUP6XU-.js";import"./ChevronUp-Dijj6L1D.js";import"./ArrowLeft-Du5HwAty.js";import"./usage-stats-GlPgZezF.js";import"./use-copy-CaOPCxF5.js";import"./markdown-BNo5hmT4.js";import"./Eye-CATcYqq7.js";import"./ZoomOut-9vKhCWKn.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-entitlements-g5-cEVzp.js";import"./tabs-UXACuQIA.js";import"./use-deco-credits-BnljnX-n.js";import"./use-ai-providers-BGPaB7ua.js";import"./toggle-group-DfCcVTyX.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-DLsqsUAn.js";import"./XClose-CgE_NvFQ.js";import"./decopilot-C7BBIc4w.js";import"./checkbox-CjlcA4Zf.js";import"./Tool01-DAfFPt6l.js";import"./Key01-B2Ks3SjW.js";import"./SearchMd-BPxAMeCu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-2SrwE2A4.js";import"./avatar-JIBRtdC_.js";import"./User01-DZIaW3qt.js";import"./download-app-dialog-BngIghKX.js";import"./use-is-desktop-app-BNujXJc_.js";import"./popover-BiGAM8js.js";import"./drawer-Cmzocoxj.js";import"./index-SYS1m8f-.js";import"./input-C9yULiWh.js";import"./suggestion-Cub6xPAJ.js";import"./use-mcp-prompts-Bd28eC02.js";import"./use-org-fs-B9N-OGu5.js";import"./Link01-t9xcN1_J.js";import"./question-004-sINsf4GQ.js";import"./use-members-CcYULDVF.js";import"./use-org-auth-client-BbRXHP84.js";import"./feature-paywall-BK6Diems.js";import"./plan-ladder-BCVwOSVp.js";import"./add-connection-dialog-CfJFvo0n.js";import"./collection-search-Bm4yfKio.js";import"./extract-connection-data-ZkeqSXbM.js";import"./metadata-D72DunRR.js";import"./connection-C1K_L2Xe.js";import"./connection-card-C0UBOriU.js";import"./useInfiniteQuery-ByafV4ZI.js";import"./infiniteQueryObserver-DiUuMuMD.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-Vvc8ojiC.js";import"./textarea-tfNNqm-_.js";import"./use-connection-BsLte2he.js";import"./connection-form-helpers-DmenEJQq.js";import"./Trash01-BpbNxWxU.js";import"./authenticate-and-persist-oauth-BdWTTo89.js";import"./mcp-oauth-B-JicvF4.js";import"./collection-tabs-CyEDGPVJ.js";import"./badge-6y8k_9-5.js";import"./use-infinite-scroll-EFF__ehg.js";import"./useSuspenseInfiniteQuery-CflcpPwQ.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-oRqi_MUt.js";import"./repository-picker-TE4ZcEAF.js";import"./LinkExternal01-E0yllQfW.js";import"./github-icon-ZHfVS9cH.js";import"./use-debounced-value-D1fDrXmw.js";import"./Globe04-dvDQwL6D.js";import"./CheckCircle-Du0Z4Mo4.js";import"./Zap-BnKV6W7m.js";import"./Share07-CAPMGK5H.js";import"./command-BXe_2Y8J.js";import"./index-BAMGe25h.js";import"./project-icon-BfMBNeXz.js";import"./required-auth-layout-qs1Hm0B9.js";import"./use-org-sso-DcCWDiTW.js";import"./get-initials-D-f_fDFw.js";import"./CreditCard01-CuV3PHbW.js";import"./DotsVertical-CUOWG-18.js";import"./Sun-Dc2rioTm.js";import"./Palette-DdJDZNuI.js";import"./Users01-B6wD4vfR.js";import"./github-repo-B15wwZ1g.js";const _e=[{name:"Claude",Icon:ae,size:14,bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ce,size:12,bg:"#000",fg:"#fff"},{name:"Codex",Icon:pe,size:12,bg:"#4F46E5",fg:"#fff"}];function ye(){const e=_.c(11),t=w(),{org:s}=E();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let i;e[2]!==t?(i=t("home.orgHome.connectPill"),e[2]=t,e[3]=i):i=e[3];let n;e[4]!==i?(n=o.jsx("span",{className:"font-medium text-foreground",children:i}),e[4]=i,e[5]=n):n=e[5];let l,a;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:_e.map(Ce)}),a=o.jsx(K,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[6]=l,e[7]=a):(l=e[6],a=e[7]);let m;return e[8]!==r||e[9]!==n?(m=o.jsxs(G,{to:"/$org/settings/connect",params:r,onClick:Ne,className:"group hidden max-w-full md:inline-flex flex-wrap items-center justify-center gap-x-3 gap-y-2 rounded-full border border-border bg-card py-1.5 pl-4 pr-2.5 text-sm transition-colors hover:bg-accent/60",children:[n,l,a]}),e[8]=r,e[9]=n,e[10]=m):m=e[10],m}function Ce(e){const{name:t,Icon:s,size:r,bg:i,fg:n}=e;return o.jsx("span",{title:t,className:"flex size-6 items-center justify-center rounded-full",style:{backgroundColor:i,color:n},children:o.jsx(s,{size:r})},t)}function Ne(){return H("connect_clients_opened",{source:"org_home"})}function Se(e){return e<12?"morning":e<18?"afternoon":"evening"}function ke(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}const F=6;function ve(e){const t=_.c(13),{project:s}=e,r=xe();let i;t[0]!==r||t[1]!==s.id||t[2]!==s.metadata?.ui?.layout?(i=()=>{H("org_home_project_clicked"),r(s.id,{panel:q(s.metadata?.ui?.layout)})},t[0]=r,t[1]=s.id,t[2]=s.metadata?.ui?.layout,t[3]=i):i=t[3];let n;t[4]!==s.icon||t[5]!==s.title?(n=o.jsx(ge,{icon:s.icon,name:s.title,size:"sm+"}),t[4]=s.icon,t[5]=s.title,t[6]=n):n=t[6];let l;t[7]!==s.title?(l=o.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:s.title}),t[7]=s.title,t[8]=l):l=t[8];let a;return t[9]!==i||t[10]!==n||t[11]!==l?(a=o.jsxs("button",{type:"button",onClick:i,className:"flex min-w-0 items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-accent/60",children:[n,l]}),t[9]=i,t[10]=n,t[11]=l,t[12]=a):a=t[12],a}function Te(e){const t=_.c(31),{projects:s,action:r}=e,i=w(),{org:n}=E();let l,a,m,c,p,u;if(t[0]!==r||t[1]!==s||t[2]!==i){const b=[...s].sort(we).slice(0,F);l=s.length>F,p="flex flex-col gap-4";let h;t[9]!==i?(h=i("home.projects.heading"),t[9]=i,t[10]=h):h=t[10];let j;t[11]!==h?(j=o.jsx("h2",{className:"text-lg font-medium text-foreground",children:h}),t[11]=h,t[12]=j):j=t[12],t[13]!==r||t[14]!==j?(u=o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[j,r]}),t[13]=r,t[14]=j,t[15]=u):u=t[15],c="@container",a="grid grid-cols-1 gap-1 @lg:grid-cols-2",m=b.map(Ae),t[0]=r,t[1]=s,t[2]=i,t[3]=l,t[4]=a,t[5]=m,t[6]=c,t[7]=p,t[8]=u}else l=t[3],a=t[4],m=t[5],c=t[6],p=t[7],u=t[8];let f;t[16]!==a||t[17]!==m?(f=o.jsx("div",{className:a,children:m}),t[16]=a,t[17]=m,t[18]=f):f=t[18];let d;t[19]!==c||t[20]!==f?(d=o.jsx("div",{className:c,children:f}),t[19]=c,t[20]=f,t[21]=d):d=t[21];let g;t[22]!==l||t[23]!==n||t[24]!==i?(g=l&&o.jsx("div",{children:o.jsx(D,{asChild:!0,variant:"ghost",size:"sm",children:o.jsx(G,{to:"/$org/settings/agents",params:{org:n.slug},children:i("home.projects.seeAll")})})}),t[22]=l,t[23]=n,t[24]=i,t[25]=g):g=t[25];let x;return t[26]!==p||t[27]!==u||t[28]!==d||t[29]!==g?(x=o.jsxs("section",{className:p,children:[u,d,g]}),t[26]=p,t[27]=u,t[28]=d,t[29]=g,t[30]=x):x=t[30],x}function Ae(e){return o.jsx(ve,{project:e},e.id)}function we(e,t){return(t.updated_at??"").localeCompare(e.updated_at??"")}function He(){const e=_.c(10),{org:t}=E(),s=J();let r;e[0]!==t.id?(r=X.orgHasSite(t.id),e[0]=t.id,e[1]=r):r=e[1];const i=!!t.id;let n;e[2]!==s?(n=()=>s.call("ORGANIZATION_HAS_SITE",{}),e[2]=s,e[3]=n):n=e[3];let l;e[4]!==r||e[5]!==i||e[6]!==n?(l={queryKey:r,staleTime:3e5,enabled:i,queryFn:n},e[4]=r,e[5]=i,e[6]=n,e[7]=l):l=e[7];const{data:a}=Z(l),m=a?.hasSite??!1;let c;return e[8]!==m?(c={hasSite:m},e[8]=m,e[9]=c):c=e[9],c}const Pe="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function Ie(e){const t=_.c(4),{className:s}=e;let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),i=o.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let n;return t[2]!==s?(n=o.jsxs("svg",{viewBox:"0 0 28 20",className:s,"aria-hidden":"true",focusable:"false",children:[r,i]}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const e=_.c(27),t=w(),{hasSite:s}=He();if(!s)return null;let r;e[0]!==t?(r=t("home.orgHome.trainingThumbnailAlt"),e[0]=t,e[1]=r):r=e[1];let i;e[2]!==r?(i=o.jsx("img",{src:"/cms-training.jpg",alt:r,className:"size-full object-cover"}),e[2]=r,e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:o.jsx(Ie,{className:"w-9"})}),e[4]=n):n=e[4];let l;e[5]!==i?(l=o.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[i,n]}),e[5]=i,e[6]=l):l=e[6];let a;e[7]!==t?(a=t("home.orgHome.trainingEyebrow"),e[7]=t,e[8]=a):a=e[8];let m;e[9]!==a?(m=o.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e[9]=a,e[10]=m):m=e[10];let c;e[11]!==t?(c=t("home.orgHome.trainingTitle"),e[11]=t,e[12]=c):c=e[12];let p;e[13]!==c?(p=o.jsx("h3",{className:"text-sm font-medium text-foreground",children:c}),e[13]=c,e[14]=p):p=e[14];let u;e[15]!==t?(u=t("home.orgHome.trainingDescription"),e[15]=t,e[16]=u):u=e[16];let f;e[17]!==u?(f=o.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:u}),e[17]=u,e[18]=f):f=e[18];let d;e[19]!==m||e[20]!==p||e[21]!==f?(d=o.jsxs("div",{className:"min-w-0 flex-1",children:[m,p,f]}),e[19]=m,e[20]=p,e[21]=f,e[22]=d):d=e[22];let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(K,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[23]=g):g=e[23];let x;return e[24]!==d||e[25]!==l?(x=o.jsxs("a",{href:Pe,target:"_blank",rel:"noreferrer",onClick:ze,className:"group card-shadow flex w-full items-center gap-4 rounded-xl bg-card p-3 text-left transition-colors hover:bg-accent/60",children:[l,d,g]}),e[24]=d,e[25]=l,e[26]=x):x=e[26],x}function ze(){return H("cms_training_opened",{source:"org_home"})}const Ee={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Oe(){const e=_.c(8),t=w();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(se,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=s):s=e[0];let r;e[1]!==t?(r=t("home.orgHome.searchPlaceholder"),e[1]=t,e[2]=r):r=e[2];let i;e[3]!==r?(i=o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:r}),e[3]=r,e[4]=i):i=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:"⌘K"}),e[5]=n):n=e[5];let l;return e[6]!==i?(l=o.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:Le,className:"card-shadow flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent/60",children:[s,i,n]}),e[6]=i,e[7]=l):l=e[7],l}function Le(){H("command_palette_opened",{source:"org_home_search"}),me()}function M(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(V,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Re(e){const t=_.c(28),{canManageAgents:s}=e,r=w(),{org:i}=E();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={pageSize:1e3},t[0]=n):n=t[0];const l=be(n),a=fe();let m,c,p;if(t[1]!==l||t[2]!==s||t[3]!==i||t[4]!==r||t[5]!==a){p=Symbol.for("react.early_return_sentinel");e:{let x;if(t[9]!==i?(x=b=>b.id!==i.id,t[9]=i,t[10]=x):x=t[10],m=je(l).filter(x),m.length===0){let b;t[11]!==r?(b=r("routes.agentsList.noAgentsYet"),t[11]=r,t[12]=b):b=t[12];let h;t[13]!==s||t[14]!==r?(h=r(s?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),t[13]=s,t[14]=r,t[15]=h):h=t[15];let j;t[16]!==b||t[17]!==h?(j=o.jsx("div",{className:"flex items-center justify-center py-10",children:o.jsx(ne,{actions:!1,image:null,title:b,description:h})}),t[16]=b,t[17]=h,t[18]=j):j=t[18],p=j;break e}c=de(he(m),a,null)}t[1]=l,t[2]=s,t[3]=i,t[4]=r,t[5]=a,t[6]=m,t[7]=c,t[8]=p}else m=t[6],c=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;const u=c.length>0;let f;t[19]!==m?(f=o.jsx(Te,{projects:m,action:!1}),t[19]=m,t[20]=f):f=t[20];let d;t[21]!==m||t[22]!==u||t[23]!==a?(d=u&&o.jsx(ue,{projects:m,tasks:a}),t[21]=m,t[22]=u,t[23]=a,t[24]=d):d=t[24];let g;return t[25]!==f||t[26]!==d?(g=o.jsxs("div",{className:"flex flex-col gap-12",children:[f,d]}),t[25]=f,t[26]=d,t[27]=g):g=t[27],g}function Be(){const e=_.c(55),t=w(),s=re("home_task_intake_enabled"),{data:r}=Q.useSession(),[i,n]=L.useState(!1),{granted:l}=U("agents:manage");let a,m,c,p,u,f,d,g,x,b,h,j;if(e[0]!==l||e[1]!==r?.user?.name||e[2]!==t){const R=ke(r?.user?.name),B=Ee[Se(new Date().getHours())];let $;e[15]!==t?($=Y=>o.jsxs(D,{size:"sm",variant:"default",onClick:()=>{H("agent_create_clicked",{source:Y,method:"github"}),n(!0)},children:[o.jsx(ie,{size:14}),t("home.orgAgents.importFromGitHub")]}),e[15]=t,e[16]=$):$=e[16];const O=$;c=z,e[17]!==l||e[18]!==O?(j=l&&o.jsx(z.Actions,{children:O("org_home")}),e[17]=l,e[18]=O,e[19]=j):j=e[19],m=z.Content,a=z.Container,b="reading",h="flex flex-col gap-12",d="flex flex-col items-center gap-12 text-center",e[20]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(ye,{}),x=o.jsx($e,{}),e[20]=g,e[21]=x):(g=e[20],x=e[21]),f="flex w-full flex-col items-center gap-5",p="text-3xl font-medium tracking-tight text-foreground",u=R?t(B.named,{name:R}):t(B.bare),e[0]=l,e[1]=r?.user?.name,e[2]=t,e[3]=a,e[4]=m,e[5]=c,e[6]=p,e[7]=u,e[8]=f,e[9]=d,e[10]=g,e[11]=x,e[12]=b,e[13]=h,e[14]=j}else a=e[3],m=e[4],c=e[5],p=e[6],u=e[7],f=e[8],d=e[9],g=e[10],x=e[11],b=e[12],h=e[13],j=e[14];let y;e[22]!==p||e[23]!==u?(y=o.jsx("h2",{className:p,children:u}),e[22]=p,e[23]=u,e[24]=y):y=e[24];let C;e[25]!==s?(C=s?o.jsx(L.Suspense,{fallback:o.jsx(M,{}),children:o.jsx(te,{children:o.jsx(oe,{children:o.jsx(ee,{homeTaskComposer:!0})})})}):o.jsx(Oe,{}),e[25]=s,e[26]=C):C=e[26];let N;e[27]!==C||e[28]!==f||e[29]!==y?(N=o.jsxs("div",{className:f,children:[y,C]}),e[27]=C,e[28]=f,e[29]=y,e[30]=N):N=e[30];let S;e[31]!==N||e[32]!==d||e[33]!==g||e[34]!==x?(S=o.jsxs("div",{className:d,children:[g,x,N]}),e[31]=N,e[32]=d,e[33]=g,e[34]=x,e[35]=S):S=e[35];let P;e[36]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(M,{}),e[36]=P):P=e[36];let k;e[37]!==l?(k=o.jsx(L.Suspense,{fallback:P,children:o.jsx(Re,{canManageAgents:l})}),e[37]=l,e[38]=k):k=e[38];let v;e[39]!==a||e[40]!==S||e[41]!==k||e[42]!==b||e[43]!==h?(v=o.jsxs(a,{width:b,className:h,children:[S,k]}),e[39]=a,e[40]=S,e[41]=k,e[42]=b,e[43]=h,e[44]=v):v=e[44];let T;e[45]!==m||e[46]!==v?(T=o.jsx(m,{children:v}),e[45]=m,e[46]=v,e[47]=T):T=e[47];let A;e[48]!==i?(A=o.jsx(le,{open:i,onOpenChange:n}),e[48]=i,e[49]=A):A=e[49];let I;return e[50]!==c||e[51]!==T||e[52]!==A||e[53]!==j?(I=o.jsxs(c,{children:[j,T,A]}),e[50]=c,e[51]=T,e[52]=A,e[53]=j,e[54]=I):I=e[54],I}function yr(){const e=_.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(W.Content,{children:o.jsx(Be,{})}),e[0]=t):t=e[0],t}export{yr as default};
@@ -1,4 +1,4 @@
1
- import{cN as Lt,cO as $t,cP as kt,bO as Ft,cQ as Ut,ao as Bt,bN as Zt,an as Vt,aE as zt,cR as Wt,cS as Jt,cT as Ht,cU as Gt,cV as Yt,bL as qt,cW as Kt,cX as Xt,bK as Qt,bM as ea,t as pe,r as W,c as Se,X as ta,z as aa,j as ra}from"./index-la7MvvCD.js";import{u as na}from"./use-mcp-client-B9CL9mXZ.js";import{d as sa,e as Ke}from"./backoff-8mStPHYB.js";import{T as Xe,a as Qe,b as et}from"./task-board-DVxNVXhb.js";const oe={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},tt=Object.values(oe);class ${constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var at="vercel.ai.error",oa=Symbol.for(at),we,Ae,x=class rt extends(Ae=Error,we=oa,Ae){constructor({name:e,message:a,cause:r}){super(a),this[we]=!0,this.name=e,this.cause=r}static isInstance(e){return rt.hasMarker(e,at)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function nt(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.toString():JSON.stringify(t)}var st="AI_InvalidArgumentError",ot=`vercel.ai.error.${st}`,ia=Symbol.for(ot),Oe,Me,la=class extends(Me=x,Oe=ia,Me){constructor({message:e,cause:a,argument:r}){super({name:st,message:e,cause:a}),this[Oe]=!0,this.argument=r}static isInstance(e){return x.hasMarker(e,ot)}},it="AI_JSONParseError",lt=`vercel.ai.error.${it}`,ua=Symbol.for(lt),Ce,Re,Ne=class extends(Re=x,Ce=ua,Re){constructor({text:t,cause:e}){super({name:it,message:`JSON parsing failed: Text: ${t}.
1
+ import{cN as Lt,cO as $t,cP as kt,bO as Ft,cQ as Ut,ao as Bt,bN as Zt,an as Vt,aE as zt,cR as Wt,cS as Jt,cT as Ht,cU as Gt,cV as Yt,bL as qt,cW as Kt,cX as Xt,bK as Qt,bM as ea,t as pe,r as W,c as Se,X as ta,z as aa,j as ra}from"./index-izHBwn3I.js";import{u as na}from"./use-mcp-client-CNVDhuvd.js";import{d as sa,e as Ke}from"./backoff-8mStPHYB.js";import{T as Xe,a as Qe,b as et}from"./task-board-CFetJZKk.js";const oe={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},tt=Object.values(oe);class ${constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var at="vercel.ai.error",oa=Symbol.for(at),we,Ae,x=class rt extends(Ae=Error,we=oa,Ae){constructor({name:e,message:a,cause:r}){super(a),this[we]=!0,this.name=e,this.cause=r}static isInstance(e){return rt.hasMarker(e,at)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function nt(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.toString():JSON.stringify(t)}var st="AI_InvalidArgumentError",ot=`vercel.ai.error.${st}`,ia=Symbol.for(ot),Oe,Me,la=class extends(Me=x,Oe=ia,Me){constructor({message:e,cause:a,argument:r}){super({name:st,message:e,cause:a}),this[Oe]=!0,this.argument=r}static isInstance(e){return x.hasMarker(e,ot)}},it="AI_JSONParseError",lt=`vercel.ai.error.${it}`,ua=Symbol.for(lt),Ce,Re,Ne=class extends(Re=x,Ce=ua,Re){constructor({text:t,cause:e}){super({name:it,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${nt(e)}`,cause:e}),this[Ce]=!0,this.text=t}static isInstance(t){return x.hasMarker(t,lt)}},ut="AI_TypeValidationError",ct=`vercel.ai.error.${ut}`,ca=Symbol.for(ct),Pe,xe,Z=class fe extends(xe=x,Pe=ca,xe){constructor({value:e,cause:a,context:r}){let n="Type validation failed";if(r?.field&&(n+=` for ${r.field}`),r?.entityName||r?.entityId){n+=" (";const i=[];r.entityName&&i.push(r.entityName),r.entityId&&i.push(`id: "${r.entityId}"`),n+=i.join(", "),n+=")"}super({name:ut,message:`${n}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${nt(a)}`,cause:a}),this[Pe]=!0,this.value=e,this.context=r}static isInstance(e){return x.hasMarker(e,ct)}static wrap({value:e,cause:a,context:r}){var n,i,l;return fe.isInstance(a)&&a.value===e&&((n=a.context)==null?void 0:n.field)===r?.field&&((i=a.context)==null?void 0:i.entityName)===r?.entityName&&((l=a.context)==null?void 0:l.entityId)===r?.entityId?a:new fe({value:e,cause:a,context:r})}};new TextDecoder;var D=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const n=()=>{const i=a.length,l=new Array(e);for(let o=0;o<e;o++)l[o]=a[Math.random()*i|0];return l.join("")};if(t==null)return n;if(a.includes(r))throw new la({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${n()}`};D();function da(t){var e,a;return(a=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?a:!1}var pa=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,fa=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function De(t){const e=JSON.parse(t);return e===null||typeof e!="object"||pa.test(t)===!1&&fa.test(t)===!1?e:ha(e)}function ha(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const n in r){const i=r[n];i&&typeof i=="object"&&e.push(i)}}}return t}function ma(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return De(t)}try{return De(t)}finally{Error.stackTraceLimit=e}}function _e(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){const{additionalProperties:a}=t;t.additionalProperties=a!=null&&typeof a!="boolean"?B(a):!1;const{properties:r}=t;if(r!=null)for(const n of Object.keys(r))r[n]=B(r[n])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(B):B(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(B)),t.allOf!=null&&(t.allOf=t.allOf.map(B)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(B));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=B(e[a]);return t}function B(t){return typeof t=="boolean"?t:_e(t)}var ga=Symbol("Let zodToJsonSchema decide on which parser to use"),je={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},va=t=>typeof t=="string"?{...je,name:t}:{...je,...t};function P(){return{}}function ya(t,e){var a,r,n;const i={type:"array"};return(a=t.type)!=null&&a._def&&((n=(r=t.type)==null?void 0:r._def)==null?void 0:n.typeName)!=="ZodAny"&&(i.items=S(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(i.minItems=t.minLength.value),t.maxLength&&(i.maxItems=t.maxLength.value),t.exactLength&&(i.minItems=t.exactLength.value,i.maxItems=t.exactLength.value),i}function ba(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Sa(){return{type:"boolean"}}function dt(t,e){return S(t.type._def,e)}var _a=(t,e)=>S(t.innerType._def,e);function pt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(n=>pt(t,e,n))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Ea(t)}}var Ea=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Ia(t,e){return{...S(t.innerType._def,e),default:t.defaultValue()}}function Ta(t,e){return e.effectStrategy==="input"?S(t.schema._def,e):P()}function wa(t){return{type:"string",enum:Array.from(t.values)}}var Aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Oa(t,e){const a=[S(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),S(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(n=>!!n),r=[];return a.forEach(n=>{if(Aa(n))r.push(...n.allOf);else{let i=n;if("additionalProperties"in n&&n.additionalProperties===!1){const{additionalProperties:l,...o}=n;i=o}r.push(i)}}),r.length?{allOf:r}:void 0}function Ma(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var ce=void 0,j={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ce===void 0&&(ce=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ce),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function ft(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":L(a,"email",r.message,e);break;case"format:idn-email":L(a,"idn-email",r.message,e);break;case"pattern:zod":N(a,j.email,r.message,e);break}break;case"url":L(a,"uri",r.message,e);break;case"uuid":L(a,"uuid",r.message,e);break;case"regex":N(a,r.regex,r.message,e);break;case"cuid":N(a,j.cuid,r.message,e);break;case"cuid2":N(a,j.cuid2,r.message,e);break;case"startsWith":N(a,RegExp(`^${de(r.value,e)}`),r.message,e);break;case"endsWith":N(a,RegExp(`${de(r.value,e)}$`),r.message,e);break;case"datetime":L(a,"date-time",r.message,e);break;case"date":L(a,"date",r.message,e);break;case"time":L(a,"time",r.message,e);break;case"duration":L(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{N(a,RegExp(de(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&L(a,"ipv4",r.message,e),r.version!=="v4"&&L(a,"ipv6",r.message,e);break}case"base64url":N(a,j.base64url,r.message,e);break;case"jwt":N(a,j.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&N(a,j.ipv4Cidr,r.message,e),r.version!=="v4"&&N(a,j.ipv6Cidr,r.message,e);break}case"emoji":N(a,j.emoji(),r.message,e);break;case"ulid":{N(a,j.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{L(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{N(a,j.base64,r.message,e);break}}break}case"nanoid":N(a,j.nanoid,r.message,e)}return a}function de(t,e){return e.patternStrategy==="escape"?Ra(t):t}var Ca=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Ra(t){let e="";for(let a=0;a<t.length;a++)Ca.has(t[a])||(e+="\\"),e+=t[a];return e}function L(t,e,a,r){var n;t.format||(n=t.anyOf)!=null&&n.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function N(t,e,a,r){var n;t.pattern||(n=t.allOf)!=null&&n.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Le(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Le(e,r)}function Le(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source;let i="",l=!1,o=!1,p=!1;for(let c=0;c<n.length;c++){if(l){i+=n[c],l=!1;continue}if(r.i){if(o){if(n[c].match(/[a-z]/)){p?(i+=n[c],i+=`${n[c-2]}-${n[c]}`.toUpperCase(),p=!1):n[c+1]==="-"&&((a=n[c+2])!=null&&a.match(/[a-z]/))?(i+=n[c],p=!0):i+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){i+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){i+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(n[c]==="$"){i+=`($|(?=[\r
@@ -1 +1 @@
1
- import{c as f,j as p,B as h}from"./index-la7MvvCD.js";import{T as j,a as v,c as T}from"./tooltip-CoZI31uD.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
1
+ import{c as f,j as p,B as h}from"./index-izHBwn3I.js";import{T as j,a as v,c as T}from"./tooltip-DqtfkXwI.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
@@ -1 +1 @@
1
- import{c as S,U as $,V as D,b as F,d as H,r as O,j as i,aq as k,E as q,P as N,n as G,aG as U,B as V}from"./index-la7MvvCD.js";import{u as W}from"./use-mobile-CO15Vvi5.js";import{c as Y,r as J,m as Q,b as X}from"./thread-button-CMx8Gju3.js";import{a as I,R as Z,b as tt}from"./resizable-DY3zDAh-.js";import{R as et}from"./route-page-header-B1JKzg0J.js";import"./use-in-settings-BjcHlhO5.js";import"./sheet-CvN1ikSs.js";import"./X-BwnLOPPu.js";import"./tooltip-CoZI31uD.js";import"./index-HrpTfEP9.js";import"./thread-route-TlKg3LdX.js";import"./use-panel-navigate-DpDJATeP.js";import"./use-project-scope-CRxtlodI.js";import"./use-virtual-mcp-CWjAgZ_C.js";import"./use-mcp-client-B9CL9mXZ.js";import"./auth-H8QpcxPz.js";import"./github-repo-B15wwZ1g.js";import"./use-route-default-main-vbSzjPnk.js";import"./hooks-BjpNlqA7.js";import"./backoff-8mStPHYB.js";import"./task-board-DVxNVXhb.js";import"./schema-D41P9rFK.js";import"./agent-icon-BVQ4eiSp.js";import"./AlertCircle-CqiDjZtO.js";import"./Tool01-wdU6mbFw.js";import"./ArrowUp-CIy98yKC.js";import"./ArrowLeft-CoTYI8n8.js";import"./ArrowRight-CBrn5XhG.js";import"./ShoppingBag01-CqpFwFw-.js";import"./ZoomOut-D1F1D8yI.js";import"./Globe04-DVrgctQH.js";import"./CheckCircle-OhMMVayl.js";import"./Check-D8fh3HxN.js";import"./ChevronUp-B02P5KVq.js";import"./UserSquare-XdFChMN5.js";import"./Copy01-D1VXAb_E.js";import"./CreditCard01-Buj0ay80.js";import"./DotsVertical-BRGjxbLE.js";import"./Eye-CHDK5SzP.js";import"./Share07-CpK9-QLV.js";import"./XClose-mbsgepx1.js";import"./Image01-Bospa-dw.js";import"./Key01-CDWjnJp8.js";import"./LayoutLeft-BikLyKZh.js";import"./Link01-D8neQKry.js";import"./LinkExternal01-6pj5RpJR.js";import"./Monitor01-EpELW75B.js";import"./Sun-BIEAAQBy.js";import"./Palette-DWn5bbaO.js";import"./Plus-dO-o-OZ1.js";import"./SearchMd-BxSEQNj1.js";import"./Trash01-Dy5IpZCR.js";import"./Upload01-k78JIhqS.js";import"./User01-CRjEXTD9.js";import"./Users01-LNPkBtQM.js";import"./Zap-CKU9kVKj.js";import"./toolbar-icon-button-B9nlex_6.js";import"./shell-layout-BIxmWbtr.js";import"./avatar-CU8lt9cG.js";import"./download-app-dialog-58eeoMgv.js";import"./dialog-DJsfAYzZ.js";import"./command-CaEhDN7h.js";import"./index-ChDRElR2.js";import"./integration-icon-CJHZMMbJ.js";import"./project-icon-Cbpot0NA.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-CGa3XL_A.js";import"./autosend-C9P73iEp.js";import"./use-org-sso-HLuhRfMG.js";function B(l,t){const e=typeof l=="number"?l:Number(l);return!Number.isFinite(e)||e<=0||e>=100?t:e}function ot(l,t){const e=S.c(8);let r;e[0]!==t?(r=c=>B(c,t),e[0]=t,e[1]=r):r=e[1];const[n,o]=$(l,r);let a;e[2]!==t||e[3]!==n?(a=B(n,t),e[2]=t,e[3]=n,e[4]=a):a=e[4];let s;return e[5]!==o||e[6]!==a?(s=[a,o],e[5]=o,e[6]=a,e[7]=s):s=e[7],s}const nt=33;function it(){const l=S.c(1);let t;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=D.sidePanelWidth(),l[0]=t):t=l[0],ot(t,nt)}const P="chat-layout-thread",T="chat-layout-content",K=O.createContext(null);function Le(){return R()}function R(){const l=O.use(K);if(!l)throw new Error("ChatLayout regions require a ChatLayout");return l}function rt(l){const t=S.c(25),{children:e,...r}=l,n=W(),o=H(),a=O.useRef(null),[s,c]=it(),{threadOpen:m,contentOpen:p}=r,u=Y(r),d=m&&p?s:u.side,h=100-d,x=f=>{const g=f.getLayout(),w=g[P],j=g[T];typeof w!="number"||typeof j!="number"||Math.abs(w-d)<.001&&Math.abs(j-h)<.001||f.setLayout({[P]:d,[T]:h})},y=J({visibility:r,threadVisibilityExplicit:r.threadVisibilityExplicit});let z;t[0]!==n||t[1]!==r||t[2]!==y?(z={...r,isMobile:n,mobileSurface:y},t[0]=n,t[1]=r,t[2]=y,t[3]=z):z=t[3];const b=z,M=n?b.mobileSurface==="chat":m;let C;t[4]!==n||t[5]!==r||t[6]!==o||t[7]!==b?(C=()=>{n?o({to:".",search:f=>({...f,...Q(b.mobileSurface==="chat"?"main":"chat")}),replace:!0}):r.toggleThread()},t[4]=n,t[5]=r,t[6]=o,t[7]=b,t[8]=C):C=t[8];let L;t[9]!==M||t[10]!==C?(L=i.jsx(X,{open:M,onToggle:C}),t[9]=M,t[10]=C,t[11]=L):L=t[11];let v;t[12]!==e||t[13]!==p||t[14]!==h||t[15]!==n||t[16]!==c||t[17]!==x||t[18]!==m||t[19]!==d?(v=n?i.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:e}):i.jsx(Z,{ref:f=>{if(a.current=f,!f)return;let g=!0;return queueMicrotask(()=>{g&&x(f)}),()=>{g=!1,a.current===f&&(a.current=null)}},defaultLayout:{[P]:d,[T]:h},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(f,g)=>{const{isUserInteraction:w}=g;if(!w){const A=a.current;A&&x(A);return}const j=f[P];m&&p&&typeof j=="number"&&j>0&&j<100&&c(j)},children:e}),t[12]=e,t[13]=p,t[14]=h,t[15]=n,t[16]=c,t[17]=x,t[18]=m,t[19]=d,t[20]=v):v=t[20];let E;return t[21]!==L||t[22]!==v||t[23]!==b?(E=i.jsxs(K,{value:b,children:[L,v]}),t[21]=L,t[22]=v,t[23]=b,t[24]=E):E=t[24],E}function at(l){const t=S.c(16),{children:e,topbar:r}=l,n=R();if(n.isMobile){let u;return t[0]!==e||t[1]!==n.mobileSurface||t[2]!==r?(u=n.mobileSurface==="chat"?i.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,i.jsx(N.Content,{"data-testid":"chat-panel",children:e})]}):null,t[0]=e,t[1]=n.mobileSurface,t[2]=r,t[3]=u):u=t[3],u}const o=n.threadOpen?"":void 0;let a;t[4]!==e||t[5]!==n.threadOpen||t[6]!==r?(a=n.threadOpen&&i.jsxs(i.Fragment,{children:[r,i.jsx(N.Content,{"data-testid":"chat-panel",children:e})]}),t[4]=e,t[5]=n.threadOpen,t[6]=r,t[7]=a):a=t[7];let s;t[8]!==a?(s=i.jsx("div",{className:"h-full min-h-0 p-0.5",children:i.jsx(N,{"data-testid":"side-panel",children:a})}),t[8]=a,t[9]=s):s=t[9];let c;t[10]!==o||t[11]!==s?(c=i.jsx(I,{id:P,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":o,className:"min-w-0 overflow-hidden bg-sidebar",children:s}),t[10]=o,t[11]=s,t[12]=c):c=t[12];let m;t[13]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(tt,{className:"bg-sidebar"}),t[13]=m):m=t[13];let p;return t[14]!==c?(p=i.jsxs(i.Fragment,{children:[c,m]}),t[14]=c,t[15]=p):p=t[15],p}function st({children:l,routeId:t}){return l}function _(l){const t=S.c(25),{children:e,actions:r,drawer:n}=l,o=R();if(o.isMobile&&o.mobileSurface!=="main")return null;const a=o.isMobile?"plain":"card";let s;t[0]!==r||t[1]!==o.contentActions?(s=i.jsxs(i.Fragment,{children:[o.contentActions,r]}),t[0]=r,t[1]=o.contentActions,t[2]=s):s=t[2];let c;t[3]!==o.contentNavigation||t[4]!==s?(c=i.jsx(et,{navigation:o.contentNavigation,actions:s}),t[3]=o.contentNavigation,t[4]=s,t[5]=c):c=t[5];let m;t[6]!==e||t[7]!==o.contentKey?(m=i.jsx(k,{children:i.jsx(st,{routeId:o.contentKey,children:e})}),t[6]=e,t[7]=o.contentKey,t[8]=m):m=t[8];let p;t[9]!==o.contentKey||t[10]!==m?(p=i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:i.jsx(q,{children:m},o.contentKey)}),t[9]=o.contentKey,t[10]=m,t[11]=p):p=t[11];let u;t[12]!==n||t[13]!==p?(u=i.jsxs(N.Content,{children:[p,n]}),t[12]=n,t[13]=p,t[14]=u):u=t[14];let d;t[15]!==c||t[16]!==u?(d=i.jsxs(G.Breadcrumbs.Provider,{children:[c,u]}),t[15]=c,t[16]=u,t[17]=d):d=t[17];let h;t[18]!==a||t[19]!==d?(h=i.jsx(N,{"data-testid":"main-panel",variant:a,children:d}),t[18]=a,t[19]=d,t[20]=h):h=t[20];const x=h;let y;return t[21]!==o.contentOpen||t[22]!==o.isMobile||t[23]!==x?(y=o.isMobile?x:i.jsx(I,{id:T,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":o.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:i.jsx("div",{className:"h-full min-h-0 p-0.5",children:x})}),t[21]=o.contentOpen,t[22]=o.isMobile,t[23]=x,t[24]=y):y=t[24],y}function ve(){const l=S.c(1);let t;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(_,{children:i.jsx(U,{})}),l[0]=t):t=l[0],t}function Ne(l){const t=S.c(18),{error:e,reset:r}=l,n=F();let o;t[0]!==n?(o=n("common.errorBoundary.somethingWentWrong"),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==o?(a=i.jsx("h2",{className:"text-lg font-medium",children:o}),t[2]=o,t[3]=a):a=t[3];let s;t[4]!==e.message||t[5]!==n?(s=e.message||n("common.errorBoundary.unexpectedError"),t[4]=e.message,t[5]=n,t[6]=s):s=t[6];let c;t[7]!==s?(c=i.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let m;t[9]!==n?(m=n("common.errorBoundary.tryAgain"),t[9]=n,t[10]=m):m=t[10];let p;t[11]!==r||t[12]!==m?(p=i.jsx(V,{variant:"outline",onClick:r,children:m}),t[11]=r,t[12]=m,t[13]=p):p=t[13];let u;return t[14]!==a||t[15]!==c||t[16]!==p?(u=i.jsx(_,{children:i.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[a,c,p]})}),t[14]=a,t[15]=c,t[16]=p,t[17]=u):u=t[17],u}const Pe=Object.assign(rt,{Thread:at,Content:_});export{Pe as ChatLayout,Ne as ChatLayoutError,ve as ChatLayoutPending,Le as useChatLayout};
1
+ import{c as S,U as $,V as D,b as F,d as H,r as O,j as i,aq as k,E as q,P as N,n as G,aG as U,B as V}from"./index-izHBwn3I.js";import{u as W}from"./use-mobile-Dn4_VWcj.js";import{c as Y,r as J,m as Q,b as X}from"./thread-button-CqHz48Ii.js";import{a as I,R as Z,b as tt}from"./resizable-DvI1E7pk.js";import{R as et}from"./route-page-header-KSRwTD4y.js";import"./use-in-settings-BA5wQFQ2.js";import"./sheet-DTIr0quY.js";import"./X-7V7RNG20.js";import"./tooltip-DqtfkXwI.js";import"./index-xb9O7QC9.js";import"./thread-route-Dg7kv_hv.js";import"./use-panel-navigate-BpzTFK7R.js";import"./use-project-scope-DIRKMaLK.js";import"./use-virtual-mcp-D8Whl5cH.js";import"./use-mcp-client-CNVDhuvd.js";import"./auth-WDJFc9Hm.js";import"./github-repo-B15wwZ1g.js";import"./use-route-default-main-BeQVGvWs.js";import"./hooks-DETt4AT1.js";import"./backoff-8mStPHYB.js";import"./task-board-CFetJZKk.js";import"./schema-DNqDLF82.js";import"./agent-icon-CP5XN9a-.js";import"./AlertCircle-B4TBXI97.js";import"./Tool01-DAfFPt6l.js";import"./ArrowUp-DfYHJg8n.js";import"./ArrowLeft-Du5HwAty.js";import"./ArrowRight-Bk-h8Spa.js";import"./ShoppingBag01-Dj-9rxCI.js";import"./ZoomOut-9vKhCWKn.js";import"./Globe04-dvDQwL6D.js";import"./CheckCircle-Du0Z4Mo4.js";import"./Check-e9hufNdV.js";import"./ChevronUp-Dijj6L1D.js";import"./UserSquare-CMMvch3p.js";import"./Copy01-Rd2DUITb.js";import"./CreditCard01-CuV3PHbW.js";import"./DotsVertical-CUOWG-18.js";import"./Eye-CATcYqq7.js";import"./Share07-CAPMGK5H.js";import"./XClose-CgE_NvFQ.js";import"./Image01-CK0bgOXc.js";import"./Key01-B2Ks3SjW.js";import"./LayoutLeft-o4EwT_f4.js";import"./Link01-t9xcN1_J.js";import"./LinkExternal01-E0yllQfW.js";import"./Monitor01-2SrwE2A4.js";import"./Sun-Dc2rioTm.js";import"./Palette-DdJDZNuI.js";import"./Plus-BfQMVZRL.js";import"./SearchMd-BPxAMeCu.js";import"./Trash01-BpbNxWxU.js";import"./Upload01-Cu5y084h.js";import"./User01-DZIaW3qt.js";import"./Users01-B6wD4vfR.js";import"./Zap-BnKV6W7m.js";import"./toolbar-icon-button-DOCtjUrJ.js";import"./shell-layout-BadbomY4.js";import"./avatar-JIBRtdC_.js";import"./download-app-dialog-BngIghKX.js";import"./dialog-B9AmIVi-.js";import"./command-BXe_2Y8J.js";import"./index-BAMGe25h.js";import"./integration-icon-Vvc8ojiC.js";import"./project-icon-BfMBNeXz.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-qs1Hm0B9.js";import"./autosend-BUpRVcwj.js";import"./use-org-sso-DcCWDiTW.js";function B(l,t){const e=typeof l=="number"?l:Number(l);return!Number.isFinite(e)||e<=0||e>=100?t:e}function ot(l,t){const e=S.c(8);let r;e[0]!==t?(r=c=>B(c,t),e[0]=t,e[1]=r):r=e[1];const[n,o]=$(l,r);let a;e[2]!==t||e[3]!==n?(a=B(n,t),e[2]=t,e[3]=n,e[4]=a):a=e[4];let s;return e[5]!==o||e[6]!==a?(s=[a,o],e[5]=o,e[6]=a,e[7]=s):s=e[7],s}const nt=33;function it(){const l=S.c(1);let t;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=D.sidePanelWidth(),l[0]=t):t=l[0],ot(t,nt)}const P="chat-layout-thread",T="chat-layout-content",K=O.createContext(null);function Le(){return R()}function R(){const l=O.use(K);if(!l)throw new Error("ChatLayout regions require a ChatLayout");return l}function rt(l){const t=S.c(25),{children:e,...r}=l,n=W(),o=H(),a=O.useRef(null),[s,c]=it(),{threadOpen:m,contentOpen:p}=r,u=Y(r),d=m&&p?s:u.side,h=100-d,x=f=>{const g=f.getLayout(),w=g[P],j=g[T];typeof w!="number"||typeof j!="number"||Math.abs(w-d)<.001&&Math.abs(j-h)<.001||f.setLayout({[P]:d,[T]:h})},y=J({visibility:r,threadVisibilityExplicit:r.threadVisibilityExplicit});let z;t[0]!==n||t[1]!==r||t[2]!==y?(z={...r,isMobile:n,mobileSurface:y},t[0]=n,t[1]=r,t[2]=y,t[3]=z):z=t[3];const b=z,M=n?b.mobileSurface==="chat":m;let C;t[4]!==n||t[5]!==r||t[6]!==o||t[7]!==b?(C=()=>{n?o({to:".",search:f=>({...f,...Q(b.mobileSurface==="chat"?"main":"chat")}),replace:!0}):r.toggleThread()},t[4]=n,t[5]=r,t[6]=o,t[7]=b,t[8]=C):C=t[8];let L;t[9]!==M||t[10]!==C?(L=i.jsx(X,{open:M,onToggle:C}),t[9]=M,t[10]=C,t[11]=L):L=t[11];let v;t[12]!==e||t[13]!==p||t[14]!==h||t[15]!==n||t[16]!==c||t[17]!==x||t[18]!==m||t[19]!==d?(v=n?i.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:e}):i.jsx(Z,{ref:f=>{if(a.current=f,!f)return;let g=!0;return queueMicrotask(()=>{g&&x(f)}),()=>{g=!1,a.current===f&&(a.current=null)}},defaultLayout:{[P]:d,[T]:h},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(f,g)=>{const{isUserInteraction:w}=g;if(!w){const A=a.current;A&&x(A);return}const j=f[P];m&&p&&typeof j=="number"&&j>0&&j<100&&c(j)},children:e}),t[12]=e,t[13]=p,t[14]=h,t[15]=n,t[16]=c,t[17]=x,t[18]=m,t[19]=d,t[20]=v):v=t[20];let E;return t[21]!==L||t[22]!==v||t[23]!==b?(E=i.jsxs(K,{value:b,children:[L,v]}),t[21]=L,t[22]=v,t[23]=b,t[24]=E):E=t[24],E}function at(l){const t=S.c(16),{children:e,topbar:r}=l,n=R();if(n.isMobile){let u;return t[0]!==e||t[1]!==n.mobileSurface||t[2]!==r?(u=n.mobileSurface==="chat"?i.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,i.jsx(N.Content,{"data-testid":"chat-panel",children:e})]}):null,t[0]=e,t[1]=n.mobileSurface,t[2]=r,t[3]=u):u=t[3],u}const o=n.threadOpen?"":void 0;let a;t[4]!==e||t[5]!==n.threadOpen||t[6]!==r?(a=n.threadOpen&&i.jsxs(i.Fragment,{children:[r,i.jsx(N.Content,{"data-testid":"chat-panel",children:e})]}),t[4]=e,t[5]=n.threadOpen,t[6]=r,t[7]=a):a=t[7];let s;t[8]!==a?(s=i.jsx("div",{className:"h-full min-h-0 p-0.5",children:i.jsx(N,{"data-testid":"side-panel",children:a})}),t[8]=a,t[9]=s):s=t[9];let c;t[10]!==o||t[11]!==s?(c=i.jsx(I,{id:P,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":o,className:"min-w-0 overflow-hidden bg-sidebar",children:s}),t[10]=o,t[11]=s,t[12]=c):c=t[12];let m;t[13]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(tt,{className:"bg-sidebar"}),t[13]=m):m=t[13];let p;return t[14]!==c?(p=i.jsxs(i.Fragment,{children:[c,m]}),t[14]=c,t[15]=p):p=t[15],p}function st({children:l,routeId:t}){return l}function _(l){const t=S.c(25),{children:e,actions:r,drawer:n}=l,o=R();if(o.isMobile&&o.mobileSurface!=="main")return null;const a=o.isMobile?"plain":"card";let s;t[0]!==r||t[1]!==o.contentActions?(s=i.jsxs(i.Fragment,{children:[o.contentActions,r]}),t[0]=r,t[1]=o.contentActions,t[2]=s):s=t[2];let c;t[3]!==o.contentNavigation||t[4]!==s?(c=i.jsx(et,{navigation:o.contentNavigation,actions:s}),t[3]=o.contentNavigation,t[4]=s,t[5]=c):c=t[5];let m;t[6]!==e||t[7]!==o.contentKey?(m=i.jsx(k,{children:i.jsx(st,{routeId:o.contentKey,children:e})}),t[6]=e,t[7]=o.contentKey,t[8]=m):m=t[8];let p;t[9]!==o.contentKey||t[10]!==m?(p=i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:i.jsx(q,{children:m},o.contentKey)}),t[9]=o.contentKey,t[10]=m,t[11]=p):p=t[11];let u;t[12]!==n||t[13]!==p?(u=i.jsxs(N.Content,{children:[p,n]}),t[12]=n,t[13]=p,t[14]=u):u=t[14];let d;t[15]!==c||t[16]!==u?(d=i.jsxs(G.Breadcrumbs.Provider,{children:[c,u]}),t[15]=c,t[16]=u,t[17]=d):d=t[17];let h;t[18]!==a||t[19]!==d?(h=i.jsx(N,{"data-testid":"main-panel",variant:a,children:d}),t[18]=a,t[19]=d,t[20]=h):h=t[20];const x=h;let y;return t[21]!==o.contentOpen||t[22]!==o.isMobile||t[23]!==x?(y=o.isMobile?x:i.jsx(I,{id:T,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":o.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:i.jsx("div",{className:"h-full min-h-0 p-0.5",children:x})}),t[21]=o.contentOpen,t[22]=o.isMobile,t[23]=x,t[24]=y):y=t[24],y}function ve(){const l=S.c(1);let t;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(_,{children:i.jsx(U,{})}),l[0]=t):t=l[0],t}function Ne(l){const t=S.c(18),{error:e,reset:r}=l,n=F();let o;t[0]!==n?(o=n("common.errorBoundary.somethingWentWrong"),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==o?(a=i.jsx("h2",{className:"text-lg font-medium",children:o}),t[2]=o,t[3]=a):a=t[3];let s;t[4]!==e.message||t[5]!==n?(s=e.message||n("common.errorBoundary.unexpectedError"),t[4]=e.message,t[5]=n,t[6]=s):s=t[6];let c;t[7]!==s?(c=i.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let m;t[9]!==n?(m=n("common.errorBoundary.tryAgain"),t[9]=n,t[10]=m):m=t[10];let p;t[11]!==r||t[12]!==m?(p=i.jsx(V,{variant:"outline",onClick:r,children:m}),t[11]=r,t[12]=m,t[13]=p):p=t[13];let u;return t[14]!==a||t[15]!==c||t[16]!==p?(u=i.jsx(_,{children:i.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[a,c,p]})}),t[14]=a,t[15]=c,t[16]=p,t[17]=u):u=t[17],u}const Pe=Object.assign(rt,{Thread:at,Content:_});export{Pe as ChatLayout,Ne as ChatLayoutError,ve as ChatLayoutPending,Le as useChatLayout};
@@ -1,4 +1,4 @@
1
- import{c as fo,r as F,b as cc,al as Hf,j as R,h as Vf,B as cl,ao as ul,an as jf,am as Wf,e4 as uc,e5 as Kf,aN as Uf,e6 as Kt,e7 as _f,l as dc}from"./index-la7MvvCD.js";import{d as qf,g as Jf}from"./gateway-client-BQJuH-u5.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-DJsfAYzZ.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-CQb0RBzJ.js";import{I as oh}from"./input-BCLmKz5x.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-0Xek-YPZ.js";import{T as ah,a as ch,c as uh}from"./tooltip-CoZI31uD.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
1
+ import{c as fo,r as F,b as cc,al as Hf,j as R,h as Vf,B as cl,ao as ul,an as jf,am as Wf,e4 as uc,e5 as Kf,aN as Uf,e6 as Kt,e7 as _f,l as dc}from"./index-izHBwn3I.js";import{d as qf,g as Jf}from"./gateway-client-BfoDyNyS.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-B9AmIVi-.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-CIkzBIkD.js";import{I as oh}from"./input-BLSONHqE.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-LEXGiXCZ.js";import{T as ah,a as ch,c as uh}from"./tooltip-DqtfkXwI.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
2
2
  `)}}Ut.empty=new Ut(!0);class kh{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Cc(t){let e=[];do e.push(Sh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Sh(t){let e=[];do e.push(xh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function xh(t){let e=Eh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Ch(t,e);else break;return e}function pl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Ch(t,e){let n=pl(t),r=n;return t.eat(",")&&(t.next!="}"?r=pl(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Mh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Eh(t){if(t.eat("(")){let e=Cc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Mh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Th(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=n())}else if(o.type=="star"){let a=n();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=n();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=n();i(s(o.expr,a),u),a=u}if(o.max==-1)i(s(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=n();r(a,u),i(s(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Mc(t,e){return e-t}function ml(t,e){let n=[];return r(e),n.sort(Mc);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&n.indexOf(a)==-1&&r(a)}}}function wh(t){let e=Object.create(null);return n(ml(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);ml(t,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new Ut(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(Mc);s.next.push({type:i[o][0],next:e[l.join(",")]||n(l)})}return s}}function vh(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ec(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Tc(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function wc(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let i in t)t[i].validate&&t[i].validate(e[i])}function vc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Nh(t,r,e[r]);return n}let gl=class Ac{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=vc(e,r.attrs),this.defaultAttrs=Ec(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ut.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Tc(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bt(this,this.computeAttrs(e),k.from(n),$.setFrom(r))}createChecked(e=null,n,r){return n=k.from(n),this.checkContent(n),new Bt(this,this.computeAttrs(e),n,$.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=k.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(k.empty,!0);return s?new Bt(this,e,n.append(s),$.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){wc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:$.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new Ac(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ah(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class Nh{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ah(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ri{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=vc(e,i.attrs),this.excluded=null;let s=Ec(this.attrs);this.instance=s?new $(this,s):null}create(e=null){return!e&&this.instance?this.instance:new $(this,Tc(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ri(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){wc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Nc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=se.from(e.nodes),n.marks=se.from(e.marks||{}),this.nodes=gl.compile(this.spec.nodes,this),this.marks=Ri.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Ut.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?yl(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:yl(this,o.split(" "))}this.nodeFromJSON=i=>Bt.fromJSON(this,i),this.markFromJSON=i=>$.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof gl){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Wr(r,r.defaultAttrs,e,$.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function yl(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let l in t.marks){let a=t.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Oh(t){return t.tag!=null}function Dh(t){return t.style!=null}class He{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Oh(i))this.tags.push(i);else if(Dh(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new kl(this,n,!1);return r.addAll(e,$.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new kl(this,n,!0);return r.addAll(e,$.none,n.from,n.to),M.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Ph(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(o.getAttrs){let a=o.getAttrs(n);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let l=n[o];if((l.priority==null?50:l.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const Oc={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Rh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dc={ol:!0,ul:!0},er=1,vs=2,Bn=4;function bl(t,e,n){return e!=null?(e?er:0)|(e==="full"?vs:0):t&&t.whitespace=="pre"?er|vs:n&~Bn}class Cr{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=$.none,this.match=s||(o&Bn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(k.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&er)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=k.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Oc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class kl{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=bl(null,n.preserveWhitespace,0)|(r?Bn:0);i?s=new Cr(i.type,i.attrs,$.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new Cr(null,null,$.none,!0,null,o):s=new Cr(e.schema.topNodeType,null,$.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&vs?"full":this.localPreserveWS||(i.options&er)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(o.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Dc.hasOwnProperty(o)&&this.parser.normalizeLists&&Ih(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Rh.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Oc.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=a&&a.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(s,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,n.attrs||null,r,n.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=$.none;for(let l of i.concat(e.marks))(s.type?s.type.allowsMarkType(l.type):xl(l.type,e.type))&&(o=l.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=bl(e,s,o.options);o.options&Bn&&o.content.length==0&&(l|=Bn);let a=$.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):xl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Cr(e,n,a,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=er)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Ih(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Dc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Ph(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Sl(t){let e={};for(let n in t)e[n]=t[n];return e}function xl(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}class nt{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Mr(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)i=s.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,n);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){if(e.isText)return Mr(n).createTextNode(e.text);let{dom:r,contentDOM:i}=Lr(Mr(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Lr(Mr(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:Lr(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new nt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Cl(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Cl(e.marks)}}function Cl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Mr(t){return t.document||window.document}const Ml=new WeakMap;function Lh(t){let e=Ml.get(t);return e===void 0&&Ml.set(t,e=$h(t)),e}function $h(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Lr(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Lh(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let l,a=n?t.createElementNS(n,i):t.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(t.createTextNode(f));else{let{dom:h,contentDOM:p}=Lr(t,f,n,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Rc=65535,Ic=Math.pow(2,16);function zh(t,e){return t+e*Ic}function El(t){return t&Rc}function Bh(t){return(t-(t&Rc))/Ic}const Pc=1,Lc=2,$r=4,$c=8;class As{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$c)>0}get deletedBefore(){return(this.delInfo&(Pc|$r))>0}get deletedAfter(){return(this.delInfo&(Lc|$r))>0}get deletedAcross(){return(this.delInfo&$r)>0}}class xe{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xe.empty)return xe.empty}recover(e){let n=0,r=El(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Bh(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:n:n,h=a+i+(f<0?0:u);if(r)return h;let p=e==(n<0?a:d)?null:zh(l/3,e-a),g=e==a?Lc:e==d?Pc:$r;return(n<0?e!=a:e!=d)&&(g|=$c),new As(h,g,p)}i+=u-c}return r?e+i:new As(e+i,0,null)}touches(e,n){let r=0,i=El(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),c=this.ranges[i+n],u=this.ranges[i+r];e(l,l+c,a,a+u),s+=u-c}}invert(){return new xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xe.empty:new xe(e<0?[0,-e,0]:[0,0,e])}}xe.empty=new xe([]);class tr{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new tr(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new tr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],l=o.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new As(e,i,null)}}const Gi=Object.create(null);class fe{getMap(){return xe.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Gi[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Gi)throw new RangeError("Duplicate use of step JSON ID "+e);return Gi[e]=n,n.prototype.jsonID=e,n}}class G{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new G(e,null)}static fail(e){return new G(null,e)}static fromReplace(e,n,r,i){try{return G.ok(e.replace(n,r,i))}catch(s){if(s instanceof Qn)return G.fail(s.message);throw s}}}function ho(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(ho(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return k.fromArray(r)}class mt extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new M(ho(n.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,s)}invert(){return new De(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mt(n.pos,r.pos,this.mark)}merge(e){return e instanceof mt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mt(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("addMark",mt);class De extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new M(ho(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,r)}invert(){return new mt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new De(n.pos,r.pos,this.mark)}merge(e){return e instanceof De&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new De(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new De(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("removeMark",De);class gt extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new gt(this.pos,n.marks[i]);return new gt(this.pos,this.mark)}}return new _t(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new gt(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("addNodeMark",gt);class _t extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new gt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new _t(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new _t(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("removeNodeMark",_t);class q extends fe{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Ns(e,this.from,this.to)?G.fail("Structure replace would overwrite content"):G.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xe([this.from,this.to-this.from,this.slice.size])}invert(e){return new q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&q.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new q(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new q(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new q(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new q(n.from,n.to,M.fromJSON(e,n.slice),!!n.structure)}}q.MAP_BIAS=1;fe.jsonID("replace",q);class ee extends fe{constructor(e,n,r,i,s,o,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Ns(e,this.from,this.gapFrom)||Ns(e,this.gapTo,this.to)))return G.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return G.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?G.fromReplace(e,this.from,this.to,r):G.fail("Content does not fit in gap")}getMap(){return new xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new ee(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new ee(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ee(n.from,n.to,n.gapFrom,n.gapTo,M.fromJSON(e,n.slice),n.insert,!!n.structure)}}fe.jsonID("replaceAround",ee);function Ns(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Fh(t,e,n,r){let i=[],s=[],o,l;t.doc.nodesBetween(e,n,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,n),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:i.push(o=new De(f,h,d[g])));l&&l.to==f?l.to=h:s.push(l=new mt(f,h,r))}}),i.forEach(a=>t.step(a)),s.forEach(a=>t.step(a))}function Hh(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Ri){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,n);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=s):i.push({style:d,from:Math.max(l,e),to:c,step:s})}}}),i.forEach(o=>t.step(new De(o.from,o.to,o.style)))}function po(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<s.childCount;a++){let c=s.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new q(l,u,M.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new De(l,u,c.marks[f]));if(i&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new M(k.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new q(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);t.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)t.step(o[a])}function Vh(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Mn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let o=t.$from.node(r),l=t.$from.index(r)+i,a=t.$to.indexAfter(r)-s;if(r<t.depth&&o.canReplace(l,a,n))return r;if(r==0||o.type.spec.isolating||!Vh(o,l,a))break;l&&(i=1),a<o.childCount&&(s=1)}return null}function jh(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),l=i.after(s+1),a=o,c=l,u=k.empty,d=0;for(let p=s,g=!1;p>n;p--)g||r.index(p)>0?(g=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,g=!1;p>n;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=k.from(i.node(p).copy(f)),h++):c++;t.step(new ee(a,c,o,l,new M(u.append(f),d,h),u.size-d,!0))}function mo(t,e,n=null,r=t){let i=Wh(t,e),s=i&&Kh(r,e);return s?i.map(Tl).concat({type:e,attrs:n}).concat(s.map(Tl)):null}function Tl(t){return{type:t,attrs:null}}function Wh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function Kh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(n.child(c).type);return!a||!a.validEnd?null:o}function Uh(t,e,n){let r=k.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let l=n[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new ee(i,s,i,s,new M(r,0,0),n.length,!0))}function _h(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&qh(t.doc,t.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Bc(t,o,l,s),po(t,t.mapping.slice(s).map(l,1),r,void 0,c===null);let u=t.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return t.step(new ee(d,f,d+1,f-1,new M(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&zc(t,o,l,s),!1}})}function zc(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Bc(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{r as n,bn as q,d9 as R,bf as Ee,bi as ke,bk as Se,ap as xe,da as j}from"./index-la7MvvCD.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
1
+ import{r as n,bn as q,d9 as R,bf as Ee,bi as ke,bk as Se,ap as xe,da as j}from"./index-izHBwn3I.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};