decocms 4.310.6 → 4.311.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 (240) hide show
  1. package/dist/client/assets/{AlertCircle-DFJYUri_.js → AlertCircle-C0recpiM.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B-tv7QJQ.js → AreaChart-XSelV74e.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B69osMji.js → ArrowLeft-B2Z12k58.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Ce9W5-DT.js → ArrowUp-B_j1WdZ5.js} +1 -1
  5. package/dist/client/assets/{Check-BsuPEhe7.js → Check-BejV2053.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BjZsrOXi.js → CheckCircle-CFTFD5Ed.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-DeK6rkVD.js → ChevronDown-D5RFRhzf.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-DT_4AEzY.js → ChevronRight-DV9U9V1C.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-BgCpIuaE.js → ChevronSelectorVertical-CsU1yTcH.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-Cppxk5s5.js → ChevronUp-D4IrNOCC.js} +1 -1
  11. package/dist/client/assets/{Copy01-D04vSx3O.js → Copy01-Cr3MDnu-.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-1ZnUVJrj.js → CreditCard01-D_XNSGw3.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-BjWqgC8F.js → DotsVertical-DqsE4vgP.js} +1 -1
  14. package/dist/client/assets/{Download01-B7ZEiIfc.js → Download01-Cu0GEQBo.js} +1 -1
  15. package/dist/client/assets/{Eye-CzLxQK_G.js → Eye-DhUWQAZM.js} +1 -1
  16. package/dist/client/assets/{FilterLines-C8wAvz5u.js → FilterLines-DahI-t1v.js} +1 -1
  17. package/dist/client/assets/{GitBranch01-dX_1jD2V.js → GitBranch01-B7UokEiw.js} +1 -1
  18. package/dist/client/assets/{Globe01-BqGcmMHR.js → Globe01-8plmq2TA.js} +1 -1
  19. package/dist/client/assets/{Globe04-BPXU1eCZ.js → Globe04-DlFdM3LP.js} +1 -1
  20. package/dist/client/assets/{HardDrive-u95EYKbF.js → HardDrive-57Sc_B7u.js} +1 -1
  21. package/dist/client/assets/{Image01-BttSSYWW.js → Image01-HOTAu7DE.js} +1 -1
  22. package/dist/client/assets/{Key01-BegLXSRW.js → Key01-DLcgmMi7.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-Di0b5Zl5.js → LinkExternal01-C5L2pr2x.js} +1 -1
  24. package/dist/client/assets/{LockUnlocked01-DfKr7bN9.js → LockUnlocked01-BleHTt-O.js} +1 -1
  25. package/dist/client/assets/{LogOut01-DLiOYO4l.js → LogOut01-CfPLGrdh.js} +1 -1
  26. package/dist/client/assets/{Monitor01-wGRQJfXZ.js → Monitor01-CGzGmiSx.js} +1 -1
  27. package/dist/client/assets/{Package-D4pN8vKX.js → Package-WyJYCcJV.js} +1 -1
  28. package/dist/client/assets/{Palette-U25Jgy4I.js → Palette-ivE2ilgf.js} +1 -1
  29. package/dist/client/assets/{Play-jgJ85faV.js → Play-CsI3qh5P.js} +1 -1
  30. package/dist/client/assets/{Plus-1G_og8WC.js → Plus-BNnPvfG8.js} +1 -1
  31. package/dist/client/assets/{SearchLg-DD_OVTFV.js → SearchLg-Ccchnc4p.js} +1 -1
  32. package/dist/client/assets/{SearchMd-BNiyCrAF.js → SearchMd-BJmbTOt_.js} +1 -1
  33. package/dist/client/assets/{Settings02-CLq8hgTw.js → Settings02-By8pQbcj.js} +1 -1
  34. package/dist/client/assets/{Share07-CIGKkhkQ.js → Share07-dg97NqNd.js} +1 -1
  35. package/dist/client/assets/{Shield01-BnqZ8aVa.js → Shield01-CxgaYLbk.js} +1 -1
  36. package/dist/client/assets/{Stars01-BPMO6tst.js → Stars01-C5bXx9wk.js} +1 -1
  37. package/dist/client/assets/{Stars02-BNbO1fCl.js → Stars02-Dco9Mo0t.js} +1 -1
  38. package/dist/client/assets/{Sun-Dkvqgcm2.js → Sun-CZ4AN-2E.js} +1 -1
  39. package/dist/client/assets/{SwitchHorizontal01-BUvBakuW.js → SwitchHorizontal01-BfZwTC3u.js} +1 -1
  40. package/dist/client/assets/{Tool01-CVixHudG.js → Tool01-BPHywJEb.js} +1 -1
  41. package/dist/client/assets/{Tool02-B1Rll7DS.js → Tool02-D4AQe9SD.js} +1 -1
  42. package/dist/client/assets/{Trash01-B3nUnN0y.js → Trash01-Bkd5f3e4.js} +1 -1
  43. package/dist/client/assets/{TrendUp01-DS0su2gw.js → TrendUp01-C29DtCbZ.js} +1 -1
  44. package/dist/client/assets/{Upload01-rkRgYQDx.js → Upload01-CPHyTAd0.js} +1 -1
  45. package/dist/client/assets/{User01-B9Xtz4nN.js → User01-rDgL3Cs0.js} +1 -1
  46. package/dist/client/assets/{UserSquare-CoZv-lpR.js → UserSquare-BO9lFHlw.js} +1 -1
  47. package/dist/client/assets/{Users01-tNF-ixeW.js → Users01-CGiHQkW6.js} +1 -1
  48. package/dist/client/assets/{Users03-DGGc-VCI.js → Users03-K46FZ0yi.js} +1 -1
  49. package/dist/client/assets/{XCircle-C3-B8tUH.js → XCircle-Dgz569F-.js} +1 -1
  50. package/dist/client/assets/{XClose-CkXjWrKT.js → XClose-DRl5snCd.js} +1 -1
  51. package/dist/client/assets/{YAxis-CVWuN-Jw.js → YAxis-BunnDhD0.js} +1 -1
  52. package/dist/client/assets/{Zap-Btz4H2WA.js → Zap-CqYQM_jt.js} +1 -1
  53. package/dist/client/assets/{ZapSquare-C0moDjbM.js → ZapSquare-C3xSe5yB.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-CMekUeIV.js → ZoomOut-B8EEsxrO.js} +1 -1
  55. package/dist/client/assets/{access-gate-GJZpkbjp.js → access-gate-BL_s88yN.js} +1 -1
  56. package/dist/client/assets/{agent-icon-BIDb5mvo.js → agent-icon-BGP9U6d6.js} +1 -1
  57. package/dist/client/assets/{agents-list-8mSUdlIX.js → agents-list-C83xGM8F.js} +1 -1
  58. package/dist/client/assets/{ai-providers-R4uxTQr7.js → ai-providers-B0dgXRVJ.js} +1 -1
  59. package/dist/client/assets/{alert-BR3tzNpa.js → alert-ABstJkwk.js} +1 -1
  60. package/dist/client/assets/{alert-dialog-q3iZVv2q.js → alert-dialog-Csnli2CD.js} +1 -1
  61. package/dist/client/assets/{api-keys-CluSLAWy.js → api-keys-BMxF1-9_.js} +1 -1
  62. package/dist/client/assets/{app-editor-hN8U59Bk.js → app-editor-6p_LrTu2.js} +1 -1
  63. package/dist/client/assets/{auth-Cr2eVmQb.js → auth-CYohcmQZ.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-IiX96GZk.js → auth-catchall-BDEFidGh.js} +1 -1
  65. package/dist/client/assets/{auth-entry-BMbSSz60.js → auth-entry-CKyE-hFY.js} +1 -1
  66. package/dist/client/assets/{auth-split-layout-3JCHz1nj.js → auth-split-layout-Duguccx1.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-CPPptEZ-.js → authenticate-and-persist-oauth-Ds-Znneo.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-CSIcCAz-.js → automation-list-row-ByC4kR2D.js} +1 -1
  69. package/dist/client/assets/{automation-runs-CZm1UBvc.js → automation-runs-8GLe55cG.js} +1 -1
  70. package/dist/client/assets/{automations-B2gbg6Kf.js → automations-OEcEm9qP.js} +1 -1
  71. package/dist/client/assets/{avatar-DoAw_I4n.js → avatar-BuHFImQ0.js} +1 -1
  72. package/dist/client/assets/{badge-yYh31x23.js → badge-CO8RwMr5.js} +1 -1
  73. package/dist/client/assets/{block-document-CPjyf593.js → block-document-BqLhkJsx.js} +1 -1
  74. package/dist/client/assets/{breadcrumb-B9q1WGpi.js → breadcrumb-B40XpKTU.js} +1 -1
  75. package/dist/client/assets/{buckets-B1cSzQFA.js → buckets-CIG9EGU3.js} +1 -1
  76. package/dist/client/assets/{bulk-category-panel-COJ_UgHi.js → bulk-category-panel-DKVwuCXm.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-gq9Hwxb0.js → capability-load-error-BqilZ1PU.js} +1 -1
  78. package/dist/client/assets/{cards-DuXnhTTh.js → cards-vcKmBwGO.js} +1 -1
  79. package/dist/client/assets/{category-editor-DvstEK32.js → category-editor-CYCrdpS-.js} +1 -1
  80. package/dist/client/assets/{chart-CVMtHEsK.js → chart-Z15NQIs8.js} +1 -1
  81. package/dist/client/assets/{chat-context-Bg50qY0X.js → chat-context-CY2SGM0h.js} +1 -1
  82. package/dist/client/assets/{checkbox-CIn9j1XX.js → checkbox-oWGgw210.js} +1 -1
  83. package/dist/client/assets/{choose-editor-C341IQDI.js → choose-editor-DPo8388D.js} +1 -1
  84. package/dist/client/assets/{cli-auth-success-9dSt15iI.js → cli-auth-success-Bd0MHIpk.js} +1 -1
  85. package/dist/client/assets/{collection-detail-1hIZeEgN.js → collection-detail-CjvpPo2_.js} +1 -1
  86. package/dist/client/assets/{collection-display-button-aIANyrGQ.js → collection-display-button-rTFLLVxa.js} +1 -1
  87. package/dist/client/assets/{collection-search-DNM5ZofN.js → collection-search-BJAxACkb.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-aaCw_sH-.js → collection-table-wrapper-DbZwnA9i.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-_NeFNQxV.js → collection-tabs-Lzes2Hm5.js} +1 -1
  90. package/dist/client/assets/{command--XU4ElGA.js → command-Bp1UIw04.js} +1 -1
  91. package/dist/client/assets/{commerce-onboarding-DZaPz9yo.js → commerce-onboarding-rZiNksbG.js} +1 -1
  92. package/dist/client/assets/{config-MPo5D9Wy.js → config-DRDl0YmS.js} +1 -1
  93. package/dist/client/assets/{connect-Dl5ZUyoY.js → connect-ClZgmNOs.js} +1 -1
  94. package/dist/client/assets/{connection-D1A6-rG7.js → connection-49NkL3aX.js} +1 -1
  95. package/dist/client/assets/{connection-card-DdkgXbOJ.js → connection-card-IfNei3OO.js} +1 -1
  96. package/dist/client/assets/{connection-detail-CUD08bEo.js → connection-detail-MTvaJYNp.js} +1 -1
  97. package/dist/client/assets/{connection-form-helpers-BukIsyYX.js → connection-form-helpers-C174Udb3.js} +1 -1
  98. package/dist/client/assets/{connections-Cg0cSagU.js → connections-CHRgTc8W.js} +1 -1
  99. package/dist/client/assets/{decopilot-sse-pool-rqQ9Jpo9.js → decopilot-sse-pool-MEiWGftu.js} +1 -1
  100. package/dist/client/assets/{dialog-C1MPeMNu.js → dialog-hItRl0PM.js} +1 -1
  101. package/dist/client/assets/{domain-settings-CA8Dnm2K.js → domain-settings-DWE5A_EC.js} +1 -1
  102. package/dist/client/assets/{drawer-CyegMHCB.js → drawer-DuLBqwDu.js} +1 -1
  103. package/dist/client/assets/{dropdown-menu-DevnSQZb.js → dropdown-menu-LWFsRDES.js} +1 -1
  104. package/dist/client/assets/{editor-Du0PR8Z2.js → editor-C4Sw9hGx.js} +1 -1
  105. package/dist/client/assets/{empty-state-GvM6m4x8.js → empty-state-DhZFNn9P.js} +1 -1
  106. package/dist/client/assets/{extract-connection-data-d_lwqK6k.js → extract-connection-data-DPiIwaYg.js} +1 -1
  107. package/dist/client/assets/{file-explorer-DlUhKb31.js → file-explorer-BH-3KCjE.js} +1 -1
  108. package/dist/client/assets/{file-type-icon-FainwWR1.js → file-type-icon-zHhC_odk.js} +1 -1
  109. package/dist/client/assets/{folder-icon-BpXeoC53.js → folder-icon-CnUII1sC.js} +1 -1
  110. package/dist/client/assets/{form-Cquobct0.js → form-BTWHqvdt.js} +1 -1
  111. package/dist/client/assets/{general-wxBAvdWD.js → general-DhZ7IsJ7.js} +1 -1
  112. package/dist/client/assets/{github-repo-picker-C-XAxNp0.js → github-repo-picker-olEJzk4H.js} +1 -1
  113. package/dist/client/assets/{hooks-CSA6kPPq.js → hooks-CkIombAK.js} +1 -1
  114. package/dist/client/assets/{index-gXqtQmIt.js → index-BRM630BW.js} +1 -1
  115. package/dist/client/assets/{index-DnQJMp0g.js → index-BbLo6MAX.js} +1 -1
  116. package/dist/client/assets/{index-C1mpOqCS.js → index-BuyUDL-f.js} +5 -5
  117. package/dist/client/assets/{index-Dt4voa4v.js → index-C_7lMH7J.js} +1 -1
  118. package/dist/client/assets/{index-JylNKnua.js → index-DhgCD36A.js} +1 -1
  119. package/dist/client/assets/index-DmOnt-rS.js +825 -0
  120. package/dist/client/assets/{index-pSKkwoEO.js → index-DuLRhFZC.js} +1 -1
  121. package/dist/client/assets/{index-Cwya5van.js → index-PL6ljojl.js} +1 -1
  122. package/dist/client/assets/{index-D6pwEEp5.js → index-qyhd0IMj.js} +1 -1
  123. package/dist/client/assets/{index-redirect-DO7y1hDi.js → index-redirect-Cy_NnU2a.js} +1 -1
  124. package/dist/client/assets/{infra-billing-DQK7QCV_.js → infra-billing-CmiuUO1m.js} +1 -1
  125. package/dist/client/assets/{input-C1DRWETJ.js → input-Cb9iSFEg.js} +1 -1
  126. package/dist/client/assets/{integration-icon-BZHHvCa6.js → integration-icon-DDXwHQKF.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-DIwl4Bl3.js → invite-member-dialog-CWPn4669.js} +1 -1
  128. package/dist/client/assets/{label-eG4dP9Kr.js → label-BkQvhQIM.js} +1 -1
  129. package/dist/client/assets/{layout-DZrud7Ky.js → layout-DEY36XRI.js} +1 -1
  130. package/dist/client/assets/{login-hu-4F9eO.js → login-D6sPFCW8.js} +1 -1
  131. package/dist/client/assets/{markdown-DqsdQsMo.js → markdown-0fiCCcV1.js} +1 -1
  132. package/dist/client/assets/{mcp-oauth--XUyxbnF.js → mcp-oauth-DBjycbCF.js} +1 -1
  133. package/dist/client/assets/{members-DPDnoQXh.js → members-h-rh3eGF.js} +1 -1
  134. package/dist/client/assets/{monaco-editor-Csqs8oMG.js → monaco-editor-C-Q5HTYn.js} +1 -1
  135. package/dist/client/assets/{monitoring-stats-row-J4LkbHBU.js → monitoring-stats-row-B4FAuCa9.js} +1 -1
  136. package/dist/client/assets/{multi-select-78Ry_B8z.js → multi-select-Cs1r8Ubg.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-D9XZVW84.js → oauth-callback-CM5je5KD.js} +1 -1
  138. package/dist/client/assets/{oauth-callback-ai-provider-BgefokjT.js → oauth-callback-ai-provider-Bcr-4szJ.js} +1 -1
  139. package/dist/client/assets/{onboarding-gkyv-uxO.js → onboarding-Lb-gRBGv.js} +1 -1
  140. package/dist/client/assets/{org-layout-CJRS58S9.js → org-layout-CZ39vVwh.js} +1 -1
  141. package/dist/client/assets/{organization-choice-CJUPUd01.js → organization-choice-D1rU5_LS.js} +1 -1
  142. package/dist/client/assets/{orgs-Bxn1Phoy.js → orgs-YHtQLebS.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-Bpvt1s0u.js → page-seo-form-C3aLwSt0.js} +1 -1
  144. package/dist/client/assets/{popover-_WXOdkkr.js → popover-CzFHMi1-.js} +1 -1
  145. package/dist/client/assets/{post-calendar-DQ3l-FZK.js → post-calendar-DX9-IYRC.js} +1 -1
  146. package/dist/client/assets/{post-editor-Bxn6FHTy.js → post-editor-C_J5WNPs.js} +1 -1
  147. package/dist/client/assets/{primitives-BE2UFUM4.js → primitives-B9LqLGWx.js} +1 -1
  148. package/dist/client/assets/{profile-DIvyjJeS.js → profile-D8e5tSeS.js} +1 -1
  149. package/dist/client/assets/{project-app-view-BzDioIzh.js → project-app-view-B27k8y98.js} +1 -1
  150. package/dist/client/assets/{prompts-DI0TZuPk.js → prompts-DlKoJN67.js} +1 -1
  151. package/dist/client/assets/record-editor-CAQX4Dhe.js +1 -0
  152. package/dist/client/assets/redirect-editor-DJxCUYg3.js +1 -0
  153. package/dist/client/assets/registry-CgaDNZ4i.js +2 -0
  154. package/dist/client/assets/{registry-layout-DVqpcfPx.js → registry-layout-Cpcl6TSK.js} +1 -1
  155. package/dist/client/assets/{reports-DpekG7EG.js → reports-DTxubJgw.js} +1 -1
  156. package/dist/client/assets/{require-capability-Dpz_grcW.js → require-capability-DuFIGwof.js} +1 -1
  157. package/dist/client/assets/{required-auth-layout-y7NknCof.js → required-auth-layout-DGJe8Mlj.js} +1 -1
  158. package/dist/client/assets/{reset-password-Bh73NB4-.js → reset-password-DxbtkbOg.js} +1 -1
  159. package/dist/client/assets/{review-settings-Dh7NHLnC.js → review-settings-DnhAqpkA.js} +1 -1
  160. package/dist/client/assets/{roles-Xra5w00u.js → roles-3q89My_0.js} +1 -1
  161. package/dist/client/assets/{scroll-area-48PVfNmB.js → scroll-area-Djm3-sbg.js} +1 -1
  162. package/dist/client/assets/{search-input-BVPn7jMs.js → search-input-qkdY6KsE.js} +1 -1
  163. package/dist/client/assets/{secrets-BLmOlAac.js → secrets-DEA-aVW1.js} +1 -1
  164. package/dist/client/assets/{sections-editor-YAGsntn8.js → sections-editor-B_M-97ti.js} +1 -1
  165. package/dist/client/assets/{select-DPf2h16G.js → select-BOHmdb8C.js} +1 -1
  166. package/dist/client/assets/{select-model-BcxX7uik.js → select-model-CPmeNaNO.js} +1 -1
  167. package/dist/client/assets/{self-tool-result-CU1lR7mp.js → self-tool-result-xX9-YD6Y.js} +1 -1
  168. package/dist/client/assets/{seo-editor-mWVqI11x.js → seo-editor-DJVpxpW3.js} +1 -1
  169. package/dist/client/assets/{settings-layout-B4ybJZ-l.js → settings-layout-CeyvpLOE.js} +1 -1
  170. package/dist/client/assets/{shell-controls-81txgZ0s.js → shell-controls-CXOCgzwX.js} +1 -1
  171. package/dist/client/assets/{shell-layout-9-Kb9KhB.js → shell-layout-TUjOtQhE.js} +1 -1
  172. package/dist/client/assets/{skill-preview-DJxEOetP.js → skill-preview-B4NfqEEV.js} +1 -1
  173. package/dist/client/assets/{skills-BtuM0LGY.js → skills-CzZ5YAGr.js} +1 -1
  174. package/dist/client/assets/{spinner-DtTgmvPC.js → spinner-BQad3GmW.js} +1 -1
  175. package/dist/client/assets/{sso-CiyBgZ-u.js → sso-bHeadfgf.js} +1 -1
  176. package/dist/client/assets/{store-U7QSglE9.js → store-C4oH3kPo.js} +1 -1
  177. package/dist/client/assets/store-registry-OTCH0UWM.js +2 -0
  178. package/dist/client/assets/{super-agent-icon-BVSP_A9Q.js → super-agent-icon-CPbKPIBh.js} +1 -1
  179. package/dist/client/assets/{switch-CapELWZO.js → switch-dQhgVuCH.js} +1 -1
  180. package/dist/client/assets/{synced-repos-N0gNWWWC.js → synced-repos-Cbj-TInP.js} +1 -1
  181. package/dist/client/assets/{table-BrdhVBgN.js → table-D_CXPJQu.js} +1 -1
  182. package/dist/client/assets/{tabs-B9s8GiDc.js → tabs-DZiIU_cf.js} +1 -1
  183. package/dist/client/assets/{task-board-B2prHLEQ.js → task-board-C5vC-P5k.js} +1 -1
  184. package/dist/client/assets/{tasks-qfAKHWA3.js → tasks-C1pjzmKc.js} +1 -1
  185. package/dist/client/assets/{textarea-Vh2FIiy1.js → textarea-CliLWMBV.js} +1 -1
  186. package/dist/client/assets/{thread-route-BgQCLbw1.js → thread-route-bh7ZH4NA.js} +1 -1
  187. package/dist/client/assets/{toggle-group-CHL9oSgu.js → toggle-group-Dwtxjfc4.js} +1 -1
  188. package/dist/client/assets/{toolbar-DKrjyizE.js → toolbar-3fMfxNen.js} +1 -1
  189. package/dist/client/assets/{track-BuQ8TKQG.js → track-9YygJVzx.js} +1 -1
  190. package/dist/client/assets/{types-BS5Ekku_.js → types-nGmsoTZv.js} +1 -1
  191. package/dist/client/assets/{use-ai-providers-CoFYnSar.js → use-ai-providers-DwlhpRes.js} +1 -1
  192. package/dist/client/assets/{use-api-keys-Bd5wA-NI.js → use-api-keys-B5cZ7wvR.js} +1 -1
  193. package/dist/client/assets/{use-automations-5mHGpVVu.js → use-automations-CmgiIky3.js} +1 -1
  194. package/dist/client/assets/{use-autosave-DtUqsBdr.js → use-autosave-2HBwk4wx.js} +1 -1
  195. package/dist/client/assets/{use-connection-NLT9EZa2.js → use-connection-bZgPnZOr.js} +1 -1
  196. package/dist/client/assets/{use-copy-pe6L0LPv.js → use-copy-Cq30lUsM.js} +1 -1
  197. package/dist/client/assets/{use-create-virtual-mcp-BgM2kvwu.js → use-create-virtual-mcp-DMHxG54f.js} +1 -1
  198. package/dist/client/assets/{use-debounced-autosave-alYKf4CM.js → use-debounced-autosave-DvptVode.js} +1 -1
  199. package/dist/client/assets/{use-debounced-value-Dhd3S2_F.js → use-debounced-value-DqFNyMpP.js} +1 -1
  200. package/dist/client/assets/{use-decopilot-events-B2fEtMQC.js → use-decopilot-events-Cv4HgIi3.js} +1 -1
  201. package/dist/client/assets/{use-delete-connection-_0_QBeqP.js → use-delete-connection-CsW8T7ZH.js} +1 -1
  202. package/dist/client/assets/{use-deployment-admin-D0JOcrNZ.js → use-deployment-admin-aSXK_ggq.js} +1 -1
  203. package/dist/client/assets/{use-destination-route-DxNy_Ma2.js → use-destination-route-B_24Whcs.js} +1 -1
  204. package/dist/client/assets/{use-file-configs-BYsD4IjX.js → use-file-configs-EoWVXyV1.js} +1 -1
  205. package/dist/client/assets/{use-infinite-scroll-CTgOIPru.js → use-infinite-scroll-CY3oO4vc.js} +1 -1
  206. package/dist/client/assets/{use-join-requests-CGWGRtly.js → use-join-requests-EgMaCxaX.js} +1 -1
  207. package/dist/client/assets/{use-mcp-auth-status-B249W0yp.js → use-mcp-auth-status-DObWVXL7.js} +1 -1
  208. package/dist/client/assets/{use-mcp-client-Dfio2Yj4.js → use-mcp-client-BISqHyTj.js} +1 -1
  209. package/dist/client/assets/{use-mcp-tools-BXecv695.js → use-mcp-tools-Dtv8_qE-.js} +1 -1
  210. package/dist/client/assets/{use-members-B2B8hd2t.js → use-members-CGZd946r.js} +1 -1
  211. package/dist/client/assets/{use-navigate-to-agent-CO1MIeJp.js → use-navigate-to-agent-DDo0Ri7O.js} +1 -1
  212. package/dist/client/assets/{use-org-auth-client-CPSWUHH8.js → use-org-auth-client-DK9IhaDS.js} +1 -1
  213. package/dist/client/assets/{use-org-repo-syncs-CgC2q6-i.js → use-org-repo-syncs-DDOe1mEV.js} +1 -1
  214. package/dist/client/assets/{use-org-sso-C3ac-W5O.js → use-org-sso-BlnuVfy8.js} +1 -1
  215. package/dist/client/assets/{use-organization-roles-CnzWVoPj.js → use-organization-roles-vQX1qheI.js} +1 -1
  216. package/dist/client/assets/{use-organization-settings-BdZf3ER5.js → use-organization-settings-9gyyAmDC.js} +1 -1
  217. package/dist/client/assets/{use-panel-navigate-ScyXQVym.js → use-panel-navigate-Dl8TU9Fq.js} +1 -1
  218. package/dist/client/assets/{use-registry-connections-DI7DqgUt.js → use-registry-connections-C6Vm545i.js} +1 -1
  219. package/dist/client/assets/{use-secrets-BSBwa9DM.js → use-secrets-CebeVclF.js} +1 -1
  220. package/dist/client/assets/{use-section-preview-base-B5A51JPl.js → use-section-preview-base-C3CbXEpd.js} +1 -1
  221. package/dist/client/assets/{use-status-sounds-BjISt8b1.js → use-status-sounds-CZScO2ta.js} +1 -1
  222. package/dist/client/assets/{use-tags-BhizmlWl.js → use-tags-Bo6st0jt.js} +1 -1
  223. package/dist/client/assets/{use-view-mode-CSQYlkHb.js → use-view-mode-CfFp3geX.js} +1 -1
  224. package/dist/client/assets/{use-virtual-mcp-HMcZh8X3.js → use-virtual-mcp-B6D2i_ny.js} +1 -1
  225. package/dist/client/assets/useInfiniteQuery-D5GGzERO.js +1 -0
  226. package/dist/client/assets/useSuspenseInfiniteQuery-Dq_znrqe.js +1 -0
  227. package/dist/client/assets/{users-kmdfGRk0.js → users-KKKtts0z.js} +1 -1
  228. package/dist/client/assets/{variant-calendar-28tbxEGf.js → variant-calendar-DPptfq0B.js} +1 -1
  229. package/dist/client/assets/{view-mode-toggle-BOgNhYRO.js → view-mode-toggle-CkVDMUHU.js} +1 -1
  230. package/dist/client/index.html +1 -1
  231. package/dist/server/cli.js +528 -528
  232. package/dist/server/server.js +362 -362
  233. package/package.json +1 -1
  234. package/dist/client/assets/index-BD6RnQ-_.js +0 -824
  235. package/dist/client/assets/record-editor-sKamiBdy.js +0 -1
  236. package/dist/client/assets/redirect-editor-BOCtVePs.js +0 -1
  237. package/dist/client/assets/registry-BntCmXSD.js +0 -2
  238. package/dist/client/assets/store-registry-CuTkfOAD.js +0 -2
  239. package/dist/client/assets/useInfiniteQuery-6PP4Hhf2.js +0 -1
  240. package/dist/client/assets/useSuspenseInfiniteQuery-Da_d6aqh.js +0 -1
@@ -1 +1 @@
1
- import{c as G,b as J,r as U,n as W,j as t,B as X}from"./index-C1mpOqCS.js";import{c as Y,d as Z,b as ee,f as te,g as se,e as ie,a as ne,A as oe}from"./alert-dialog-q3iZVv2q.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-DevnSQZb.js";import{s as me}from"./Stars02-BNbO1fCl.js";import{i as ue}from"./DotsVertical-BjWqgC8F.js";import{s as de}from"./Trash01-B3nUnN0y.js";import{i as fe}from"./Zap-Btz4H2WA.js";import{a as ge}from"./use-virtual-mcp-HMcZh8X3.js";import{A as xe}from"./agent-icon-BIDb5mvo.js";import{u as pe}from"./use-automations-5mHGpVVu.js";function ke(c){const e=G.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,O]=U.useState(!1),r=ge(a?s.virtual_mcp_id:void 0);let S;e[0]!==s.id||e[1]!==o?(S=()=>{o.mutate(s.id),O(!1)},e[0]=s.id,e[1]=o,e[2]=S):S=e[2];const I=S;let E;e[3]!==n?(E=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=E):E=e[4];const H=E,V=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==V?(u=W("inline-block size-2 rounded-full shrink-0",V),e[5]=V,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(ue,{size:16})})}),e[32]=F):F=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),O(!0)},B=t.jsx(de,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(re,{children:[F,t.jsx(le,{align:"end",children:t.jsxs(ce,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let b;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(b=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=b):b=e[45];let A;e[46]!==i?(A=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=A):A=e[47];let D;e[48]!==A?(D=t.jsx(Y,{children:A}),e[48]=A,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(Z,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ee,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(te,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==I||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(se,{onClick:I,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=I,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(ie,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(ne,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let M;e[74]!==l||e[75]!==z?(M=t.jsx(oe,{open:l,onOpenChange:O,children:z}),e[74]=l,e[75]=z,e[76]=M):M=e[76];let K;return e[77]!==b||e[78]!==M?(K=t.jsxs(t.Fragment,{children:[b,M]}),e[77]=b,e[78]=M,e[79]=K):K=e[79],K}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=G.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(me,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ke as A};
1
+ import{c as G,b as J,r as U,n as W,j as t,B as X}from"./index-BuyUDL-f.js";import{c as Y,d as Z,b as ee,f as te,g as se,e as ie,a as ne,A as oe}from"./alert-dialog-Csnli2CD.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-LWFsRDES.js";import{s as me}from"./Stars02-Dco9Mo0t.js";import{i as ue}from"./DotsVertical-DqsE4vgP.js";import{s as de}from"./Trash01-Bkd5f3e4.js";import{i as fe}from"./Zap-CqYQM_jt.js";import{a as ge}from"./use-virtual-mcp-B6D2i_ny.js";import{A as xe}from"./agent-icon-BGP9U6d6.js";import{u as pe}from"./use-automations-CmgiIky3.js";function ke(c){const e=G.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,O]=U.useState(!1),r=ge(a?s.virtual_mcp_id:void 0);let S;e[0]!==s.id||e[1]!==o?(S=()=>{o.mutate(s.id),O(!1)},e[0]=s.id,e[1]=o,e[2]=S):S=e[2];const I=S;let E;e[3]!==n?(E=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=E):E=e[4];const H=E,V=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==V?(u=W("inline-block size-2 rounded-full shrink-0",V),e[5]=V,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(ue,{size:16})})}),e[32]=F):F=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),O(!0)},B=t.jsx(de,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(re,{children:[F,t.jsx(le,{align:"end",children:t.jsxs(ce,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let b;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(b=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=b):b=e[45];let A;e[46]!==i?(A=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=A):A=e[47];let D;e[48]!==A?(D=t.jsx(Y,{children:A}),e[48]=A,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(Z,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ee,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(te,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==I||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(se,{onClick:I,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=I,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(ie,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(ne,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let M;e[74]!==l||e[75]!==z?(M=t.jsx(oe,{open:l,onOpenChange:O,children:z}),e[74]=l,e[75]=z,e[76]=M):M=e[76];let K;return e[77]!==b||e[78]!==M?(K=t.jsxs(t.Fragment,{children:[b,M]}),e[77]=b,e[78]=M,e[79]=K):K=e[79],K}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=G.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(me,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ke as A};
@@ -1,4 +1,4 @@
1
- import{r as L,c as _,b as J,ax as h1,j as p,B as Ln,an as Uc,ak as p1,aw as m1,cH as hf,cI as g1,aH as y1,bc as $n,cJ as x1,n as Q,q as b1,a8 as _n,a9 as Bn,ab as zn,bu as v1,br as pl,by as k1,bx as S1,cK as C1,bv as w1,cL as N1,bt as M1,H as At,p as T1,ac as pf,e as E1,K as Ct,t as fa,o as ni,E as mf,bb as gf,b0 as D1,cM as yf,s as O1,bf as xf,bd as bf,bg as vf,bh as kf,d as ml,cN as A1,cO as I1,bB as Kc,k as j1,b7 as R1}from"./index-C1mpOqCS.js";import{aB as P1,aN as L1,aO as $1,v as _1,aP as B1,l as ha,ai as z1,i as qc,au as F1,g as H1,aQ as W1,aL as Sf,aR as V1,s as pa,aS as Cf,A as wf,aT as St,aC as U1,h as K1,r as q1,aU as J1}from"./agent-icon-BIDb5mvo.js";import{i as ma}from"./ChevronRight-DT_4AEzY.js";import{u as Y1}from"./useInfiniteQuery-6PP4Hhf2.js";import{a as Nf,u as G1}from"./use-connection-NLT9EZa2.js";import{c as X1,u as gl}from"./use-mcp-client-Dfio2Yj4.js";import{u as Q1}from"./use-virtual-mcp-HMcZh8X3.js";import{c as Z1,e as e0,a as Mf,d as Tr,b as t0,T as Er}from"./table-BrdhVBgN.js";import{E as Jc}from"./empty-state-GvM6m4x8.js";import{u as Tf}from"./use-infinite-scroll-CTgOIPru.js";import{a as n0}from"./use-members-B2B8hd2t.js";import{i as yl}from"./AlertCircle-DFJYUri_.js";import{i as r0}from"./CheckCircle-BjZsrOXi.js";import{a as s0}from"./DotsVertical-BjWqgC8F.js";import{i as Ef,b as Ps,a as o0}from"./XCircle-C3-B8tUH.js";import{e as i0}from"./use-automations-5mHGpVVu.js";import{u as a0}from"./useSuspenseInfiniteQuery-Da_d6aqh.js";import{A as l0}from"./avatar-DoAw_I4n.js";import{t as Df}from"./ChevronDown-DeK6rkVD.js";import{n as c0}from"./ChevronUp-Cppxk5s5.js";import{t as u0,a as Of,n as Af}from"./Tool02-B1Rll7DS.js";import{t as ri}from"./Stars01-BPMO6tst.js";import{i as xl}from"./Check-BsuPEhe7.js";import{a as If}from"./Copy01-D04vSx3O.js";import{b as Fn,t as bl,c as Yc}from"./format-time-BnbuEtat.js";import{u as jf}from"./use-copy-pe6L0LPv.js";import{M as vl,I as d0}from"./markdown-DqsdQsMo.js";import{d as f0,u as h0,r as p0,e as m0}from"./hooks-CSA6kPPq.js";import{k as wr,r as g0,b as vs,a as y0,D as x0}from"./chat-context-Bg50qY0X.js";import{c as b0}from"./monaco-editor-Csqs8oMG.js";import{g as Rf,M as v0}from"./types-BS5Ekku_.js";import{s as k0}from"./Eye-CzLxQK_G.js";import{s as S0}from"./XClose-CkXjWrKT.js";import{b as C0,a as w0}from"./Tool01-CVixHudG.js";import{i as N0}from"./Share07-CIGKkhkQ.js";import{i as M0}from"./SearchMd-BNiyCrAF.js";import{u as T0,a as E0}from"./shell-layout-9-Kb9KhB.js";import{u as kl}from"./use-panel-navigate-ScyXQVym.js";import{a as Ls}from"./Image01-BttSSYWW.js";import{n as Pf}from"./LinkExternal01-Di0b5Zl5.js";import{I as qn}from"./integration-icon-BZHHvCa6.js";import{a as Sl}from"./Users03-DGGc-VCI.js";import{a as wt}from"./Palette-U25Jgy4I.js";import{c as Lf}from"./use-navigate-to-agent-CO1MIeJp.js";import{a as D0}from"./Stars02-BNbO1fCl.js";import{d as O0,i as $f,a as _f,S as A0}from"./constants-dLUUoWH7.js";import{g as I0}from"./chart-CVMtHEsK.js";import{b as j0,a as R0,c as P0,d as L0,e as $0}from"./dialog-C1MPeMNu.js";import{F as _0,d as B0,a as z0,e as F0,b as H0,c as W0}from"./form-Cquobct0.js";import{I as V0}from"./input-C1DRWETJ.js";import{S as U0}from"./spinner-DtTgmvPC.js";import{i as K0}from"./Globe01-BqGcmMHR.js";import{i as q0}from"./Monitor01-wGRQJfXZ.js";import{n as J0}from"./Download01-B7ZEiIfc.js";import{F as Y0}from"./file-type-icon-FainwWR1.js";const G0={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Bf(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(G0)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function zf(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Ff(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Bf(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function Cl(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function WO(t){return t.reduce((e,n)=>Ff(e,n.metadata?.usage),zf())}const X0={damping:.7,stiffness:.05,mass:1.25},Q0=70,Z0=1e3/60,ey=350;let si=!1;globalThis.document?.addEventListener("mousedown",()=>{si=!0});globalThis.document?.addEventListener("mouseup",()=>{si=!1});globalThis.document?.addEventListener("click",()=>{si=!1});const ty=(t={})=>{const[e,n]=L.useState(!1),[r,s]=L.useState(t.initial!==!1),[o,i]=L.useState(!1),a=L.useRef(null);a.current=t;const l=L.useCallback(()=>{if(!si)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const v=b.getRangeAt(0);return v.commonAncestorContainer.contains(g.current)||g.current?.contains(v.commonAncestorContainer)},[]),c=L.useCallback(b=>{d.isAtBottom=b,s(b)},[]),u=L.useCallback(b=>{d.escapedFromLock=b,n(b)},[]),d=L.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(v){if(g.current){const{scrollBehavior:k}=getComputedStyle(g.current);k!=="auto"&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=v,d.ignoreScrollToTop=g.current.scrollTop,k!=="auto"&&(g.current.style.scrollBehavior=k)}},get targetScrollTop(){return!g.current||!x.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!x.current)return 0;const{targetScrollTop:v}=this;if(!t.targetScrollTop)return v;if(b?.targetScrollTop===v)return b.calculatedScrollTop;const k=Math.max(Math.min(t.targetScrollTop(v,{scrollElement:g.current,contentElement:x.current}),v),0);return b={targetScrollTop:v,calculatedScrollTop:k},requestAnimationFrame(()=>{b=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Q0}}},[]),f=L.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const v=Date.now()+(Number(b.wait)||0),k=Mi(a.current,b.animation),{ignoreEscapes:N=!1}=b;let C,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{C=Date.now()}):C=v+(b.duration??0);const w=async()=>{const M=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,D=performance.now(),j=(D-(d.lastTick??D))/Z0;if(d.animation||(d.animation={behavior:k,promise:M,ignoreEscapes:N}),d.animation.behavior===k&&(d.lastTick=D),l()||v>Date.now())return w();if(T<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===k){if(k==="instant")return d.scrollTop=d.calculatedTargetScrollTop,w();d.velocity=(k.damping*d.velocity+k.stiffness*d.scrollDifference)/k.mass,d.accumulated+=d.velocity*j,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return w()}return C>Date.now()?(S=d.calculatedTargetScrollTop,w()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Mi(a.current,a.current.resize),ignoreEscapes:N,duration:Math.max(0,C-Date.now())||void 0}):d.isAtBottom)});return M.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===k?d.animation.promise:w()},[c,l,d]),h=L.useCallback(()=>{u(!0),c(!1)},[u,c]),m=L.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:v,ignoreScrollToTop:k}=d;let{lastScrollTop:N=v}=d;d.lastScrollTop=v,d.ignoreScrollToTop=void 0,k&&k>v&&(N=k),i(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||v===k)return;if(l()){u(!0),c(!1);return}const C=v>N,S=v<N;if(d.animation?.ignoreEscapes){d.scrollTop=N;return}S&&(u(!0),c(!1)),C&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,l,d]),y=L.useCallback(({target:b,deltaY:v})=>{let k=b;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===g.current&&v<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),g=Gc(b=>{g.current?.removeEventListener("scroll",m),g.current?.removeEventListener("wheel",y),b?.addEventListener("scroll",m,{passive:!0}),b?.addEventListener("wheel",y,{passive:!0})},[]),x=Gc(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let v;d.resizeObserver=new ResizeObserver(([k])=>{const{height:N}=k.contentRect,C=N-(v??N);if(d.resizeDifference=C,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),i(d.isNearBottom),C>=0){const S=Mi(a.current,v?a.current.resize:a.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:ey})}else d.isNearBottom&&(u(!1),c(!0));v=N,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===C&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:x,scrollRef:g,scrollToBottom:f,stopScroll:h,isAtBottom:r||o,isNearBottom:o,escapedFromLock:e,state:d}};function Gc(t,e){const n=L.useCallback(r=>(n.current=r,t(r)),e);return n}const Ni=new Map;function Mi(...t){const e={...X0};let n=!1;for(const s of t){if(s==="instant"){n=!0;continue}typeof s=="object"&&(n=!1,e.damping=s.damping??e.damping,e.stiffness=s.stiffness??e.stiffness,e.mass=s.mass??e.mass)}const r=JSON.stringify(e);return Ni.has(r)||Ni.set(r,Object.freeze(e)),n?"instant":Ni.get(r)}function ny(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function wl(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Nl(t,e){if(!e)return t;const n=`${ny(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function ry(t,e){return Nl(t,e).replace(/[_-]/g," ").toLowerCase()}function sy(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?Uc().min(1,e):Uc();return p1(n)}function oy(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function iy(t){const e=_.c(74),{prompt:n,setPrompt:r,onSubmit:s,defaultValues:o}=t,i=L.useId(),a=J();let l,c;if(e[0]!==n||e[1]!==a){const W=sy(n,a("chat.dialogPromptArguments.required"));c=m1,l=h1(W),e[0]=n,e[1]=a,e[2]=l,e[3]=c}else l=e[2],c=e[3];let u;e[4]!==o||e[5]!==n?(u=n?oy(n,o):{},e[4]=o,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==l||e[8]!==u?(d={resolver:l,defaultValues:u,mode:"onChange"},e[7]=l,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 m=h;let y;e[12]!==f||e[13]!==s||e[14]!==r?(y=async W=>{await s(W),r(null),f.reset()},e[12]=f,e[13]=s,e[14]=r,e[15]=y):y=e[15];const g=y;let x;e[16]!==f||e[17]!==r?(x=W=>{W||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=x):x=e[18];const b=x;if(!n)return null;let v;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(v=n.title||ry(n.name,wl(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=v):v=e[22];let k;e[23]!==v?(k=p.jsx(j0,{children:p.jsx("span",{className:"capitalize",children:v})}),e[23]=v,e[24]=k):k=e[24];let N;e[25]!==n.description?(N=n.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=N):N=e[26];let C;e[27]!==N||e[28]!==k?(C=p.jsxs(R0,{children:[k,N]}),e[27]=N,e[28]=k,e[29]=C):C=e[29];let S;e[30]!==f||e[31]!==g?(S=W=>{W.stopPropagation(),f.handleSubmit(g)(W)},e[30]=f,e[31]=g,e[32]=S):S=e[32];let w;if(e[33]!==m||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==a){let W;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==a?(W=K=>p.jsx(B0,{control:f.control,name:K.name,render:G=>{const{field:te}=G;return p.jsxs(z0,{children:[p.jsxs(F0,{className:"text-xs",children:[K.name,K.required?null:p.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",a("chat.dialogPromptArguments.optional")]})]}),p.jsx(H0,{children:p.jsx(V0,{...te,value:te.value??"",required:K.required,placeholder:K.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),p.jsx(W0,{})]})}},K.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=a,e[41]=W):W=e[41],w=m.map(W),e[33]=m,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=a,e[37]=w}else w=e[37];let M;e[42]!==b?(M=()=>b(!1),e[42]=b,e[43]=M):M=e[43];const T=f.formState.isSubmitting;let D;e[44]!==a?(D=a("chat.dialogPromptArguments.cancel"),e[44]=a,e[45]=D):D=e[45];let j;e[46]!==f.formState.isSubmitting||e[47]!==M||e[48]!==D?(j=p.jsx(Ln,{type:"button",variant:"ghost",onClick:M,disabled:T,children:D}),e[46]=f.formState.isSubmitting,e[47]=M,e[48]=D,e[49]=j):j=e[49];let R;e[50]!==f.formState.isSubmitting||e[51]!==a?(R=f.formState.isSubmitting?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(U0,{size:"xs"}),a("chat.dialogPromptArguments.loading")]}):a("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=a,e[52]=R):R=e[52];let O;e[53]!==f.formState.isSubmitting||e[54]!==i||e[55]!==R?(O=p.jsx(Ln,{type:"submit",form:i,disabled:f.formState.isSubmitting,children:R}),e[53]=f.formState.isSubmitting,e[54]=i,e[55]=R,e[56]=O):O=e[56];let E;e[57]!==j||e[58]!==O?(E=p.jsxs(P0,{children:[j,O]}),e[57]=j,e[58]=O,e[59]=E):E=e[59];let I;e[60]!==i||e[61]!==S||e[62]!==w||e[63]!==E?(I=p.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:S,children:[w,E]}),e[60]=i,e[61]=S,e[62]=w,e[63]=E,e[64]=I):I=e[64];let A;e[65]!==f||e[66]!==I?(A=p.jsx(_0,{...f,children:I}),e[65]=f,e[66]=I,e[67]=A):A=e[67];let P;e[68]!==C||e[69]!==A?(P=p.jsxs(L0,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[C,A]}),e[68]=C,e[69]=A,e[70]=P):P=e[70];let z;return e[71]!==b||e[72]!==P?(z=p.jsx($0,{open:!0,onOpenChange:b,children:P}),e[71]=b,e[72]=P,e[73]=z):z=e[73],z}function ga(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function It(t,e){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&e===!0?"loading":"idle"}function Nr(t){if(t==null||typeof t!="object")return;const e=t;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const n=e.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return t}var Xc=Object.defineProperty,ay=(t,e)=>{let n={};for(var r in t)Xc(n,r,{get:t[r],enumerable:!0});return Xc(n,Symbol.toStringTag,{value:"Module"}),n};function Ie(t){this.content=t}Ie.prototype={constructor:Ie,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,s=r.find(t),o=r.content.slice();return s==-1?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new Ie(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ie(n)},addToStart:function(t,e){return new Ie([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ie(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),o=r.find(t);return s.splice(o==-1?s.length:o,0,e,n),new Ie(s)},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=Ie.from(t),t.size?new Ie(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ie.from(t),t.size?new Ie(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ie.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}};Ie.from=function(t){if(t instanceof Ie)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ie(e)};function Hf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),o=e.child(r);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let i=s.text,a=o.text,l=0;for(;i[l]==a[l];l++)n++;return l&&l<i.length&&l<a.length&&Uf(i.charCodeAt(l-1))&&Vf(i.charCodeAt(l))&&n--,n}if(s.content.size||o.content.size){let i=Hf(s.content,o.content,n+1);if(i!=null)return i}n+=s.nodeSize}}function Wf(t,e,n,r){for(let s=t.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:r};let i=t.child(--s),a=e.child(--o),l=i.nodeSize;if(i==a){n-=l,r-=l;continue}if(!i.sameMarkup(a))return{a:n,b:r};if(i.isText&&i.text!=a.text){let c=i.text,u=a.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&&Uf(c.charCodeAt(d-1))&&Vf(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(i.content.size||a.content.size){let c=Wf(i.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}function Vf(t){return t>=56320&&t<57344}function Uf(t){return t>=55296&&t<56320}class ${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,s=0,o){for(let i=0,a=0;a<n;i++){let l=this.content[i],c=a+l.nodeSize;if(c>e&&r(l,s+a,o||null,i)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let o="",i=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(i?i=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new $(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let o=0,i=0;i<n;o++){let a=this.content[o],l=i+a.nodeSize;l>e&&((i<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-i),Math.min(a.text.length,n-i)):a=a.cut(Math.max(0,e-i-1),Math.min(a.content.size,n-i-1))),r.push(a),s+=a.nodeSize),i=l}return new $(r,s)}cutByIndex(e,n){return e==n?$.empty:e==0&&n==this.content.length?this:new $(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new $(s,o)}addToStart(e){return new $([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new $(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 s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return Hf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Wf(this,e,n,r)}findIndex(e){if(e==0)return $s(0,e);if(e==this.size)return $s(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 s=this.child(n),o=r+s.nodeSize;if(o>=e)return o==e?$s(n+1,o):$s(n,r);r=o}}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 $.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return $.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return $.empty;let n,r=0;for(let s=0;s<e.length;s++){let o=e[s];r+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(n||(n=e.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new $(n||e,r)}static from(e){if(!e)return $.empty;if(e instanceof $)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new $([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}$.empty=new $([],0);const Ti={index:0,offset:0};function $s(t,e){return Ti.index=t,Ti.offset=e,Ti}function io(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(!io(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!io(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let le=class ya{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(o)}}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&&io(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 s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}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 ya.none;if(e instanceof ya)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};le.none=[];class ss extends Error{}class F{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=qf(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new F(r,this.openStart,this.openEnd)}removeBetween(e,n){return new F(Kf(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 F.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new F($.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new F(e,r,s)}}F.empty=new F($.empty,0,0);function Kf(t,e,n){let{index:r,offset:s}=t.findIndex(e),o=t.maybeChild(r),{index:i,offset:a}=t.findIndex(n);if(s==e||o.isText){if(a!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Kf(o.content,e-s-1,n-s-1)))}function qf(t,e,n,r,s,o){let{index:i,offset:a}=t.findIndex(e),l=t.maybeChild(i);if(a==e||l.isText)return o&&r<=0&&s<=0&&!o.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=qf(l.content,e-a-1,n,i==0?r-1:0,i==t.childCount-1?s-1:0,l);return c&&t.replaceChild(i,l.copy(c))}function ly(t,e,n){if(n.openStart>t.depth)throw new ss("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ss("Inconsistent open depths");return Jf(t,e,n,0)}function Jf(t,e,n,r){let s=t.index(r),o=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let i=Jf(t,e,n,r+1);return o.copy(o.content.replaceChild(s,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let i=t.parent,a=i.content;return Dn(i,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:i,end:a}=cy(n,t);return Dn(o,Gf(t,i,a,e,r))}else return Dn(o,ao(t,e,r))}function Yf(t,e){if(!e.type.compatibleContent(t.type))throw new ss("Cannot join "+e.type.name+" onto "+t.type.name)}function xa(t,e,n){let r=t.node(n);return Yf(r,e.node(n)),r}function En(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 Wr(t,e,n,r){let s=(e||t).node(n),o=0,i=e?e.index(n):s.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(En(t.nodeAfter,r),o++));for(let a=o;a<i;a++)En(s.child(a),r);e&&e.depth==n&&e.textOffset&&En(e.nodeBefore,r)}function Dn(t,e){if(!t.type.validContent(e))throw new ss("Invalid content for node "+t.type.name);return t.copy(e)}function Gf(t,e,n,r,s){let o=t.depth>s&&xa(t,e,s+1),i=r.depth>s&&xa(n,r,s+1),a=[];return Wr(null,t,s,a),o&&i&&e.index(s)==n.index(s)?(Yf(o,i),En(Dn(o,Gf(t,e,n,r,s+1)),a)):(o&&En(Dn(o,ao(t,e,s+1)),a),Wr(e,n,s,a),i&&En(Dn(i,ao(n,r,s+1)),a)),Wr(r,null,s,a),new $(a)}function ao(t,e,n){let r=[];if(Wr(null,t,n,r),t.depth>n){let s=xa(t,e,n+1);En(Dn(s,ao(t,e,n+1)),r)}return Wr(e,null,n,r),new $(r)}function cy(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)s=e.node(o).copy($.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class is{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],s=e.child(n);return r?e.child(n).cut(r):s}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],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)s+=r.child(o).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return le.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let a=r;r=s,s=a}let o=r.marks;for(var i=0;i<o.length;i++)o[i].type.spec.inclusive===!1&&(!s||!o[i].isInSet(s.marks))&&(o=o[i--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!s||!r[o].isInSet(s.marks))&&(r=r[o--].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 lo(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=[],s=0,o=n;for(let i=e;;){let{index:a,offset:l}=i.content.findIndex(o),c=o-l;if(r.push(i,a,s+l),!c||(i=i.child(a),i.isText))break;o=c-1,s+=l+1}return new is(n,r,o)}static resolveCached(e,n){let r=Qc.get(e);if(r)for(let o=0;o<r.elts.length;o++){let i=r.elts[o];if(i.pos==n)return i}else Qc.set(e,r=new uy);let s=r.elts[r.i]=is.resolve(e,n);return r.i=(r.i+1)%dy,s}}class uy{constructor(){this.elts=[],this.i=0}}const dy=12,Qc=new WeakMap;class lo{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 fy=Object.create(null);let On=class ba{constructor(e,n,r,s=le.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||$.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,s=0){this.content.nodesBetween(e,n,r,s,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,s){return this.content.textBetween(e,n,r,s)}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&&io(this.attrs,n||e.defaultAttrs||fy)&&le.sameSet(this.marks,r||le.none)}copy(e=null){return e==this.content?this:new ba(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ba(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 F.empty;let s=this.resolve(e),o=this.resolve(n),i=r?0:s.sharedDepth(n),a=s.start(i),c=s.node(i).content.cut(s.pos-a,o.pos-a);return new F(c,s.depth-i,o.depth-i)}replace(e,n,r){return ly(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+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 s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return is.resolveCached(this,e)}resolveNoCache(e){return is.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(s=!0),!s)),s}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()+")"),Xf(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=$.empty,s=0,o=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,s,o),a=i&&i.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(r),i=o&&o.matchFragment(this.content,n);return i?i.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=le.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(!le.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 s=$.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,s,r);return o.type.checkAttrs(o.attrs),o}};On.prototype.text=void 0;class co extends On{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Xf(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 co(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new co(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 Xf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Hn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new hy(e,n);if(r.next==null)return Hn.empty;let s=Qf(r);r.next&&r.err("Unexpected trailing text");let o=vy(by(s));return ky(o,r),o}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 s=this;for(let o=n;s&&o<r;o++)s=s.matchType(e.child(o).type);return s}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 s=[this];function o(i,a){let l=i.matchFragment(e,r);if(l&&(!n||l.validEnd))return $.from(a.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,a.concat(u));if(f)return f}}return null}return o(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 s=r.shift(),o=s.match;if(o.matchType(e)){let i=[];for(let a=s;a.type;a=a.via)i.push(a.type);return i.reverse()}for(let i=0;i<o.next.length;i++){let{type:a,next:l}=o.next[i];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:s}),n[a.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 s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let o=s+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)o+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return o}).join(`
1
+ import{r as L,c as _,b as J,ax as h1,j as p,B as Ln,an as Uc,ak as p1,aw as m1,cH as hf,cI as g1,aH as y1,bc as $n,cJ as x1,n as Q,q as b1,a8 as _n,a9 as Bn,ab as zn,bu as v1,br as pl,by as k1,bx as S1,cK as C1,bv as w1,cL as N1,bt as M1,H as At,p as T1,ac as pf,e as E1,K as Ct,t as fa,o as ni,E as mf,bb as gf,b0 as D1,cM as yf,s as O1,bf as xf,bd as bf,bg as vf,bh as kf,d as ml,cN as A1,cO as I1,bB as Kc,k as j1,b7 as R1}from"./index-BuyUDL-f.js";import{aB as P1,aN as L1,aO as $1,v as _1,aP as B1,l as ha,ai as z1,i as qc,au as F1,g as H1,aQ as W1,aL as Sf,aR as V1,s as pa,aS as Cf,A as wf,aT as St,aC as U1,h as K1,r as q1,aU as J1}from"./agent-icon-BGP9U6d6.js";import{i as ma}from"./ChevronRight-DV9U9V1C.js";import{u as Y1}from"./useInfiniteQuery-D5GGzERO.js";import{a as Nf,u as G1}from"./use-connection-bZgPnZOr.js";import{c as X1,u as gl}from"./use-mcp-client-BISqHyTj.js";import{u as Q1}from"./use-virtual-mcp-B6D2i_ny.js";import{c as Z1,e as e0,a as Mf,d as Tr,b as t0,T as Er}from"./table-D_CXPJQu.js";import{E as Jc}from"./empty-state-DhZFNn9P.js";import{u as Tf}from"./use-infinite-scroll-CY3oO4vc.js";import{a as n0}from"./use-members-CGZd946r.js";import{i as yl}from"./AlertCircle-C0recpiM.js";import{i as r0}from"./CheckCircle-CFTFD5Ed.js";import{a as s0}from"./DotsVertical-DqsE4vgP.js";import{i as Ef,b as Ps,a as o0}from"./XCircle-Dgz569F-.js";import{e as i0}from"./use-automations-CmgiIky3.js";import{u as a0}from"./useSuspenseInfiniteQuery-Dq_znrqe.js";import{A as l0}from"./avatar-BuHFImQ0.js";import{t as Df}from"./ChevronDown-D5RFRhzf.js";import{n as c0}from"./ChevronUp-D4IrNOCC.js";import{t as u0,a as Of,n as Af}from"./Tool02-D4AQe9SD.js";import{t as ri}from"./Stars01-C5bXx9wk.js";import{i as xl}from"./Check-BejV2053.js";import{a as If}from"./Copy01-Cr3MDnu-.js";import{b as Fn,t as bl,c as Yc}from"./format-time-BnbuEtat.js";import{u as jf}from"./use-copy-Cq30lUsM.js";import{M as vl,I as d0}from"./markdown-0fiCCcV1.js";import{d as f0,u as h0,r as p0,e as m0}from"./hooks-CkIombAK.js";import{k as wr,r as g0,b as vs,a as y0,D as x0}from"./chat-context-CY2SGM0h.js";import{c as b0}from"./monaco-editor-C-Q5HTYn.js";import{g as Rf,M as v0}from"./types-nGmsoTZv.js";import{s as k0}from"./Eye-DhUWQAZM.js";import{s as S0}from"./XClose-DRl5snCd.js";import{b as C0,a as w0}from"./Tool01-BPHywJEb.js";import{i as N0}from"./Share07-dg97NqNd.js";import{i as M0}from"./SearchMd-BJmbTOt_.js";import{u as T0,a as E0}from"./shell-layout-TUjOtQhE.js";import{u as kl}from"./use-panel-navigate-Dl8TU9Fq.js";import{a as Ls}from"./Image01-HOTAu7DE.js";import{n as Pf}from"./LinkExternal01-C5L2pr2x.js";import{I as qn}from"./integration-icon-DDXwHQKF.js";import{a as Sl}from"./Users03-K46FZ0yi.js";import{a as wt}from"./Palette-ivE2ilgf.js";import{c as Lf}from"./use-navigate-to-agent-DDo0Ri7O.js";import{a as D0}from"./Stars02-Dco9Mo0t.js";import{d as O0,i as $f,a as _f,S as A0}from"./constants-dLUUoWH7.js";import{g as I0}from"./chart-Z15NQIs8.js";import{b as j0,a as R0,c as P0,d as L0,e as $0}from"./dialog-hItRl0PM.js";import{F as _0,d as B0,a as z0,e as F0,b as H0,c as W0}from"./form-BTWHqvdt.js";import{I as V0}from"./input-Cb9iSFEg.js";import{S as U0}from"./spinner-BQad3GmW.js";import{i as K0}from"./Globe01-8plmq2TA.js";import{i as q0}from"./Monitor01-CGzGmiSx.js";import{n as J0}from"./Download01-Cu0GEQBo.js";import{F as Y0}from"./file-type-icon-zHhC_odk.js";const G0={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Bf(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(G0)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function zf(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Ff(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+Bf(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function Cl(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function WO(t){return t.reduce((e,n)=>Ff(e,n.metadata?.usage),zf())}const X0={damping:.7,stiffness:.05,mass:1.25},Q0=70,Z0=1e3/60,ey=350;let si=!1;globalThis.document?.addEventListener("mousedown",()=>{si=!0});globalThis.document?.addEventListener("mouseup",()=>{si=!1});globalThis.document?.addEventListener("click",()=>{si=!1});const ty=(t={})=>{const[e,n]=L.useState(!1),[r,s]=L.useState(t.initial!==!1),[o,i]=L.useState(!1),a=L.useRef(null);a.current=t;const l=L.useCallback(()=>{if(!si)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const v=b.getRangeAt(0);return v.commonAncestorContainer.contains(g.current)||g.current?.contains(v.commonAncestorContainer)},[]),c=L.useCallback(b=>{d.isAtBottom=b,s(b)},[]),u=L.useCallback(b=>{d.escapedFromLock=b,n(b)},[]),d=L.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(v){if(g.current){const{scrollBehavior:k}=getComputedStyle(g.current);k!=="auto"&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=v,d.ignoreScrollToTop=g.current.scrollTop,k!=="auto"&&(g.current.style.scrollBehavior=k)}},get targetScrollTop(){return!g.current||!x.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!x.current)return 0;const{targetScrollTop:v}=this;if(!t.targetScrollTop)return v;if(b?.targetScrollTop===v)return b.calculatedScrollTop;const k=Math.max(Math.min(t.targetScrollTop(v,{scrollElement:g.current,contentElement:x.current}),v),0);return b={targetScrollTop:v,calculatedScrollTop:k},requestAnimationFrame(()=>{b=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Q0}}},[]),f=L.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const v=Date.now()+(Number(b.wait)||0),k=Mi(a.current,b.animation),{ignoreEscapes:N=!1}=b;let C,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{C=Date.now()}):C=v+(b.duration??0);const w=async()=>{const M=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,D=performance.now(),j=(D-(d.lastTick??D))/Z0;if(d.animation||(d.animation={behavior:k,promise:M,ignoreEscapes:N}),d.animation.behavior===k&&(d.lastTick=D),l()||v>Date.now())return w();if(T<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===k){if(k==="instant")return d.scrollTop=d.calculatedTargetScrollTop,w();d.velocity=(k.damping*d.velocity+k.stiffness*d.scrollDifference)/k.mass,d.accumulated+=d.velocity*j,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return w()}return C>Date.now()?(S=d.calculatedTargetScrollTop,w()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Mi(a.current,a.current.resize),ignoreEscapes:N,duration:Math.max(0,C-Date.now())||void 0}):d.isAtBottom)});return M.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===k?d.animation.promise:w()},[c,l,d]),h=L.useCallback(()=>{u(!0),c(!1)},[u,c]),m=L.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:v,ignoreScrollToTop:k}=d;let{lastScrollTop:N=v}=d;d.lastScrollTop=v,d.ignoreScrollToTop=void 0,k&&k>v&&(N=k),i(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||v===k)return;if(l()){u(!0),c(!1);return}const C=v>N,S=v<N;if(d.animation?.ignoreEscapes){d.scrollTop=N;return}S&&(u(!0),c(!1)),C&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,l,d]),y=L.useCallback(({target:b,deltaY:v})=>{let k=b;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===g.current&&v<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),g=Gc(b=>{g.current?.removeEventListener("scroll",m),g.current?.removeEventListener("wheel",y),b?.addEventListener("scroll",m,{passive:!0}),b?.addEventListener("wheel",y,{passive:!0})},[]),x=Gc(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let v;d.resizeObserver=new ResizeObserver(([k])=>{const{height:N}=k.contentRect,C=N-(v??N);if(d.resizeDifference=C,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),i(d.isNearBottom),C>=0){const S=Mi(a.current,v?a.current.resize:a.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:ey})}else d.isNearBottom&&(u(!1),c(!0));v=N,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===C&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:x,scrollRef:g,scrollToBottom:f,stopScroll:h,isAtBottom:r||o,isNearBottom:o,escapedFromLock:e,state:d}};function Gc(t,e){const n=L.useCallback(r=>(n.current=r,t(r)),e);return n}const Ni=new Map;function Mi(...t){const e={...X0};let n=!1;for(const s of t){if(s==="instant"){n=!0;continue}typeof s=="object"&&(n=!1,e.damping=s.damping??e.damping,e.stiffness=s.stiffness??e.stiffness,e.mass=s.mass??e.mass)}const r=JSON.stringify(e);return Ni.has(r)||Ni.set(r,Object.freeze(e)),n?"instant":Ni.get(r)}function ny(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function wl(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Nl(t,e){if(!e)return t;const n=`${ny(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function ry(t,e){return Nl(t,e).replace(/[_-]/g," ").toLowerCase()}function sy(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?Uc().min(1,e):Uc();return p1(n)}function oy(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function iy(t){const e=_.c(74),{prompt:n,setPrompt:r,onSubmit:s,defaultValues:o}=t,i=L.useId(),a=J();let l,c;if(e[0]!==n||e[1]!==a){const W=sy(n,a("chat.dialogPromptArguments.required"));c=m1,l=h1(W),e[0]=n,e[1]=a,e[2]=l,e[3]=c}else l=e[2],c=e[3];let u;e[4]!==o||e[5]!==n?(u=n?oy(n,o):{},e[4]=o,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==l||e[8]!==u?(d={resolver:l,defaultValues:u,mode:"onChange"},e[7]=l,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 m=h;let y;e[12]!==f||e[13]!==s||e[14]!==r?(y=async W=>{await s(W),r(null),f.reset()},e[12]=f,e[13]=s,e[14]=r,e[15]=y):y=e[15];const g=y;let x;e[16]!==f||e[17]!==r?(x=W=>{W||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=x):x=e[18];const b=x;if(!n)return null;let v;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(v=n.title||ry(n.name,wl(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=v):v=e[22];let k;e[23]!==v?(k=p.jsx(j0,{children:p.jsx("span",{className:"capitalize",children:v})}),e[23]=v,e[24]=k):k=e[24];let N;e[25]!==n.description?(N=n.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=N):N=e[26];let C;e[27]!==N||e[28]!==k?(C=p.jsxs(R0,{children:[k,N]}),e[27]=N,e[28]=k,e[29]=C):C=e[29];let S;e[30]!==f||e[31]!==g?(S=W=>{W.stopPropagation(),f.handleSubmit(g)(W)},e[30]=f,e[31]=g,e[32]=S):S=e[32];let w;if(e[33]!==m||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==a){let W;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==a?(W=K=>p.jsx(B0,{control:f.control,name:K.name,render:G=>{const{field:te}=G;return p.jsxs(z0,{children:[p.jsxs(F0,{className:"text-xs",children:[K.name,K.required?null:p.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",a("chat.dialogPromptArguments.optional")]})]}),p.jsx(H0,{children:p.jsx(V0,{...te,value:te.value??"",required:K.required,placeholder:K.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),p.jsx(W0,{})]})}},K.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=a,e[41]=W):W=e[41],w=m.map(W),e[33]=m,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=a,e[37]=w}else w=e[37];let M;e[42]!==b?(M=()=>b(!1),e[42]=b,e[43]=M):M=e[43];const T=f.formState.isSubmitting;let D;e[44]!==a?(D=a("chat.dialogPromptArguments.cancel"),e[44]=a,e[45]=D):D=e[45];let j;e[46]!==f.formState.isSubmitting||e[47]!==M||e[48]!==D?(j=p.jsx(Ln,{type:"button",variant:"ghost",onClick:M,disabled:T,children:D}),e[46]=f.formState.isSubmitting,e[47]=M,e[48]=D,e[49]=j):j=e[49];let R;e[50]!==f.formState.isSubmitting||e[51]!==a?(R=f.formState.isSubmitting?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(U0,{size:"xs"}),a("chat.dialogPromptArguments.loading")]}):a("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=a,e[52]=R):R=e[52];let O;e[53]!==f.formState.isSubmitting||e[54]!==i||e[55]!==R?(O=p.jsx(Ln,{type:"submit",form:i,disabled:f.formState.isSubmitting,children:R}),e[53]=f.formState.isSubmitting,e[54]=i,e[55]=R,e[56]=O):O=e[56];let E;e[57]!==j||e[58]!==O?(E=p.jsxs(P0,{children:[j,O]}),e[57]=j,e[58]=O,e[59]=E):E=e[59];let I;e[60]!==i||e[61]!==S||e[62]!==w||e[63]!==E?(I=p.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:S,children:[w,E]}),e[60]=i,e[61]=S,e[62]=w,e[63]=E,e[64]=I):I=e[64];let A;e[65]!==f||e[66]!==I?(A=p.jsx(_0,{...f,children:I}),e[65]=f,e[66]=I,e[67]=A):A=e[67];let P;e[68]!==C||e[69]!==A?(P=p.jsxs(L0,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[C,A]}),e[68]=C,e[69]=A,e[70]=P):P=e[70];let z;return e[71]!==b||e[72]!==P?(z=p.jsx($0,{open:!0,onOpenChange:b,children:P}),e[71]=b,e[72]=P,e[73]=z):z=e[73],z}function ga(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function It(t,e){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&e===!0?"loading":"idle"}function Nr(t){if(t==null||typeof t!="object")return;const e=t;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const n=e.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return t}var Xc=Object.defineProperty,ay=(t,e)=>{let n={};for(var r in t)Xc(n,r,{get:t[r],enumerable:!0});return Xc(n,Symbol.toStringTag,{value:"Module"}),n};function Ie(t){this.content=t}Ie.prototype={constructor:Ie,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,s=r.find(t),o=r.content.slice();return s==-1?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new Ie(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ie(n)},addToStart:function(t,e){return new Ie([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ie(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),o=r.find(t);return s.splice(o==-1?s.length:o,0,e,n),new Ie(s)},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=Ie.from(t),t.size?new Ie(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ie.from(t),t.size?new Ie(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ie.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}};Ie.from=function(t){if(t instanceof Ie)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ie(e)};function Hf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),o=e.child(r);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let i=s.text,a=o.text,l=0;for(;i[l]==a[l];l++)n++;return l&&l<i.length&&l<a.length&&Uf(i.charCodeAt(l-1))&&Vf(i.charCodeAt(l))&&n--,n}if(s.content.size||o.content.size){let i=Hf(s.content,o.content,n+1);if(i!=null)return i}n+=s.nodeSize}}function Wf(t,e,n,r){for(let s=t.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:r};let i=t.child(--s),a=e.child(--o),l=i.nodeSize;if(i==a){n-=l,r-=l;continue}if(!i.sameMarkup(a))return{a:n,b:r};if(i.isText&&i.text!=a.text){let c=i.text,u=a.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&&Uf(c.charCodeAt(d-1))&&Vf(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(i.content.size||a.content.size){let c=Wf(i.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}function Vf(t){return t>=56320&&t<57344}function Uf(t){return t>=55296&&t<56320}class ${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,s=0,o){for(let i=0,a=0;a<n;i++){let l=this.content[i],c=a+l.nodeSize;if(c>e&&r(l,s+a,o||null,i)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let o="",i=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(i?i=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new $(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let o=0,i=0;i<n;o++){let a=this.content[o],l=i+a.nodeSize;l>e&&((i<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-i),Math.min(a.text.length,n-i)):a=a.cut(Math.max(0,e-i-1),Math.min(a.content.size,n-i-1))),r.push(a),s+=a.nodeSize),i=l}return new $(r,s)}cutByIndex(e,n){return e==n?$.empty:e==0&&n==this.content.length?this:new $(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new $(s,o)}addToStart(e){return new $([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new $(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 s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return Hf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Wf(this,e,n,r)}findIndex(e){if(e==0)return $s(0,e);if(e==this.size)return $s(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 s=this.child(n),o=r+s.nodeSize;if(o>=e)return o==e?$s(n+1,o):$s(n,r);r=o}}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 $.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return $.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return $.empty;let n,r=0;for(let s=0;s<e.length;s++){let o=e[s];r+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(n||(n=e.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new $(n||e,r)}static from(e){if(!e)return $.empty;if(e instanceof $)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new $([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}$.empty=new $([],0);const Ti={index:0,offset:0};function $s(t,e){return Ti.index=t,Ti.offset=e,Ti}function io(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(!io(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!io(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let le=class ya{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(o)}}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&&io(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 s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}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 ya.none;if(e instanceof ya)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};le.none=[];class ss extends Error{}class F{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=qf(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new F(r,this.openStart,this.openEnd)}removeBetween(e,n){return new F(Kf(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 F.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new F($.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new F(e,r,s)}}F.empty=new F($.empty,0,0);function Kf(t,e,n){let{index:r,offset:s}=t.findIndex(e),o=t.maybeChild(r),{index:i,offset:a}=t.findIndex(n);if(s==e||o.isText){if(a!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Kf(o.content,e-s-1,n-s-1)))}function qf(t,e,n,r,s,o){let{index:i,offset:a}=t.findIndex(e),l=t.maybeChild(i);if(a==e||l.isText)return o&&r<=0&&s<=0&&!o.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=qf(l.content,e-a-1,n,i==0?r-1:0,i==t.childCount-1?s-1:0,l);return c&&t.replaceChild(i,l.copy(c))}function ly(t,e,n){if(n.openStart>t.depth)throw new ss("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ss("Inconsistent open depths");return Jf(t,e,n,0)}function Jf(t,e,n,r){let s=t.index(r),o=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let i=Jf(t,e,n,r+1);return o.copy(o.content.replaceChild(s,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let i=t.parent,a=i.content;return Dn(i,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:i,end:a}=cy(n,t);return Dn(o,Gf(t,i,a,e,r))}else return Dn(o,ao(t,e,r))}function Yf(t,e){if(!e.type.compatibleContent(t.type))throw new ss("Cannot join "+e.type.name+" onto "+t.type.name)}function xa(t,e,n){let r=t.node(n);return Yf(r,e.node(n)),r}function En(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 Wr(t,e,n,r){let s=(e||t).node(n),o=0,i=e?e.index(n):s.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(En(t.nodeAfter,r),o++));for(let a=o;a<i;a++)En(s.child(a),r);e&&e.depth==n&&e.textOffset&&En(e.nodeBefore,r)}function Dn(t,e){if(!t.type.validContent(e))throw new ss("Invalid content for node "+t.type.name);return t.copy(e)}function Gf(t,e,n,r,s){let o=t.depth>s&&xa(t,e,s+1),i=r.depth>s&&xa(n,r,s+1),a=[];return Wr(null,t,s,a),o&&i&&e.index(s)==n.index(s)?(Yf(o,i),En(Dn(o,Gf(t,e,n,r,s+1)),a)):(o&&En(Dn(o,ao(t,e,s+1)),a),Wr(e,n,s,a),i&&En(Dn(i,ao(n,r,s+1)),a)),Wr(r,null,s,a),new $(a)}function ao(t,e,n){let r=[];if(Wr(null,t,n,r),t.depth>n){let s=xa(t,e,n+1);En(Dn(s,ao(t,e,n+1)),r)}return Wr(e,null,n,r),new $(r)}function cy(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)s=e.node(o).copy($.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class is{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],s=e.child(n);return r?e.child(n).cut(r):s}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],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)s+=r.child(o).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return le.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let a=r;r=s,s=a}let o=r.marks;for(var i=0;i<o.length;i++)o[i].type.spec.inclusive===!1&&(!s||!o[i].isInSet(s.marks))&&(o=o[i--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!s||!r[o].isInSet(s.marks))&&(r=r[o--].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 lo(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=[],s=0,o=n;for(let i=e;;){let{index:a,offset:l}=i.content.findIndex(o),c=o-l;if(r.push(i,a,s+l),!c||(i=i.child(a),i.isText))break;o=c-1,s+=l+1}return new is(n,r,o)}static resolveCached(e,n){let r=Qc.get(e);if(r)for(let o=0;o<r.elts.length;o++){let i=r.elts[o];if(i.pos==n)return i}else Qc.set(e,r=new uy);let s=r.elts[r.i]=is.resolve(e,n);return r.i=(r.i+1)%dy,s}}class uy{constructor(){this.elts=[],this.i=0}}const dy=12,Qc=new WeakMap;class lo{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 fy=Object.create(null);let On=class ba{constructor(e,n,r,s=le.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||$.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,s=0){this.content.nodesBetween(e,n,r,s,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,s){return this.content.textBetween(e,n,r,s)}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&&io(this.attrs,n||e.defaultAttrs||fy)&&le.sameSet(this.marks,r||le.none)}copy(e=null){return e==this.content?this:new ba(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ba(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 F.empty;let s=this.resolve(e),o=this.resolve(n),i=r?0:s.sharedDepth(n),a=s.start(i),c=s.node(i).content.cut(s.pos-a,o.pos-a);return new F(c,s.depth-i,o.depth-i)}replace(e,n,r){return ly(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+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 s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return is.resolveCached(this,e)}resolveNoCache(e){return is.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(s=!0),!s)),s}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()+")"),Xf(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=$.empty,s=0,o=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,s,o),a=i&&i.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(r),i=o&&o.matchFragment(this.content,n);return i?i.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=le.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(!le.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 s=$.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,s,r);return o.type.checkAttrs(o.attrs),o}};On.prototype.text=void 0;class co extends On{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Xf(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 co(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new co(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 Xf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Hn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new hy(e,n);if(r.next==null)return Hn.empty;let s=Qf(r);r.next&&r.err("Unexpected trailing text");let o=vy(by(s));return ky(o,r),o}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 s=this;for(let o=n;s&&o<r;o++)s=s.matchType(e.child(o).type);return s}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 s=[this];function o(i,a){let l=i.matchFragment(e,r);if(l&&(!n||l.validEnd))return $.from(a.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,a.concat(u));if(f)return f}}return null}return o(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 s=r.shift(),o=s.match;if(o.matchType(e)){let i=[];for(let a=s;a.type;a=a.via)i.push(a.type);return i.reverse()}for(let i=0;i<o.next.length;i++){let{type:a,next:l}=o.next[i];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:s}),n[a.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 s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let o=s+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)o+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return o}).join(`
2
2
  `)}}Hn.empty=new Hn(!0);class hy{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 Qf(t){let e=[];do e.push(py(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function py(t){let e=[];do e.push(my(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function my(t){let e=xy(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=gy(t,e);else break;return e}function Zc(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function gy(t,e){let n=Zc(t),r=n;return t.eat(",")&&(t.next!="}"?r=Zc(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function yy(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let o in n){let i=n[o];i.isInGroup(e)&&s.push(i)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function xy(t){if(t.eat("(")){let e=Qf(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=yy(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 by(t){let e=[[]];return s(o(t,0),n()),e;function n(){return e.push([])-1}function r(i,a,l){let c={term:l,to:a};return e[i].push(c),c}function s(i,a){i.forEach(l=>l.to=a)}function o(i,a){if(i.type=="choice")return i.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(i.type=="seq")for(let l=0;;l++){let c=o(i.exprs[l],a);if(l==i.exprs.length-1)return c;s(c,a=n())}else if(i.type=="star"){let l=n();return r(a,l),s(o(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return s(o(i.expr,a),l),s(o(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(a)].concat(o(i.expr,a));if(i.type=="range"){let l=a;for(let c=0;c<i.min;c++){let u=n();s(o(i.expr,l),u),l=u}if(i.max==-1)s(o(i.expr,l),l);else for(let c=i.min;c<i.max;c++){let u=n();r(l,u),s(o(i.expr,l),u),l=u}return[r(l)]}else{if(i.type=="name")return[r(a,void 0,i.value)];throw new Error("Unknown expr type")}}}}function Zf(t,e){return e-t}function eu(t,e){let n=[];return r(e),n.sort(Zf);function r(s){let o=t[s];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(s);for(let i=0;i<o.length;i++){let{term:a,to:l}=o[i];!a&&n.indexOf(l)==-1&&r(l)}}}function vy(t){let e=Object.create(null);return n(eu(t,0));function n(r){let s=[];r.forEach(i=>{t[i].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<s.length;u++)s[u][0]==a&&(c=s[u][1]);eu(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new Hn(r.indexOf(t.length-1)>-1);for(let i=0;i<s.length;i++){let a=s[i][1].sort(Zf);o.next.push({type:s[i][0],next:e[a.join(",")]||n(a)})}return o}}function ky(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],o=!s.validEnd,i=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];i.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function eh(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 th(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let o=t[r];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function nh(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${r}`);for(let s in t)t[s].validate&&t[s].validate(e[s])}function rh(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Cy(t,r,e[r]);return n}let tu=class sh{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=rh(e,r.attrs),this.defaultAttrs=eh(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==Hn.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:th(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new On(this,this.computeAttrs(e),$.from(n),le.setFrom(r))}createChecked(e=null,n,r){return n=$.from(n),this.checkContent(n),new On(this,this.computeAttrs(e),n,le.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=$.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore($.empty,!0);return o?new On(this,e,n.append(o),le.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){nh(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:le.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,i)=>r[o]=new sh(o,n,i));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Sy(t,e,n){let r=n.split("|");return s=>{let o=s===null?"null":typeof s;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class Cy{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Sy(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class oi{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=rh(e,s.attrs),this.excluded=null;let o=eh(this.attrs);this.instance=o?new le(this,o):null}create(e=null){return!e&&this.instance?this.instance:new le(this,th(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((o,i)=>r[o]=new oi(o,s++,n,i)),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){nh(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class oh{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=Ie.from(e.nodes),n.marks=Ie.from(e.marks||{}),this.nodes=tu.compile(this.spec.nodes,this),this.marks=oi.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],i=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[i]||(r[i]=Hn.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?nu(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],i=o.spec.excludes;o.excluded=i==null?[o]:i==""?[]:nu(this,i.split(" "))}this.nodeFromJSON=s=>On.fromJSON(this,s),this.markFromJSON=s=>le.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof tu){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,s)}text(e,n){let r=this.nodes.text;return new co(r,r.defaultAttrs,e,le.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 nu(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],o=t.marks[s],i=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function wy(t){return t.tag!=null}function Ny(t){return t.style!=null}class Tt{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(wy(s))this.tags.push(s);else if(Ny(s)){let o=/[^=]*/.exec(s.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=e.nodes[s.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new su(this,n,!1);return r.addAll(e,le.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new su(this,n,!0);return r.addAll(e,le.none,n.from,n.to),F.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let o=this.tags[s];if(Ey(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let i=o.getAttrs(e);if(i===!1)continue;o.attrs=i||void 0}return o}}}matchStyle(e,n,r,s){for(let o=s?this.styles.indexOf(s)+1:0;o<this.styles.length;o++){let i=this.styles[o],a=i.style;if(!(a.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(e){let n=[];function r(s){let o=s.priority==null?50:s.priority,i=0;for(;i<n.length;i++){let a=n[i];if((a.priority==null?50:a.priority)<o)break}n.splice(i,0,s)}for(let s in e.marks){let o=e.marks[s].spec.parseDOM;o&&o.forEach(i=>{r(i=ou(i)),i.mark||i.ignore||i.clearMark||(i.mark=s)})}for(let s in e.nodes){let o=e.nodes[s].spec.parseDOM;o&&o.forEach(i=>{r(i=ou(i)),i.node||i.ignore||i.mark||(i.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Tt(e,Tt.schemaRules(e)))}}const ih={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},My={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ah={ol:!0,ul:!0},as=1,va=2,Vr=4;function ru(t,e,n){return e!=null?(e?as:0)|(e==="full"?va:0):t&&t.whitespace=="pre"?as|va:n&~Vr}class _s{constructor(e,n,r,s,o,i){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=i,this.content=[],this.activeMarks=le.none,this.match=o||(i&Vr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore($.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&as)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=$.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore($.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&&!ih.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class su{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,o,i=ru(null,n.preserveWhitespace,0)|(r?Vr:0);s?o=new _s(s.type,s.attrs,le.none,!0,n.topMatch||s.type.contentMatch,i):r?o=new _s(null,null,le.none,!0,null,i):o=new _s(e.schema.topNodeType,null,le.none,!0,null,i),this.nodes=[o],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,s=this.top,o=s.options&va?"full":this.localPreserveWS||(s.options&as)>0,{schema:i}=this.parser;if(o==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(i.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(i.text(a[l]),n,!/\S/.test(a[l]));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 a=s.content[s.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(i.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i=e.nodeName.toLowerCase(),a;ah.hasOwnProperty(i)&&this.parser.normalizeLists&&Ty(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:My.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(ih.hasOwnProperty(i))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=s}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 s=0;s<this.parser.matchedStyles.length;s++){let o=this.parser.matchedStyles[s],i=r.getPropertyValue(o);if(i)for(let a=void 0;;){let l=this.parser.matchStyle(o,i,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,s){let o,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(i,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(i&&i.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,s){let o=r||0;for(let i=r?e.childNodes[r]:e.firstChild,a=s==null?null:e.childNodes[s];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i,n);this.findAtPoint(e,o)}findPlace(e,n,r){let s,o;for(let i=this.open,a=0;i>=0;i--){let l=this.nodes[i],c=l.findWrapping(e);if(c&&(!s||s.length>c.length+a)&&(s=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!s)return null;this.sync(o);for(let i=0;i<s.length;i++)n=this.enterInner(s[i],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=le.none;for(let a of s.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):iu(a.type,e.type))&&(i=a.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,n,r,s){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,s)),o}enterInner(e,n,r,s=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let a=ru(e,o,i.options);i.options&Vr&&i.content.length==0&&(a|=Vr);let l=le.none;return r=r.filter(c=>(i.type?i.type.allowsMarkType(c.type):iu(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new _s(e,n,l,s,null,a)),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|=as)}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 s=r.length-1;s>=0;s--)e+=r[s].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 s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].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,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(s?0:1),i=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(i(a-1,l))return!0;return!1}else{let u=l>0||l==0&&s?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return i(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 Ty(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&ah.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Ey(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function ou(t){let e={};for(let n in t)e[n]=t[n];return e}function iu(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let o=[],i=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&i(u))return!0}};if(i(s.contentMatch))return!0}}class Kt{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Bs(n).createDocumentFragment());let s=r,o=[];return e.forEach(i=>{if(o.length||i.marks.length){let a=0,l=0;for(;a<o.length&&l<i.marks.length;){let c=i.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)s=o.pop()[1];for(;l<i.marks.length;){let c=i.marks[l++],u=this.serializeMark(c,i.isInline,n);u&&(o.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(i,n))}),r}serializeNodeInner(e,n){if(e.isText)return Bs(n).createTextNode(e.text);let{dom:r,contentDOM:s}=Zs(Bs(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let o=this.serializeMark(e.marks[s],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&Zs(Bs(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return typeof n=="string"?{dom:e.createTextNode(n)}:Zs(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Kt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=au(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return au(e.marks)}}function au(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Bs(t){return t.document||window.document}const lu=new WeakMap;function Dy(t){let e=lu.get(t);return e===void 0&&lu.set(t,e=Oy(t)),e}function Oy(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 s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function Zs(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let s=e[0],o;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Dy(r))&&o.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 i=s.indexOf(" ");i>0&&(n=s.slice(0,i),s=s.slice(i+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),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?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.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:l,contentDOM:l}}else if(typeof f=="string")l.appendChild(t.createTextNode(f));else{let{dom:h,contentDOM:m}=Zs(t,f,n,r);if(l.appendChild(h),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:l,contentDOM:a}}const lh=65535,ch=Math.pow(2,16);function Ay(t,e){return t+e*ch}function cu(t){return t&lh}function Iy(t){return(t-(t&lh))/ch}const uh=1,dh=2,eo=4,fh=8;class ka{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&fh)>0}get deletedBefore(){return(this.delInfo&(uh|eo))>0}get deletedAfter(){return(this.delInfo&(dh|eo))>0}get deletedAcross(){return(this.delInfo&eo)>0}}class et{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&et.empty)return et.empty}recover(e){let n=0,r=cu(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+Iy(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 s=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+i],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,h=l+s+(f<0?0:u);if(r)return h;let m=e==(n<0?l:d)?null:Ay(a/3,e-l),y=e==l?dh:e==d?uh:eo;return(n<0?e!=l:e!=d)&&(y|=fh),new ka(h,y,m)}s+=u-c}return r?e+s:new ka(e+s,0,null)}touches(e,n){let r=0,s=cu(n),o=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==s*3)return!0;r+=this.ranges[a+i]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let i=this.ranges[s],a=i-(this.inverted?o:0),l=i+(this.inverted?0:o),c=this.ranges[s+n],u=this.ranges[s+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new et(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?et.empty:new et(e<0?[0,-e,0]:[0,0,e])}}et.empty=new et([]);class ls{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ls(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 s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s: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 s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new ls;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 s=0;for(let o=this.from;o<this.to;o++){let i=this._maps[o],a=i.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return r?e:new ka(e,s,null)}}const Ei=Object.create(null);class Fe{getMap(){return et.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ei[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 Ei)throw new RangeError("Duplicate use of step JSON ID "+e);return Ei[e]=n,n.prototype.jsonID=e,n}}class ke{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ke(e,null)}static fail(e){return new ke(null,e)}static fromReplace(e,n,r,s){try{return ke.ok(e.replace(n,r,s))}catch(o){if(o instanceof ss)return ke.fail(o.message);throw o}}}function Ml(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let o=t.child(s);o.content.size&&(o=o.copy(Ml(o.content,e,o))),o.isInline&&(o=e(o,n,s)),r.push(o)}return $.fromArray(r)}class sn 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),s=r.node(r.sharedDepth(this.to)),o=new F(Ml(n.content,(i,a)=>!i.isAtom||!a.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),s),n.openStart,n.openEnd);return ke.fromReplace(e,this.from,this.to,o)}invert(){return new ht(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 sn(n.pos,r.pos,this.mark)}merge(e){return e instanceof sn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new sn(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 sn(n.from,n.to,e.markFromJSON(n.mark))}}Fe.jsonID("addMark",sn);class ht 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 F(Ml(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return ke.fromReplace(e,this.from,this.to,r)}invert(){return new sn(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 ht(n.pos,r.pos,this.mark)}merge(e){return e instanceof ht&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ht(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 ht(n.from,n.to,e.markFromJSON(n.mark))}}Fe.jsonID("removeMark",ht);class on extends Fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ke.fromReplace(e,this.pos,this.pos+1,new F($.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 s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new on(this.pos,n.marks[s]);return new on(this.pos,this.mark)}}return new Wn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new on(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 on(n.pos,e.markFromJSON(n.mark))}}Fe.jsonID("addNodeMark",on);class Wn extends Fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ke.fromReplace(e,this.pos,this.pos+1,new F($.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new on(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Wn(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 Wn(n.pos,e.markFromJSON(n.mark))}}Fe.jsonID("removeNodeMark",Wn);class ve extends Fe{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&Sa(e,this.from,this.to)?ke.fail("Structure replace would overwrite content"):ke.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new et([this.from,this.to-this.from,this.slice.size])}invert(e){return new ve(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&&ve.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new ve(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof ve)||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?F.empty:new F(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ve(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?F.empty:new F(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ve(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 ve(n.from,n.to,F.fromJSON(e,n.slice),!!n.structure)}}ve.MAP_BIAS=1;Fe.jsonID("replace",ve);class Oe extends Fe{constructor(e,n,r,s,o,i,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=o,this.insert=i,this.structure=a}apply(e){if(this.structure&&(Sa(e,this.from,this.gapFrom)||Sa(e,this.gapTo,this.to)))return ke.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ke.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ke.fromReplace(e,this.from,this.to,r):ke.fail("Content does not fit in gap")}getMap(){return new et([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 Oe(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),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||o>r.pos?null:new Oe(n.pos,r.pos,s,o,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 Oe(n.from,n.to,n.gapFrom,n.gapTo,F.fromJSON(e,n.slice),n.insert,!!n.structure)}}Fe.jsonID("replaceAround",Oe);function Sa(t,e,n){let r=t.resolve(e),s=n-e,o=r.depth;for(;s>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,s--;if(s>0){let i=r.node(o).maybeChild(r.indexAfter(o));for(;s>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,s--}}return!1}function jy(t,e,n,r){let s=[],o=[],i,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+l.nodeSize,n),m=r.addToSet(d);for(let y=0;y<d.length;y++)d[y].isInSet(m)||(i&&i.to==f&&i.mark.eq(d[y])?i.to=h:s.push(i=new ht(f,h,d[y])));a&&a.to==f?a.to=h:o.push(a=new sn(f,h,r))}}),s.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function Ry(t,e,n,r){let s=[],o=0;t.doc.nodesBetween(e,n,(i,a)=>{if(!i.isInline)return;o++;let l=null;if(r instanceof oi){let c=i.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let c=Math.min(a+i.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let h=0;h<s.length;h++){let m=s[h];m.step==o-1&&d.eq(s[h].style)&&(f=m)}f?(f.to=c,f.step=o):s.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),s.forEach(i=>t.step(new ht(i.from,i.to,i.style)))}function Tl(t,e,n,r=n.contentMatch,s=!0){let o=t.doc.nodeAt(e),i=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)i.push(new ve(a,u,F.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new ht(a,u,c.marks[f]));if(s&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,m;for(;f=h.exec(c.text);)m||(m=new F($.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),i.push(new ve(a+f.index,a+f.index+f[0].length,m))}}a=u}if(!r.validEnd){let l=r.fillBefore($.empty,!0);t.replace(a,a,new F(l,0,0))}for(let l=i.length-1;l>=0;l--)t.step(i[l])}function Py(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Mr(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,o=0;;--r){let i=t.$from.node(r),a=t.$from.index(r)+s,l=t.$to.indexAfter(r)-o;if(r<t.depth&&i.canReplace(a,l,n))return r;if(r==0||i.type.spec.isolating||!Py(i,a,l))break;a&&(s=1),l<i.childCount&&(o=1)}return null}function Ly(t,e,n){let{$from:r,$to:s,depth:o}=e,i=r.before(o+1),a=s.after(o+1),l=i,c=a,u=$.empty,d=0;for(let m=o,y=!1;m>n;m--)y||r.index(m)>0?(y=!0,u=$.from(r.node(m).copy(u)),d++):l--;let f=$.empty,h=0;for(let m=o,y=!1;m>n;m--)y||s.after(m+1)<s.end(m)?(y=!0,f=$.from(s.node(m).copy(f)),h++):c++;t.step(new Oe(l,c,i,a,new F(u.append(f),d,h),u.size-d,!0))}function El(t,e,n=null,r=t){let s=$y(t,e),o=s&&_y(r,e);return o?s.map(uu).concat({type:e,attrs:n}).concat(o.map(uu)):null}function uu(t){return{type:t,attrs:null}}function $y(t,e){let{parent:n,startIndex:r,endIndex:s}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let i=o.length?o[0]:e;return n.canReplaceWith(r,s,i)?o:null}function _y(t,e){let{parent:n,startIndex:r,endIndex:s}=t,o=n.child(r),i=e.contentMatch.findWrapping(o.type);if(!i)return null;let l=(i.length?i[i.length-1]:e).contentMatch;for(let c=r;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:i}function By(t,e,n){let r=$.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let a=n[i].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=$.from(n[i].type.create(n[i].attrs,r))}let s=e.start,o=e.end;t.step(new Oe(s,o,s,o,new F(r,0,0),n.length,!0))}function zy(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(i,a)=>{let l=typeof s=="function"?s(i):s;if(i.isTextblock&&!i.hasMarkup(r,l)&&Fy(t.doc,t.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&ph(t,i,a,o),Tl(t,t.mapping.slice(o).map(a,1),r,void 0,c===null);let u=t.mapping.slice(o),d=u.map(a,1),f=u.map(a+i.nodeSize,1);return t.step(new Oe(d,f,d+1,f-1,new F($.from(r.create(l,null,i.marks)),0,0),1,!0)),c===!0&&hh(t,i,a,o),!1}})}function hh(t,e,n,r){e.forEach((s,o)=>{if(s.isText){let i,a=/\r?\n|\r/g;for(;i=a.exec(s.text);){let l=t.mapping.slice(r).map(n+1+o+i.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function ph(t,e,n,r){e.forEach((s,o)=>{if(s.type==s.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+o);t.replaceWith(i,i+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{c as B,j as o,b as $,H as D,d as M,r as q,P as d,B as H,q as R}from"./index-C1mpOqCS.js";import{s as V}from"./Plus-1G_og8WC.js";import{i as S}from"./Zap-Btz4H2WA.js";import{S as F}from"./search-input-BVPn7jMs.js";import{E as T}from"./empty-state-GvM6m4x8.js";import{c as G}from"./use-automations-5mHGpVVu.js";import{c as J}from"./use-navigate-to-agent-CO1MIeJp.js";import{A as K}from"./automation-list-row-CSIcCAz-.js";import{h as O}from"./constants-dLUUoWH7.js";import{u as Q}from"./use-virtual-mcp-HMcZh8X3.js";import{R as U}from"./require-capability-Dpz_grcW.js";import"./SearchMd-BNiyCrAF.js";import"./use-mcp-client-Dfio2Yj4.js";import"./auth-Cr2eVmQb.js";import"./use-destination-route-DxNy_Ma2.js";import"./hooks-CSA6kPPq.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-rqQ9Jpo9.js";import"./task-board-B2prHLEQ.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-q3iZVv2q.js";import"./dropdown-menu-DevnSQZb.js";import"./Check-BsuPEhe7.js";import"./ChevronRight-DT_4AEzY.js";import"./DotsVertical-BjWqgC8F.js";import"./Stars02-BNbO1fCl.js";import"./Trash01-B3nUnN0y.js";import"./agent-icon-BIDb5mvo.js";import"./AlertCircle-DFJYUri_.js";import"./UserSquare-CoZv-lpR.js";import"./Tool01-CVixHudG.js";import"./ArrowUp-Ce9W5-DT.js";import"./ArrowLeft-B69osMji.js";import"./Tool02-B1Rll7DS.js";import"./XCircle-C3-B8tUH.js";import"./TrendUp01-DS0su2gw.js";import"./ZapSquare-C0moDjbM.js";import"./ZoomOut-CMekUeIV.js";import"./Users03-DGGc-VCI.js";import"./CheckCircle-BjZsrOXi.js";import"./ChevronDown-DeK6rkVD.js";import"./ChevronSelectorVertical-BgCpIuaE.js";import"./ChevronUp-Cppxk5s5.js";import"./Copy01-D04vSx3O.js";import"./CreditCard01-1ZnUVJrj.js";import"./Download01-B7ZEiIfc.js";import"./Settings02-CLq8hgTw.js";import"./Eye-CzLxQK_G.js";import"./FilterLines-C8wAvz5u.js";import"./Share07-CIGKkhkQ.js";import"./GitBranch01-dX_1jD2V.js";import"./Globe01-BqGcmMHR.js";import"./Globe04-BPXU1eCZ.js";import"./SwitchHorizontal01-BUvBakuW.js";import"./HardDrive-u95EYKbF.js";import"./Image01-BttSSYWW.js";import"./Key01-BegLXSRW.js";import"./LinkExternal01-Di0b5Zl5.js";import"./LockUnlocked01-DfKr7bN9.js";import"./LogOut01-DLiOYO4l.js";import"./Monitor01-wGRQJfXZ.js";import"./Sun-Dkvqgcm2.js";import"./Package-D4pN8vKX.js";import"./Palette-U25Jgy4I.js";import"./Play-jgJ85faV.js";import"./SearchLg-DD_OVTFV.js";import"./Shield01-BnqZ8aVa.js";import"./Stars01-BPMO6tst.js";import"./Upload01-rkRgYQDx.js";import"./User01-B9Xtz4nN.js";import"./Users01-tNF-ixeW.js";import"./XClose-CkXjWrKT.js";import"./access-gate-GJZpkbjp.js";import"./capability-load-error-gq9Hwxb0.js";function W(){const t=B.c(20),i=$(),{org:l}=D(),{data:C}=G(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=M(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(e=>{if(!h||e.name.toLowerCase().includes(h))return!0;if(e.virtual_mcp_id){const p=A.get(e.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(e,p)=>{const N=p&&A.has(p)?p:O(l.id);R("automations_list_row_clicked",{automation_id:e,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${e}`})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,v=d,w=d;let s;t[3]!==i?(s=i("settings.automations.pageTitle"),t[3]=i,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(F,{value:x,onChange:E,placeholder:i("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.emptyTitle"),description:i("settings.automations.emptyDescription"),actions:o.jsxs(H,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),i("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.noResultsTitle"),description:i("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(e=>o.jsx(K,{automation:e,showAgent:!0,onClick:()=>z(e.id,e.virtual_mcp_id)},e.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function wo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=i):i=t[0],i}export{wo as default};
1
+ import{c as B,j as o,b as $,H as D,d as M,r as q,P as d,B as H,q as R}from"./index-BuyUDL-f.js";import{s as V}from"./Plus-BNnPvfG8.js";import{i as S}from"./Zap-CqYQM_jt.js";import{S as F}from"./search-input-qkdY6KsE.js";import{E as T}from"./empty-state-DhZFNn9P.js";import{c as G}from"./use-automations-CmgiIky3.js";import{c as J}from"./use-navigate-to-agent-DDo0Ri7O.js";import{A as K}from"./automation-list-row-ByC4kR2D.js";import{h as O}from"./constants-dLUUoWH7.js";import{u as Q}from"./use-virtual-mcp-B6D2i_ny.js";import{R as U}from"./require-capability-DuFIGwof.js";import"./SearchMd-BJmbTOt_.js";import"./use-mcp-client-BISqHyTj.js";import"./auth-CYohcmQZ.js";import"./use-destination-route-B_24Whcs.js";import"./hooks-CkIombAK.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-MEiWGftu.js";import"./task-board-C5vC-P5k.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-Csnli2CD.js";import"./dropdown-menu-LWFsRDES.js";import"./Check-BejV2053.js";import"./ChevronRight-DV9U9V1C.js";import"./DotsVertical-DqsE4vgP.js";import"./Stars02-Dco9Mo0t.js";import"./Trash01-Bkd5f3e4.js";import"./agent-icon-BGP9U6d6.js";import"./AlertCircle-C0recpiM.js";import"./UserSquare-BO9lFHlw.js";import"./Tool01-BPHywJEb.js";import"./ArrowUp-B_j1WdZ5.js";import"./ArrowLeft-B2Z12k58.js";import"./Tool02-D4AQe9SD.js";import"./XCircle-Dgz569F-.js";import"./TrendUp01-C29DtCbZ.js";import"./ZapSquare-C3xSe5yB.js";import"./ZoomOut-B8EEsxrO.js";import"./Users03-K46FZ0yi.js";import"./CheckCircle-CFTFD5Ed.js";import"./ChevronDown-D5RFRhzf.js";import"./ChevronSelectorVertical-CsU1yTcH.js";import"./ChevronUp-D4IrNOCC.js";import"./Copy01-Cr3MDnu-.js";import"./CreditCard01-D_XNSGw3.js";import"./Download01-Cu0GEQBo.js";import"./Settings02-By8pQbcj.js";import"./Eye-DhUWQAZM.js";import"./FilterLines-DahI-t1v.js";import"./Share07-dg97NqNd.js";import"./GitBranch01-B7UokEiw.js";import"./Globe01-8plmq2TA.js";import"./Globe04-DlFdM3LP.js";import"./SwitchHorizontal01-BfZwTC3u.js";import"./HardDrive-57Sc_B7u.js";import"./Image01-HOTAu7DE.js";import"./Key01-DLcgmMi7.js";import"./LinkExternal01-C5L2pr2x.js";import"./LockUnlocked01-BleHTt-O.js";import"./LogOut01-CfPLGrdh.js";import"./Monitor01-CGzGmiSx.js";import"./Sun-CZ4AN-2E.js";import"./Package-WyJYCcJV.js";import"./Palette-ivE2ilgf.js";import"./Play-CsI3qh5P.js";import"./SearchLg-Ccchnc4p.js";import"./Shield01-CxgaYLbk.js";import"./Stars01-C5bXx9wk.js";import"./Upload01-CPHyTAd0.js";import"./User01-rDgL3Cs0.js";import"./Users01-CGiHQkW6.js";import"./XClose-DRl5snCd.js";import"./access-gate-BL_s88yN.js";import"./capability-load-error-BqilZ1PU.js";function W(){const t=B.c(20),i=$(),{org:l}=D(),{data:C}=G(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=M(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(e=>{if(!h||e.name.toLowerCase().includes(h))return!0;if(e.virtual_mcp_id){const p=A.get(e.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(e,p)=>{const N=p&&A.has(p)?p:O(l.id);R("automations_list_row_clicked",{automation_id:e,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${e}`})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,v=d,w=d;let s;t[3]!==i?(s=i("settings.automations.pageTitle"),t[3]=i,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(F,{value:x,onChange:E,placeholder:i("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.emptyTitle"),description:i("settings.automations.emptyDescription"),actions:o.jsxs(H,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),i("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.noResultsTitle"),description:i("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(e=>o.jsx(K,{automation:e,showAgent:!0,onClick:()=>z(e.id,e.virtual_mcp_id)},e.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function wo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=i):i=t[0],i}export{wo as default};
@@ -1 +1 @@
1
- import{c as k,j as i,n as m,bJ as R,d$ as V,e0 as $,e1 as I}from"./index-C1mpOqCS.js";import{s as O}from"./User01-B9Xtz4nN.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function J(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const f=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==f||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:m(_({objectFit:u}))}),i.jsx(M,{className:m(z,"rounded-none"),delayMs:l?600:0,children:f})]}),e[22]=z,e[23]=f,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let f;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(f=i.jsx(J,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=f):f=e[17],f}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
1
+ import{c as k,j as i,n as m,bJ as R,d$ as V,e0 as $,e1 as I}from"./index-BuyUDL-f.js";import{s as O}from"./User01-rDgL3Cs0.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function J(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const f=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==f||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:m(_({objectFit:u}))}),i.jsx(M,{className:m(z,"rounded-none"),delayMs:l?600:0,children:f})]}),e[22]=z,e[23]=f,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let f;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(f=i.jsx(J,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=f):f=e[17],f}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
@@ -1 +1 @@
1
- import{c as u,n as l,j as g,ce as v,bJ as b}from"./index-C1mpOqCS.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
1
+ import{c as u,n as l,j as g,ce as v,bJ as b}from"./index-BuyUDL-f.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};