decocms 2.178.0 → 2.178.2

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 (340) hide show
  1. package/dist/client/assets/{AlertCircle-DOAxiEBN.js → AlertCircle-12chRuly.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-CRMPlioa.js → AlignLeft-_LT9deOt.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-xJyK-tRR.js → ArrowDown-7rbX3zqZ.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-B-tpcvF0.js → ArrowLeft-erI8s3G2.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BO7WH9Uq.js → ArrowUp-DoIG5eQh.js} +1 -1
  6. package/dist/client/assets/{Building02-D30T2TCD.js → Building02-Dr7IyBdv.js} +1 -1
  7. package/dist/client/assets/{Check-BTP9VTUM.js → Check-DW8AVFkq.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DoZ7ERyW.js → CheckCircle-hBpanOsI.js} +1 -1
  9. package/dist/client/assets/{CheckSquare-Dbh9CJyx.js → CheckSquare-Cr3IzSXp.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-CyloHbYs.js → CheckVerified02-r17ymUCs.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-CLapIRmf.js → ChevronDown-BIRGQoZ5.js} +1 -1
  12. package/dist/client/assets/{ChevronLeft-CMUbV0KP.js → ChevronLeft-D-e7F7Gj.js} +1 -1
  13. package/dist/client/assets/{ChevronRight-DWZgTrde.js → ChevronRight-DsjLlugM.js} +1 -1
  14. package/dist/client/assets/{ChevronUp-DGOtRvEF.js → ChevronUp-Bi3NMXzv.js} +1 -1
  15. package/dist/client/assets/{Clock-BYjyd9hX.js → Clock-D4xJnA3P.js} +1 -1
  16. package/dist/client/assets/{Code01-BkNgeom6.js → Code01-YGq5QwlZ.js} +1 -1
  17. package/dist/client/assets/{Container-D7IaxBn4.js → Container-DHyMOW_p.js} +1 -1
  18. package/dist/client/assets/{Copy01-BJ5f3Ft8.js → Copy01-DkcjIGiS.js} +1 -1
  19. package/dist/client/assets/{Dataflow03-DE7FXw07.js → Dataflow03-CD3eo8oO.js} +1 -1
  20. package/dist/client/assets/{DotsHorizontal-BFhhKBhk.js → DotsHorizontal-CjYGc80C.js} +1 -1
  21. package/dist/client/assets/{DotsVertical-CmyZ1eER.js → DotsVertical-2nyye7GD.js} +1 -1
  22. package/dist/client/assets/{Download01-C0zy7iAO.js → Download01-BvtNZalG.js} +1 -1
  23. package/dist/client/assets/{Edit01-BsJ32les.js → Edit01-CoeKfJ-u.js} +1 -1
  24. package/dist/client/assets/{Edit05-BD2d2k-5.js → Edit05-CbbEzOoe.js} +1 -1
  25. package/dist/client/assets/{Eye-B3PAdhmZ.js → Eye-hBqNQHpc.js} +1 -1
  26. package/dist/client/assets/{EyeOff-_G9JY6d-.js → EyeOff-CJoTkAtN.js} +1 -1
  27. package/dist/client/assets/{File02-CAND2NHE.js → File02-D19u2hUl.js} +1 -1
  28. package/dist/client/assets/{File06-Bvs2lp94.js → File06-Bp4ioOvR.js} +1 -1
  29. package/dist/client/assets/{FilterLines-D-lo1vJH.js → FilterLines-Dvk7BhWf.js} +1 -1
  30. package/dist/client/assets/{Globe01-jlGiKRJ-.js → Globe01-B8Ib7knn.js} +1 -1
  31. package/dist/client/assets/{Globe02-DpkPR1qQ.js → Globe02-wRhoc1N5.js} +1 -1
  32. package/dist/client/assets/{Grid01-Bootsry8.js → Grid01-C5e9ReQ4.js} +1 -1
  33. package/dist/client/assets/{Home02-Cn5GN0Zh.js → Home02-JZJR9jmQ.js} +1 -1
  34. package/dist/client/assets/{Image01-BGiNuXLR.js → Image01-DjoSkYp_.js} +1 -1
  35. package/dist/client/assets/{Inbox01-QN0h6e9y.js → Inbox01-ClVaT7W5.js} +1 -1
  36. package/dist/client/assets/{InfoCircle-BlKvj0NG.js → InfoCircle-DzyfpQes.js} +1 -1
  37. package/dist/client/assets/{Key01-p6odXPoE.js → Key01-qNySmY39.js} +1 -1
  38. package/dist/client/assets/{LayersTwo01-Dj6OMOTN.js → LayersTwo01-dfSlQT0y.js} +1 -1
  39. package/dist/client/assets/{LayoutLeft-Bl9wlb-l.js → LayoutLeft-B2KZfn2n.js} +1 -1
  40. package/dist/client/assets/{Link01-GDNtvq6w.js → Link01-Cz_ZRKoB.js} +1 -1
  41. package/dist/client/assets/{LinkExternal01-Cmp1Jq7T.js → LinkExternal01-CKvCiQnV.js} +1 -1
  42. package/dist/client/assets/{List-BFzJ8d3-.js → List-NLa0AhO4.js} +1 -1
  43. package/dist/client/assets/{Loading01-Bgt2pWQu.js → Loading01-Bb8FCosd.js} +1 -1
  44. package/dist/client/assets/{Lock01-CrtAKCVY.js → Lock01-CnZITIks.js} +1 -1
  45. package/dist/client/assets/{Play-C6mSLsW0.js → Play-Bw5lQw7j.js} +1 -1
  46. package/dist/client/assets/{Plus-Bah3bfIq.js → Plus-CajZ9VfC.js} +1 -1
  47. package/dist/client/assets/{RefreshCcw01-D6TQ-sWU.js → RefreshCcw01-B_NTitRE.js} +1 -1
  48. package/dist/client/assets/{Save01-DMdPXvfp.js → Save01-8oEsqMkJ.js} +1 -1
  49. package/dist/client/assets/{SearchMd-CbNARIB_.js → SearchMd-eZWeU0sP.js} +1 -1
  50. package/dist/client/assets/{Settings01-ncSo0UF1.js → Settings01-ClPVpLPy.js} +1 -1
  51. package/dist/client/assets/{Shield01-jjVa8gNb.js → Shield01-N4ace-oo.js} +1 -1
  52. package/dist/client/assets/{Terminal-BkHJq74m.js → Terminal-CGwuP-_5.js} +1 -1
  53. package/dist/client/assets/{Tool01-CCSFIqz9.js → Tool01-D1m8i7Ez.js} +1 -1
  54. package/dist/client/assets/{Trash01-DJLT0hlL.js → Trash01-B_4PTwjI.js} +1 -1
  55. package/dist/client/assets/{Upload01-CrylBwgE.js → Upload01-CLIOr3Tj.js} +1 -1
  56. package/dist/client/assets/{Users03-ClHTtWuU.js → Users03-Bv-hUQkl.js} +1 -1
  57. package/dist/client/assets/{X-Dr3IGE6q.js → X-LzehymHS.js} +1 -1
  58. package/dist/client/assets/{XClose-CM_PUH0D.js → XClose-CcNXqPQc.js} +1 -1
  59. package/dist/client/assets/{Zap-DNAzZ691.js → Zap-BFN1DqIC.js} +1 -1
  60. package/dist/client/assets/{agent-connections-preview-D9yVR2mI.js → agent-connections-preview-3pYXfstj.js} +1 -1
  61. package/dist/client/assets/{agent-detail-D9yhjqjE.js → agent-detail-DMK-u3yi.js} +1 -1
  62. package/dist/client/assets/{agents-UYgbyoc-.js → agents-Wfe5dNfh.js} +1 -1
  63. package/dist/client/assets/{ai-providers-logos-CKXeyPmY.js → ai-providers-logos-CCp39UCk.js} +1 -1
  64. package/dist/client/assets/{alert-dialog-CGRFjIvo.js → alert-dialog-B_ae3oRt.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-DJtyBhDQ.js → auth-catchall-DAx9m28t.js} +1 -1
  66. package/dist/client/assets/{automation-detail-Da-KIL0v.js → automation-detail-DfFkGT_5.js} +1 -1
  67. package/dist/client/assets/{automations-BBeFyOp2.js → automations-A8NOzTSS.js} +1 -1
  68. package/dist/client/assets/{avatar-B6y4oqG6.js → avatar-B2yArl-q.js} +1 -1
  69. package/dist/client/assets/{badge-BWsagPlP.js → badge-DtRom7JO.js} +1 -1
  70. package/dist/client/assets/{binder-BfA1Jrrc.js → binder-D4cqx_Kx.js} +1 -1
  71. package/dist/client/assets/{breadcrumb-D8mb9kpq.js → breadcrumb-C2RG4nAQ.js} +1 -1
  72. package/dist/client/assets/{card-C0MItTW_.js → card-B8qDZGCZ.js} +1 -1
  73. package/dist/client/assets/{checkbox-DUU3Nuea.js → checkbox-B1rexahu.js} +1 -1
  74. package/dist/client/assets/{collapsible-CtLdTa6t.js → collapsible-BtjeaBAE.js} +1 -1
  75. package/dist/client/assets/{collection-detail-DPIki4up.js → collection-detail-BaBGI9i2.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-DdFInvSR.js → collection-display-button-CpVZ4wHm.js} +1 -1
  77. package/dist/client/assets/{collection-search-CGfzh4mC.js → collection-search-BYV7N3mr.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-DLe2aR6i.js → collection-table-wrapper-CHFJQd21.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-DAHXpc2n.js → collection-tabs-CJEa3dRy.js} +1 -1
  80. package/dist/client/assets/{command-C4HnUxgr.js → command-Drksh_DO.js} +1 -1
  81. package/dist/client/assets/{connection-card-DRd8H1I5.js → connection-card-Bak2l1_M.js} +1 -1
  82. package/dist/client/assets/{connection-detail-MKWBWpRr.js → connection-detail-BKy2ZsS6.js} +1 -1
  83. package/dist/client/assets/{connections-CIQDC3QM.js → connections-Dxf4eIOE.js} +1 -1
  84. package/dist/client/assets/{constants-C6R-Odkq.js → constants-D7qXOYRn.js} +1 -1
  85. package/dist/client/assets/{context-BFTRA5vP.js → context-DxQMlFKC.js} +1 -1
  86. package/dist/client/assets/{create-organization-dialog-Bez2nZe0.js → create-organization-dialog-CNWB-72r.js} +1 -1
  87. package/dist/client/assets/{create-project-dialog-MCGuKGij.js → create-project-dialog-BeIY4Oy9.js} +1 -1
  88. package/dist/client/assets/{danger-D1zng7LS.js → danger-YWbxrjNq.js} +1 -1
  89. package/dist/client/assets/{danger-zone-DbcRzYYG.js → danger-zone-DGg0ZzSy.js} +1 -1
  90. package/dist/client/assets/{dependencies-B8EkZe-H.js → dependencies-DtAVTWu-.js} +1 -1
  91. package/dist/client/assets/{dialog-Bw5T2ogY.js → dialog-ChXYvlDt.js} +1 -1
  92. package/dist/client/assets/{dropdown-menu-Dan8nMb8.js → dropdown-menu-BxlQMXgW.js} +1 -1
  93. package/dist/client/assets/{dynamic-plugin-layout-BDxV3RAS.js → dynamic-plugin-layout-JpZTv0Ay.js} +1 -1
  94. package/dist/client/assets/{editable-task-title-wfBXYVIh.js → editable-task-title-Cm-uIwFs.js} +1 -1
  95. package/dist/client/assets/{empty-state-CoA3_x_6.js → empty-state-qLM_bVsv.js} +1 -1
  96. package/dist/client/assets/{empty-state-C1iyyf7G.js → empty-state-xIvMMy-_.js} +1 -1
  97. package/dist/client/assets/{env-vars-editor-CxyeKMFS.js → env-vars-editor-Yss1wn0m.js} +1 -1
  98. package/dist/client/assets/{extract-connection-data-C8ZedtM3.js → extract-connection-data-48N591A_.js} +1 -1
  99. package/dist/client/assets/{file-browser-CShFs9BG.js → file-browser-BbqpPFZK.js} +2 -2
  100. package/dist/client/assets/{form-B1LLlQBa.js → form-CaFPTMVC.js} +1 -1
  101. package/dist/client/assets/{general-Dnfj_B7U.js → general-DI9irVIQ.js} +1 -1
  102. package/dist/client/assets/{generate-id-WpAuYSZF.js → generate-id-BiV6m8fS.js} +1 -1
  103. package/dist/client/assets/{grid-view-PzYdekcz.js → grid-view-DurgUMuo.js} +1 -1
  104. package/dist/client/assets/{home-CKa-gWjN.js → home-CspK560n.js} +1 -1
  105. package/dist/client/assets/{index-lUO5B2Do.js → index-ChUIqRBi.js} +1 -1
  106. package/dist/client/assets/{index-D-AXXJqO.js → index-CqWJIMlG.js} +1 -1
  107. package/dist/client/assets/{index-CgSAwZ8g.js → index-CqtWW-Tq.js} +1 -1
  108. package/dist/client/assets/{index-DtZLm-Fz.js → index-CqyqI90F.js} +1 -1
  109. package/dist/client/assets/{index-BaVHKLOw.js → index-De1iYnQy.js} +1 -1
  110. package/dist/client/assets/{index-De7oAufQ.js → index-NjMxPJgF.js} +3 -3
  111. package/dist/client/assets/{index-BkxamE0W.js → index-TV8hw8s3.js} +1 -1
  112. package/dist/client/assets/{index-CVayrapI.js → index-YL7q5tyF.js} +1 -1
  113. package/dist/client/assets/{index-BFJo8BQ3.js → index-YRudAQp7.js} +1 -1
  114. package/dist/client/assets/{index-J5pIXVfD.js → index-yiVP4brl.js} +1 -1
  115. package/dist/client/assets/{index-OdE2HBl6.js → index-zWpUeKAz.js} +1 -1
  116. package/dist/client/assets/{infiniteQueryObserver-C7xXp1jr.js → infiniteQueryObserver-JZ0YxCW-.js} +1 -1
  117. package/dist/client/assets/{input-_VKm0O_1.js → input-B89sozd8.js} +1 -1
  118. package/dist/client/assets/{integration-icon-BkY1vh6I.js → integration-icon-BPVDVJvP.js} +1 -1
  119. package/dist/client/assets/{label-BhDDQ3-n.js → label-DkiEYJcU.js} +1 -1
  120. package/dist/client/assets/{layout-BIFV7MZL.js → layout-Cqn-h1Jz.js} +1 -1
  121. package/dist/client/assets/{layout-CZKgiZuG.js → layout-DcmGLVHZ.js} +1 -1
  122. package/dist/client/assets/{login-uo65TNIo.js → login-qT_ItpIx.js} +1 -1
  123. package/dist/client/assets/{logo-upload-CXS8-AgL.js → logo-upload-CoGaedUC.js} +1 -1
  124. package/dist/client/assets/{mcp-app-renderer-BcsrfZJp.js → mcp-app-renderer-By1mQEU9.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-Bp6C5W6n.js → mcp-server-card-B3Nrrgyk.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-Ctbkl5jL.js → mcp-server-detail-DMfy0V9h.js} +2 -2
  127. package/dist/client/assets/{members-DCfL7gNX.js → members-Q81LXZu1.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-DPC7_J-G.js → monaco-editor-ZB27PMAe.js} +1 -1
  129. package/dist/client/assets/{monitoring-ByXLzXVV.js → monitoring-C31A03PZ.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-YR1gT6FF.js → monitoring-dashboard-edit-Dfi8Jxeb.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-BbtnIBfa.js → monitoring-dashboard-view-CxjxBHLW.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-Df9ANyzv.js → monitoring-stats-row-CAn-8pVZ.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-DAQSPrcu.js → oauth-callback-B8DRnSok.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-ai-provider-BM5LYNPq.js → oauth-callback-ai-provider-CsTCxPAY.js} +1 -1
  135. package/dist/client/assets/{org-ai-providers-6KYO-veN.js → org-ai-providers-DaYyItUL.js} +1 -1
  136. package/dist/client/assets/{page-JhhtSWZh.js → page-BjLk0DX_.js} +1 -1
  137. package/dist/client/assets/{page-30eMAMiN.js → page-C2I5Nlmu.js} +1 -1
  138. package/dist/client/assets/{plugin-empty-state-Cl2I2geD.js → plugin-empty-state-K02oXRNN.js} +1 -1
  139. package/dist/client/assets/{plugin-empty-state-R2BzERoW.js → plugin-empty-state-l30u7dec.js} +1 -1
  140. package/dist/client/assets/{plugin-header-Bakz3z0e.js → plugin-header-B_wkRb4Y.js} +1 -1
  141. package/dist/client/assets/{plugin-header-aEsNVQjp.js → plugin-header-CE-BhILm.js} +1 -1
  142. package/dist/client/assets/plugins-6p4XZdw1.js +1 -0
  143. package/dist/client/assets/{popover-D_qGIJiq.js → popover-Br8QkMK3.js} +1 -1
  144. package/dist/client/assets/{project-app-view-BFgEphLV.js → project-app-view-CRe7LVZk.js} +1 -1
  145. package/dist/client/assets/{project-layout-C8oyOOGc.js → project-layout-Bg1hlIaM.js} +1 -1
  146. package/dist/client/assets/{project-plugins-BVt_WzcU.js → project-plugins-BHOZZsH7.js} +1 -1
  147. package/dist/client/assets/{projects-list-C02pKlJj.js → projects-list-i4ZvUqtI.js} +1 -1
  148. package/dist/client/assets/{registry-layout-C-yQnDXG.js → registry-layout-DQV7LhSo.js} +1 -1
  149. package/dist/client/assets/{registry-utils-Dqc_kCiP.js → registry-utils-cjX9P5J9.js} +1 -1
  150. package/dist/client/assets/{reset-password-Cqvt_aDI.js → reset-password-Cgcrl5ZG.js} +1 -1
  151. package/dist/client/assets/{resizable-CO0Uh73H.js → resizable-Nu1SqaJD.js} +1 -1
  152. package/dist/client/assets/{save-actions-ju1vjafj.js → save-actions-CVl6VtT2.js} +1 -1
  153. package/dist/client/assets/{scroll-area-DL2xzsPP.js → scroll-area-BTJQ86Ry.js} +1 -1
  154. package/dist/client/assets/{select-B4liIMVc.js → select-Dx3T3-4n.js} +1 -1
  155. package/dist/client/assets/{select-virtual-mcp-CuflMlTt.js → select-virtual-mcp-BS537pmy.js} +1 -1
  156. package/dist/client/assets/{sheet-Cjr3EcYH.js → sheet-C3HM0Uwr.js} +1 -1
  157. package/dist/client/assets/{shell-layout-DfTROeX_.js → shell-layout-Bco0BFOl.js} +2 -2
  158. package/dist/client/assets/{sidebar-settings-BljNzJVO.js → sidebar-settings-JhN4X_jg.js} +1 -1
  159. package/dist/client/assets/{skeleton-Bt7MRTvB.js → skeleton-Cjm8s7CT.js} +1 -1
  160. package/dist/client/assets/{spinner-Cse1gKnw.js → spinner-Dzx7B3Jl.js} +1 -1
  161. package/dist/client/assets/{store-invite-D8XeTZbu.js → store-invite-BPcFU0aw.js} +1 -1
  162. package/dist/client/assets/{switch-DHS6rwq-.js → switch-CA_oYDia.js} +1 -1
  163. package/dist/client/assets/{table-BPkNFl3F.js → table-C-1rP_rt.js} +1 -1
  164. package/dist/client/assets/{tabs-D9xzXdQn.js → tabs-BSOe8gLq.js} +1 -1
  165. package/dist/client/assets/{task-status-DPcRgg7n.js → task-status-DYx9R7EL.js} +24 -24
  166. package/dist/client/assets/tasks-D1X8oLa3.js +1 -0
  167. package/dist/client/assets/{tasks-panel-i3VUreUx.js → tasks-panel-BJ3TfA-_.js} +1 -1
  168. package/dist/client/assets/{textarea-C_pKpP9s.js → textarea-DIJzFUWn.js} +1 -1
  169. package/dist/client/assets/{time-range-picker-BuykPBni.js → time-range-picker-CGBh-D6p.js} +1 -1
  170. package/dist/client/assets/{toggle-group-VpRSF_Gl.js → toggle-group-DlZGDyPQ.js} +1 -1
  171. package/dist/client/assets/{tools-list-DDFWIxxm.js → tools-list-D-T64862.js} +1 -1
  172. package/dist/client/assets/{tooltip-C4rlkzSj.js → tooltip-BJMSu0c2.js} +1 -1
  173. package/dist/client/assets/{topbar-portal-CF1YRovU.js → topbar-portal-ChPXVsi1.js} +1 -1
  174. package/dist/client/assets/{types-DQbIwrMI.js → types-BHeMLyAV.js} +1 -1
  175. package/dist/client/assets/{use-automations-C1HgdvUZ.js → use-automations-Bmw3x7Dk.js} +1 -1
  176. package/dist/client/assets/{use-collections-CN-KZdhF.js → use-collections-C0cYiFfV.js} +1 -1
  177. package/dist/client/assets/{use-connection-C4RNTGYe.js → use-connection-CHFdKnsr.js} +1 -1
  178. package/dist/client/assets/{use-copy-Cyun7kVE.js → use-copy-xhdji_Bl.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-4JnIm_fY.js → use-create-virtual-mcp-B7odZ_c3.js} +1 -1
  180. package/dist/client/assets/{use-infinite-scroll-B1b4xMpn.js → use-infinite-scroll-CPhZNIw7.js} +1 -1
  181. package/dist/client/assets/{use-install-from-registry-CytyaLQX.js → use-install-from-registry-BzwuBLOx.js} +1 -1
  182. package/dist/client/assets/{use-list-state-CCkxYz8q.js → use-list-state-CbsN6RbJ.js} +1 -1
  183. package/dist/client/assets/{use-mcp-prompts-BGZnglwN.js → use-mcp-prompts-Bel4H4rh.js} +1 -1
  184. package/dist/client/assets/{use-mcp-resources-DSKOWSEO.js → use-mcp-resources-qGdymfRz.js} +1 -1
  185. package/dist/client/assets/{use-mcp-tools-C2aTDAuJ.js → use-mcp-tools-BCZI_Wqc.js} +1 -1
  186. package/dist/client/assets/{use-members-DjL_-1xN.js → use-members-B4ncWtMV.js} +1 -1
  187. package/dist/client/assets/{use-mobile-CMHMyYVi.js → use-mobile-DOUfTohp.js} +1 -1
  188. package/dist/client/assets/{use-project-DxPDjIre.js → use-project-b5C3lq5-.js} +1 -1
  189. package/dist/client/assets/{use-store-discovery-BBXrVOcG.js → use-store-discovery-B402mTHd.js} +1 -1
  190. package/dist/client/assets/{use-view-mode-CXln2RGt.js → use-view-mode-ss3eRodO.js} +1 -1
  191. package/dist/client/assets/{use-virtual-mcp-AdVimCkX.js → use-virtual-mcp-BP6aaUzw.js} +1 -1
  192. package/dist/client/assets/useInfiniteQuery-BXDrDvlH.js +1 -0
  193. package/dist/client/assets/{useMutation-BDzOMrvq.js → useMutation-68NxhXCf.js} +1 -1
  194. package/dist/client/assets/useQuery-BYBCFxgb.js +1 -0
  195. package/dist/client/assets/useSuspenseInfiniteQuery-X3jXt04i.js +1 -0
  196. package/dist/client/assets/{user-DSh4pFej.js → user-iDZRuimU.js} +1 -1
  197. package/dist/client/assets/{workflow-mIahQD3R.js → workflow-CrrTPehP.js} +1 -1
  198. package/dist/client/index.html +1 -1
  199. package/dist/server/cli.js +2 -2
  200. package/dist/server/migrate.js +1 -1
  201. package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
  202. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
  203. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
  204. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
  205. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
  206. package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
  207. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
  208. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
  209. package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
  210. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
  211. package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
  212. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
  213. package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
  214. package/dist/server/node_modules/pg-connection-string/README.md +105 -0
  215. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
  216. package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
  217. package/dist/server/node_modules/pg-connection-string/index.js +231 -0
  218. package/dist/server/node_modules/pg-connection-string/package.json +52 -0
  219. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  220. package/dist/server/node_modules/pg-int8/README.md +16 -0
  221. package/dist/server/node_modules/pg-int8/index.js +100 -0
  222. package/dist/server/node_modules/pg-int8/package.json +24 -0
  223. package/dist/server/node_modules/pg-pool/LICENSE +21 -0
  224. package/dist/server/node_modules/pg-pool/README.md +357 -0
  225. package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
  226. package/dist/server/node_modules/pg-pool/index.js +517 -0
  227. package/dist/server/node_modules/pg-pool/package.json +51 -0
  228. package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
  229. package/dist/server/node_modules/pg-protocol/README.md +3 -0
  230. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
  231. package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
  232. package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
  233. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
  234. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
  235. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
  236. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
  237. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
  238. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
  239. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
  240. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
  241. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
  242. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
  243. package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
  244. package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
  245. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
  246. package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
  247. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
  248. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
  249. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
  250. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
  251. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
  252. package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
  253. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
  254. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
  255. package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
  256. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
  257. package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
  258. package/dist/server/node_modules/pg-protocol/package.json +45 -0
  259. package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
  260. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
  261. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
  262. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
  263. package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
  264. package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
  265. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
  266. package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
  267. package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
  268. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
  269. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
  270. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
  271. package/dist/server/node_modules/pg-types/.travis.yml +7 -0
  272. package/dist/server/node_modules/pg-types/Makefile +14 -0
  273. package/dist/server/node_modules/pg-types/README.md +75 -0
  274. package/dist/server/node_modules/pg-types/index.d.ts +137 -0
  275. package/dist/server/node_modules/pg-types/index.js +47 -0
  276. package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
  277. package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
  278. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
  279. package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
  280. package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
  281. package/dist/server/node_modules/pg-types/package.json +42 -0
  282. package/dist/server/node_modules/pg-types/test/index.js +24 -0
  283. package/dist/server/node_modules/pg-types/test/types.js +597 -0
  284. package/dist/server/node_modules/pgpass/README.md +74 -0
  285. package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
  286. package/dist/server/node_modules/pgpass/lib/index.js +23 -0
  287. package/dist/server/node_modules/pgpass/package.json +41 -0
  288. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  289. package/dist/server/node_modules/postgres-array/index.js +97 -0
  290. package/dist/server/node_modules/postgres-array/license +21 -0
  291. package/dist/server/node_modules/postgres-array/package.json +35 -0
  292. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  293. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  294. package/dist/server/node_modules/postgres-bytea/license +21 -0
  295. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  296. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  297. package/dist/server/node_modules/postgres-date/index.js +116 -0
  298. package/dist/server/node_modules/postgres-date/license +21 -0
  299. package/dist/server/node_modules/postgres-date/package.json +33 -0
  300. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  301. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  302. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  303. package/dist/server/node_modules/postgres-interval/license +21 -0
  304. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  305. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  306. package/dist/server/node_modules/split2/LICENSE +13 -0
  307. package/dist/server/node_modules/split2/README.md +85 -0
  308. package/dist/server/node_modules/split2/bench.js +27 -0
  309. package/dist/server/node_modules/split2/index.js +141 -0
  310. package/dist/server/node_modules/split2/package.json +39 -0
  311. package/dist/server/node_modules/split2/test.js +409 -0
  312. package/dist/server/server.js +2 -2
  313. package/package.json +1 -1
  314. package/dist/client/assets/plugins-CJOgdAgY.js +0 -1
  315. package/dist/client/assets/tasks-CAcIEtSF.js +0 -1
  316. package/dist/client/assets/useInfiniteQuery-Dw4aF3nd.js +0 -1
  317. package/dist/client/assets/useQuery-CTePvczf.js +0 -1
  318. package/dist/client/assets/useSuspenseInfiniteQuery-All2JJwt.js +0 -1
  319. package/dist/server/node_modules/pg/README.md +0 -95
  320. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  321. package/dist/server/node_modules/pg/lib/client.js +0 -743
  322. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  323. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  324. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  325. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  326. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  327. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  328. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  329. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  330. package/dist/server/node_modules/pg/lib/index.js +0 -73
  331. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  332. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  333. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  334. package/dist/server/node_modules/pg/lib/query.js +0 -252
  335. package/dist/server/node_modules/pg/lib/result.js +0 -109
  336. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  337. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  338. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  339. package/dist/server/node_modules/pg/package.json +0 -76
  340. /package/dist/server/node_modules/{pg → pg-cloudflare}/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
- import{r as H,cf as Tl,cg as du,j as Me,ar as fu,bO as xt,ch as hu}from"./index-De7oAufQ.js";const pu=({size:n=24,color:e="currentColor",...t})=>H.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},H.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));pu.displayName="Stop";function se(n){this.content=n}se.prototype={constructor:se,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new se(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new se(t)},addToStart:function(n,e){return new se([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new se(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new se(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=se.from(n),n.size?new se(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=se.from(n),n.size?new se(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=se.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};se.from=function(n){if(n instanceof se)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new se(e)};function Al(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Al(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Nl(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Nl(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Al(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Nl(this,e,t,r)}findIndex(e){if(e==0)return Pn(0,e);if(e==this.size)return Pn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Pn(t+1,i):Pn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const ts={index:0,offset:0};function Pn(n,e){return ts.index=n,ts.offset=e,ts}function Xn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Xn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Xn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let $=class Ns{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Xn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ns.none;if(e instanceof Ns)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};$.none=[];class Qn extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Dl(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Ol(this.content,e+this.openStart,t+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,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(k.empty,0,0);function Ol(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Ol(i.content,e-s-1,t-s-1)))}function Dl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Dl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function mu(n,e,t){if(t.openStart>n.depth)throw new Qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Qn("Inconsistent open depths");return Il(n,e,t,0)}function Il(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Il(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return gt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=gu(t,n);return gt(i,Pl(n,o,l,e,r))}else return gt(i,Zn(n,e,r))}function Rl(n,e){if(!e.type.compatibleContent(n.type))throw new Qn("Cannot join "+e.type.name+" onto "+n.type.name)}function Os(n,e,t){let r=n.node(t);return Rl(r,e.node(t)),r}function mt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function on(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(mt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)mt(s.child(l),r);e&&e.depth==t&&e.textOffset&&mt(e.nodeBefore,r)}function gt(n,e){return n.type.checkContent(e),n.copy(e)}function Pl(n,e,t,r,s){let i=n.depth>s&&Os(n,e,s+1),o=r.depth>s&&Os(t,r,s+1),l=[];return on(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Rl(i,o),mt(gt(i,Pl(n,e,t,r,s+1)),l)):(i&&mt(gt(i,Zn(n,e,s+1)),l),on(e,t,s,l),o&&mt(gt(o,Zn(t,r,s+1)),l)),on(r,null,s,l),new k(l)}function Zn(n,e,t){let r=[];if(on(null,n,t,r),n.depth>t){let s=Os(n,e,t+1);mt(gt(s,Zn(n,e,t+1)),r)}return on(e,null,t,r),new k(r)}function gu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class yn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new er(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new yn(t,r,i)}static resolveCached(e,t){let r=Ji.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Ji.set(e,r=new yu);let s=r.elts[r.i]=yn.resolve(e,t);return r.i=(r.i+1)%bu,s}}class yu{constructor(){this.elts=[],this.i=0}}const bu=12,Ji=new WeakMap;class er{constructor(e,t,r){this.$from=e,this.$to=t,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 ku=Object.create(null);class Ne{constructor(e,t,r,s=$.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,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,t,r,s){return this.content.textBetween(e,t,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,t,r){return this.type==e&&Xn(this.attrs,t||e.defaultAttrs||ku)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new Ne(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ne(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return mu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return yn.resolveCached(this,e)}resolveNoCache(e){return yn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.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()+")"),Ll(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Ne.prototype.text=void 0;class tr extends Ne{constructor(e,t,r,s){if(super(e,t,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):Ll(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ll(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class St{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new xu(e,t);if(r.next==null)return St.empty;let s=Bl(r);r.next&&r.err("Unexpected trailing text");let i=Tu(vu(s));return Au(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
1
+ import{r as H,cf as Tl,cg as du,j as Me,ar as fu,bO as xt,ch as hu}from"./index-NjMxPJgF.js";const pu=({size:n=24,color:e="currentColor",...t})=>H.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},H.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));pu.displayName="Stop";function se(n){this.content=n}se.prototype={constructor:se,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new se(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new se(t)},addToStart:function(n,e){return new se([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new se(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new se(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=se.from(n),n.size?new se(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=se.from(n),n.size?new se(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=se.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};se.from=function(n){if(n instanceof se)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new se(e)};function Al(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Al(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Nl(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Nl(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Al(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Nl(this,e,t,r)}findIndex(e){if(e==0)return Pn(0,e);if(e==this.size)return Pn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Pn(t+1,i):Pn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const ts={index:0,offset:0};function Pn(n,e){return ts.index=n,ts.offset=e,ts}function Xn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Xn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Xn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let $=class Ns{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Xn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ns.none;if(e instanceof Ns)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};$.none=[];class Qn extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Dl(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Ol(this.content,e+this.openStart,t+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,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(k.empty,0,0);function Ol(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Ol(i.content,e-s-1,t-s-1)))}function Dl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Dl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function mu(n,e,t){if(t.openStart>n.depth)throw new Qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Qn("Inconsistent open depths");return Il(n,e,t,0)}function Il(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Il(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return gt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=gu(t,n);return gt(i,Pl(n,o,l,e,r))}else return gt(i,Zn(n,e,r))}function Rl(n,e){if(!e.type.compatibleContent(n.type))throw new Qn("Cannot join "+e.type.name+" onto "+n.type.name)}function Os(n,e,t){let r=n.node(t);return Rl(r,e.node(t)),r}function mt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function on(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(mt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)mt(s.child(l),r);e&&e.depth==t&&e.textOffset&&mt(e.nodeBefore,r)}function gt(n,e){return n.type.checkContent(e),n.copy(e)}function Pl(n,e,t,r,s){let i=n.depth>s&&Os(n,e,s+1),o=r.depth>s&&Os(t,r,s+1),l=[];return on(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Rl(i,o),mt(gt(i,Pl(n,e,t,r,s+1)),l)):(i&&mt(gt(i,Zn(n,e,s+1)),l),on(e,t,s,l),o&&mt(gt(o,Zn(t,r,s+1)),l)),on(r,null,s,l),new k(l)}function Zn(n,e,t){let r=[];if(on(null,n,t,r),n.depth>t){let s=Os(n,e,t+1);mt(gt(s,Zn(n,e,t+1)),r)}return on(e,null,t,r),new k(r)}function gu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class yn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new er(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new yn(t,r,i)}static resolveCached(e,t){let r=Ji.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Ji.set(e,r=new yu);let s=r.elts[r.i]=yn.resolve(e,t);return r.i=(r.i+1)%bu,s}}class yu{constructor(){this.elts=[],this.i=0}}const bu=12,Ji=new WeakMap;class er{constructor(e,t,r){this.$from=e,this.$to=t,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 ku=Object.create(null);class Ne{constructor(e,t,r,s=$.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,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,t,r,s){return this.content.textBetween(e,t,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,t,r){return this.type==e&&Xn(this.attrs,t||e.defaultAttrs||ku)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new Ne(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ne(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return mu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return yn.resolveCached(this,e)}resolveNoCache(e){return yn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.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()+")"),Ll(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Ne.prototype.text=void 0;class tr extends Ne{constructor(e,t,r,s){if(super(e,t,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):Ll(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ll(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class St{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new xu(e,t);if(r.next==null)return St.empty;let s=Bl(r);r.next&&r.err("Unexpected trailing text");let i=Tu(vu(s));return Au(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
2
  `)}}St.empty=new St(!0);class xu{constructor(e,t){this.string=e,this.nodeTypes=t,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 Bl(n){let e=[];do e.push(Su(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Su(n){let e=[];do e.push(Cu(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Cu(n){let e=Eu(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=wu(n,e);else break;return e}function Gi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function wu(n,e){let t=Gi(n),r=t;return n.eat(",")&&(n.next!="}"?r=Gi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Mu(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function Eu(n){if(n.eat("(")){let e=Bl(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Mu(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function vu(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function zl(n,e){return e-n}function Yi(n,e){let t=[];return r(e),t.sort(zl);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function Tu(n){let e=Object.create(null);return t(Yi(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Yi(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new St(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(zl);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Au(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function $l(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Fl(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function Vl(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function _l(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Ou(n,r,e[r]);return t}let Xi=class Hl{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=_l(e,r.attrs),this.defaultAttrs=$l(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==St.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:Fl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ne(this,this.computeAttrs(e),k.from(t),$.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new Ne(this,this.computeAttrs(e),t,$.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(k.empty,!0);return i?new Ne(this,e,t.append(i),$.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.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){Vl(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:$.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Hl(i,t,o));let s=t.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 i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Nu(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Ou{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Nu(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Fr{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=_l(e,s.attrs),this.excluded=null;let i=$l(this.attrs);this.instance=i?new $(this,i):null}create(e=null){return!e&&this.instance?this.instance:new $(this,Fl(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Fr(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Vl(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class jl{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=se.from(e.nodes),t.marks=se.from(e.marks||{}),this.nodes=Xi.compile(this.spec.nodes,this),this.marks=Fr.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 i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=St.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?Qi(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Qi(this,o.split(" "))}this.nodeFromJSON=s=>Ne.fromJSON(this,s),this.markFromJSON=s=>$.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Xi){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(t,r,s)}text(e,t){let r=this.nodes.text;return new tr(r,r.defaultAttrs,e,$.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Qi(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Du(n){return n.tag!=null}function Iu(n){return n.style!=null}class et{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Du(s))this.tags.push(s);else if(Iu(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new eo(this,t,!1);return r.addAll(e,$.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new eo(this,t,!0);return r.addAll(e,$.none,t.from,t.to),M.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Lu(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=to(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=to(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new et(e,et.schemaRules(e)))}}const Wl={address:!0,article:!0,aside:!0,blockquote:!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},Ru={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ql={ol:!0,ul:!0},bn=1,Ds=2,ln=4;function Zi(n,e,t){return e!=null?(e?bn:0)|(e==="full"?Ds:0):n&&n.whitespace=="pre"?bn|Ds:t&~ln}class Ln{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=$.none,this.match=i||(o&ln?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);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&bn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Wl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class eo{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Zi(null,t.preserveWhitespace,0)|(r?ln:0);s?i=new Ln(s.type,s.attrs,$.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Ln(null,null,$.none,!0,null,o):i=new Ln(e.schema.topNodeType,null,$.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Ds?"full":this.localPreserveWS||(s.options&bn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;ql.hasOwnProperty(o)&&this.parser.normalizeLists&&Pu(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Ru.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Wl.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=$.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):no(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Zi(e,i,o.options);o.options&ln&&o.content.length==0&&(l|=ln);let a=$.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):no(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Ln(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=bn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&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)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Pu(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&ql.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Lu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function to(n){let e={};for(let t in n)e[t]=n[t];return e}function no(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class vt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=ns(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Un(ns(t),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,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Un(ns(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Un(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new vt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=ro(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return ro(e.marks)}}function ro(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ns(n){return n.document||window.document}const so=new WeakMap;function Bu(n){let e=so.get(n);return e===void 0&&so.set(n,e=zu(n)),e}function zu(n){let e=null;function t(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++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Un(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Bu(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.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?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Un(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Ul=65535,Kl=Math.pow(2,16);function $u(n,e){return n+e*Kl}function io(n){return n&Ul}function Fu(n){return(n-(n&Ul))/Kl}const Jl=1,Gl=2,Kn=4,Yl=8;class Is{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Yl)>0}get deletedBefore(){return(this.delInfo&(Jl|Kn))>0}get deletedAfter(){return(this.delInfo&(Gl|Kn))>0}get deletedAcross(){return(this.delInfo&Kn)>0}}class ye{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ye.empty)return ye.empty}recover(e){let t=0,r=io(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Fu(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:$u(l/3,e-a),g=e==a?Gl:e==d?Jl:Kn;return(t<0?e!=a:e!=d)&&(g|=Yl),new Is(h,g,p)}s+=u-c}return r?e+s:new Is(e+s,0,null)}touches(e,t){let r=0,s=io(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new ye(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ye.empty:new ye(e<0?[0,-e,0]:[0,0,e])}}ye.empty=new ye([]);class kn{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new kn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new kn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new Is(e,s,null)}}const rs=Object.create(null);class fe{getMap(){return ye.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=rs[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in rs)throw new RangeError("Duplicate use of step JSON ID "+e);return rs[e]=t,t.prototype.jsonID=e,t}}class G{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new G(e,null)}static fail(e){return new G(null,e)}static fromReplace(e,t,r,s){try{return G.ok(e.replace(t,r,s))}catch(i){if(i instanceof Qn)return G.fail(i.message);throw i}}}function oi(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(oi(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return k.fromArray(r)}class Xe extends fe{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new M(oi(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return G.fromReplace(e,this.from,this.to,i)}invert(){return new Ae(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Xe(t.pos,r.pos,this.mark)}merge(e){return e instanceof Xe&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xe(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Xe(t.from,t.to,e.markFromJSON(t.mark))}}fe.jsonID("addMark",Xe);class Ae extends fe{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new M(oi(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return G.fromReplace(e,this.from,this.to,r)}invert(){return new Xe(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ae(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ae&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ae(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ae(t.from,t.to,e.markFromJSON(t.mark))}}fe.jsonID("removeMark",Ae);class Qe extends fe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return G.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new Qe(this.pos,t.marks[s]);return new Qe(this.pos,this.mark)}}return new Ct(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Qe(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Qe(t.pos,e.markFromJSON(t.mark))}}fe.jsonID("addNodeMark",Qe);class Ct extends fe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return G.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Qe(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ct(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ct(t.pos,e.markFromJSON(t.mark))}}fe.jsonID("removeNodeMark",Ct);class te extends fe{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&Rs(e,this.from,this.to)?G.fail("Structure replace would overwrite content"):G.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ye([this.from,this.to-this.from,this.slice.size])}invert(e){return new te(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new te(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof te)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new te(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new te(e.from,this.to,t,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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new te(t.from,t.to,M.fromJSON(e,t.slice),!!t.structure)}}fe.jsonID("replace",te);class ne extends fe{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Rs(e,this.from,this.gapFrom)||Rs(e,this.gapTo,this.to)))return G.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return G.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?G.fromReplace(e,this.from,this.to,r):G.fail("Content does not fit in gap")}getMap(){return new ye([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ne(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new ne(t.pos,r.pos,s,i,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ne(t.from,t.to,t.gapFrom,t.gapTo,M.fromJSON(e,t.slice),t.insert,!!t.structure)}}fe.jsonID("replaceAround",ne);function Rs(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Vu(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:s.push(o=new Ae(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new Xe(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function _u(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof Fr){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Ae(o.from,o.to,o.style)))}function li(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new te(l,u,M.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Ae(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new M(k.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new te(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);n.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function Hu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Ut(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!Hu(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function ju(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=k.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,f=k.from(s.node(p).copy(f)),h++):c++;n.step(new ne(a,c,o,l,new M(u.append(f),d,h),u.size-d,!0))}function ai(n,e,t=null,r=n){let s=Wu(n,e),i=s&&qu(r,e);return i?s.map(oo).concat({type:e,attrs:t}).concat(i.map(oo)):null}function oo(n){return{type:n,attrs:null}}function Wu(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function qu(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Uu(n,e,t){let r=k.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new ne(s,i,s,i,new M(r,0,0),t.length,!0))}function Ku(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&Ju(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Ql(n,o,l,i),li(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new ne(d,f,d+1,f-1,new M(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Xl(n,o,l,i),!1}})}function Xl(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Ql(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{r as n,a2 as I,j as c,a4 as v,af as O,a7 as S,aa as D,a9 as M,a5 as L,ag as k}from"./index-De7oAufQ.js";var f="Collapsible",[F,q]=D(f),[B,g]=F(f),T=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,open:o,defaultOpen:t,disabled:l,onOpenChange:i,...C}=e,[p,d]=I({prop:o,defaultProp:t??!1,onChange:i,caller:f});return c.jsx(B,{scope:r,disabled:l,contentId:O(),open:p,onOpenToggle:n.useCallback(()=>d(b=>!b),[d]),children:c.jsx(v.div,{"data-state":R(p),"data-disabled":l?"":void 0,...C,ref:s})})});T.displayName=f;var j="CollapsibleTrigger",w=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,...o}=e,t=g(j,r);return c.jsx(v.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":R(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...o,ref:s,onClick:S(e.onClick,t.onOpenToggle)})});w.displayName=j;var x="CollapsibleContent",A=n.forwardRef((e,s)=>{const{forceMount:r,...o}=e,t=g(x,e.__scopeCollapsible);return c.jsx(M,{present:r||t.open,children:({present:l})=>c.jsx(G,{...o,ref:s,present:l})})});A.displayName=x;var G=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,present:o,children:t,...l}=e,i=g(x,r),[C,p]=n.useState(o),d=n.useRef(null),b=L(s,d),h=n.useRef(0),y=h.current,N=n.useRef(0),P=N.current,m=i.open||C,E=n.useRef(m),u=n.useRef(void 0);return n.useEffect(()=>{const a=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(a)},[]),k(()=>{const a=d.current;if(a){u.current=u.current||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const _=a.getBoundingClientRect();h.current=_.height,N.current=_.width,E.current||(a.style.transitionDuration=u.current.transitionDuration,a.style.animationName=u.current.animationName),p(o)}},[i.open,o]),c.jsx(v.div,{"data-state":R(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...l,ref:b,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":P?`${P}px`:void 0,...e.style},children:m&&t})});function R(e){return e?"open":"closed"}var H=T,z=w,J=A;export{w as C,H as R,z as T,A as a,J as b,q as c};
1
+ import{r as n,a2 as I,j as c,a4 as v,af as O,a7 as S,aa as D,a9 as M,a5 as L,ag as k}from"./index-NjMxPJgF.js";var f="Collapsible",[F,q]=D(f),[B,g]=F(f),T=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,open:o,defaultOpen:t,disabled:l,onOpenChange:i,...C}=e,[p,d]=I({prop:o,defaultProp:t??!1,onChange:i,caller:f});return c.jsx(B,{scope:r,disabled:l,contentId:O(),open:p,onOpenToggle:n.useCallback(()=>d(b=>!b),[d]),children:c.jsx(v.div,{"data-state":R(p),"data-disabled":l?"":void 0,...C,ref:s})})});T.displayName=f;var j="CollapsibleTrigger",w=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,...o}=e,t=g(j,r);return c.jsx(v.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":R(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...o,ref:s,onClick:S(e.onClick,t.onOpenToggle)})});w.displayName=j;var x="CollapsibleContent",A=n.forwardRef((e,s)=>{const{forceMount:r,...o}=e,t=g(x,e.__scopeCollapsible);return c.jsx(M,{present:r||t.open,children:({present:l})=>c.jsx(G,{...o,ref:s,present:l})})});A.displayName=x;var G=n.forwardRef((e,s)=>{const{__scopeCollapsible:r,present:o,children:t,...l}=e,i=g(x,r),[C,p]=n.useState(o),d=n.useRef(null),b=L(s,d),h=n.useRef(0),y=h.current,N=n.useRef(0),P=N.current,m=i.open||C,E=n.useRef(m),u=n.useRef(void 0);return n.useEffect(()=>{const a=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(a)},[]),k(()=>{const a=d.current;if(a){u.current=u.current||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const _=a.getBoundingClientRect();h.current=_.height,N.current=_.width,E.current||(a.style.transitionDuration=u.current.transitionDuration,a.style.animationName=u.current.animationName),p(o)}},[i.open,o]),c.jsx(v.div,{"data-state":R(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...l,ref:b,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":P?`${P}px`:void 0,...e.style},children:m&&t})});function R(e){return e?"open":"closed"}var H=T,z=w,J=A;export{w as C,H as R,z as T,A as a,J as b,q as c};
@@ -1 +1 @@
1
- import{r as n,af as q,az as C,R as Ee,H as ke,J as Se,F as xe,aA as j}from"./index-De7oAufQ.js";var de=1,Ie=.9,Re=.8,Ce=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Re,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Ce,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:H=!1,vimBindings:A=!0,...O}=t,U=q(),ne=q(),J=q(),M=n.useRef(null),w=Te();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")G(),T(),w(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(J);y?y.focus():(a=document.getElementById(U))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{T(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{G(),T(),r.current.value||W(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{G(),s?.getAttribute("id")===e&&W(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:J,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function T(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),z=m.getAttribute("id");return((g=e.get(z))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function W(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function G(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],z=le(S,y);r.current.filtered.items.set(g,z),z>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Je(s,V):Ne(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(C.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Ge},b),B(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:N},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=R(w=>w.value&&w.value===p.current),E=R(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;H(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function H(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:U,forceMount:ne,keywords:J,...M}=t;return n.createElement(C.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:H,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=R(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(C.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),B(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=R(d=>!d.search);return!r&&!c?null:n.createElement(C.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=R(i=>i.search),v=R(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(C.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),ze=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=R(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(C.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},B(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Be=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),He=n.forwardRef((t,l)=>R(r=>r.filtered.count===0)?n.createElement(C.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ue=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(C.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},B(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:ze,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Be,Empty:He,Loading:Ue});function Je(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ne(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function R(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var Te=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function We(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function B({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(We(l),{ref:l.ref},r(l.props.children)):r(l)}var Ge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
1
+ import{r as n,af as q,az as C,R as Ee,H as ke,J as Se,F as xe,aA as j}from"./index-NjMxPJgF.js";var de=1,Ie=.9,Re=.8,Ce=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Re,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Ce,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:H=!1,vimBindings:A=!0,...O}=t,U=q(),ne=q(),J=q(),M=n.useRef(null),w=Te();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")G(),T(),w(1,W);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(J);y?y.focus():(a=document.getElementById(U))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{T(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{G(),T(),r.current.value||W(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{G(),s?.getAttribute("id")===e&&W(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:J,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function T(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),z=m.getAttribute("id");return((g=e.get(z))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function W(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function G(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],z=le(S,y);r.current.filtered.items.set(g,z),z>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Je(s,V):Ne(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(C.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Ge},b),B(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:N},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=R(w=>w.value&&w.value===p.current),E=R(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;H(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function H(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:U,forceMount:ne,keywords:J,...M}=t;return n.createElement(C.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:H,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=R(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(C.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),B(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=R(d=>!d.search);return!r&&!c?null:n.createElement(C.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=R(i=>i.search),v=R(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(C.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),ze=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=R(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(C.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},B(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Be=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),He=n.forwardRef((t,l)=>R(r=>r.filtered.count===0)?n.createElement(C.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ue=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(C.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},B(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:ze,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Be,Empty:He,Loading:Ue});function Je(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ne(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function R(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var Te=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function We(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function B({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(We(l),{ref:l.ref},r(l.props.children)):r(l)}var Ge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
@@ -1 +1 @@
1
- import{aj as d,ao as f,ap as v,aq as b}from"./index-De7oAufQ.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
1
+ import{aj as d,ao as f,ap as v,aq as b}from"./index-NjMxPJgF.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
@@ -1 +1 @@
1
- import{c as s,D as a,j as d}from"./index-De7oAufQ.js";function f(l){const e=s.c(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] bg-background","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==n||e[8]!==t?(o=d.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{f as I};
1
+ import{c as s,D as a,j as d}from"./index-NjMxPJgF.js";function f(l){const e=s.c(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] bg-background","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==n||e[8]!==t?(o=d.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{f as I};
@@ -1 +1 @@
1
- import{c as z,j as h,r as L,D as v}from"./index-De7oAufQ.js";import{n as k}from"./Container-D7IaxBn4.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},y={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},A={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28};function $(g){const e=z.c(7),{icon:s,name:o,size:x,className:n,fallbackIcon:l}=g,t=x===void 0?"md":x,u=s??"no-icon";let c;return e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==o||e[4]!==t||e[5]!==u?(c=h.jsx(D,{icon:s,name:o,size:t,className:n,fallbackIcon:l},u),e[0]=n,e[1]=l,e[2]=s,e[3]=o,e[4]=t,e[5]=u,e[6]=c):c=e[6],c}function D(g){const e=z.c(24),{icon:s,name:o,size:x,className:n,fallbackIcon:l}=g,t=x===void 0?"md":x,[u,c]=L.useState(!1),_=!!s&&u,j=C[t],b=y[t];let i;e[0]!==n||e[1]!==j||e[2]!==b?(i=v("rounded-lg border border-border shrink-0 overflow-hidden aspect-square",j,b,n),e[0]=n,e[1]=j,e[2]=b,e[3]=i):i=e[3];const p=s||void 0,E=!_&&"hidden";let r;e[4]!==E?(r=v("h-full w-full object-cover",E),e[4]=E,e[5]=r):r=e[5];let w,I;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=()=>c(!1),I=()=>c(!0),e[6]=w,e[7]=I):(w=e[6],I=e[7]);let a;e[8]!==o||e[9]!==p||e[10]!==r?(a=h.jsx("img",{src:p,alt:o,className:r,onError:w,onLoad:I}),e[8]=o,e[9]=p,e[10]=r,e[11]=a):a=e[11];const N=_&&"hidden";let m;e[12]!==N?(m=v("h-full w-full flex items-center justify-center bg-muted/20",N),e[12]=N,e[13]=m):m=e[13];let d;e[14]!==l||e[15]!==t?(d=l??h.jsx(k,{size:A[t],className:"text-muted-foreground"}),e[14]=l,e[15]=t,e[16]=d):d=e[16];let f;e[17]!==m||e[18]!==d?(f=h.jsx("div",{className:m,children:d}),e[17]=m,e[18]=d,e[19]=f):f=e[19];let S;return e[20]!==a||e[21]!==f||e[22]!==i?(S=h.jsxs("div",{className:i,children:[a,f]}),e[20]=a,e[21]=f,e[22]=i,e[23]=S):S=e[23],S}export{$ as I};
1
+ import{c as z,j as h,r as L,D as v}from"./index-NjMxPJgF.js";import{n as k}from"./Container-DHyMOW_p.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},y={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},A={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28};function $(g){const e=z.c(7),{icon:s,name:o,size:x,className:n,fallbackIcon:l}=g,t=x===void 0?"md":x,u=s??"no-icon";let c;return e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==o||e[4]!==t||e[5]!==u?(c=h.jsx(D,{icon:s,name:o,size:t,className:n,fallbackIcon:l},u),e[0]=n,e[1]=l,e[2]=s,e[3]=o,e[4]=t,e[5]=u,e[6]=c):c=e[6],c}function D(g){const e=z.c(24),{icon:s,name:o,size:x,className:n,fallbackIcon:l}=g,t=x===void 0?"md":x,[u,c]=L.useState(!1),_=!!s&&u,j=C[t],b=y[t];let i;e[0]!==n||e[1]!==j||e[2]!==b?(i=v("rounded-lg border border-border shrink-0 overflow-hidden aspect-square",j,b,n),e[0]=n,e[1]=j,e[2]=b,e[3]=i):i=e[3];const p=s||void 0,E=!_&&"hidden";let r;e[4]!==E?(r=v("h-full w-full object-cover",E),e[4]=E,e[5]=r):r=e[5];let w,I;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=()=>c(!1),I=()=>c(!0),e[6]=w,e[7]=I):(w=e[6],I=e[7]);let a;e[8]!==o||e[9]!==p||e[10]!==r?(a=h.jsx("img",{src:p,alt:o,className:r,onError:w,onLoad:I}),e[8]=o,e[9]=p,e[10]=r,e[11]=a):a=e[11];const N=_&&"hidden";let m;e[12]!==N?(m=v("h-full w-full flex items-center justify-center bg-muted/20",N),e[12]=N,e[13]=m):m=e[13];let d;e[14]!==l||e[15]!==t?(d=l??h.jsx(k,{size:A[t],className:"text-muted-foreground"}),e[14]=l,e[15]=t,e[16]=d):d=e[16];let f;e[17]!==m||e[18]!==d?(f=h.jsx("div",{className:m,children:d}),e[17]=m,e[18]=d,e[19]=f):f=e[19];let S;return e[20]!==a||e[21]!==f||e[22]!==i?(S=h.jsxs("div",{className:i,children:[a,f]}),e[20]=a,e[21]=f,e[22]=i,e[23]=S):S=e[23],S}export{$ as I};
@@ -1 +1 @@
1
- import{c as i,D as n,j as r,ai as p}from"./index-De7oAufQ.js";function c(l){const e=i.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=n("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=r.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
1
+ import{c as i,D as n,j as r,ai as p}from"./index-NjMxPJgF.js";function c(l){const e=i.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=n("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=r.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
@@ -1 +1 @@
1
- import{c as I,at as M,e as F,g as A,j as t,D as J,ad as Q,r as D,u as U,Q as L,O as B,au as W,P as Z}from"./index-De7oAufQ.js";import{S as w}from"./skeleton-Bt7MRTvB.js";import{u as q}from"./use-project-DxPDjIre.js";import{P as m}from"./index-BaVHKLOw.js";import{b,d as E,B as R,a as G,e as O,c as H}from"./breadcrumb-D8mb9kpq.js";import{n as K}from"./Container-D7IaxBn4.js";import{i as V}from"./LayoutLeft-Bl9wlb-l.js";import{t as X}from"./Settings01-ncSo0UF1.js";import{i as Y}from"./Zap-DNAzZ691.js";import"./useQuery-CTePvczf.js";import"./constants-C6R-Odkq.js";import"./useMutation-BDzOMrvq.js";import"./tooltip-C4rlkzSj.js";import"./index-DtZLm-Fz.js";import"./ChevronRight-DWZgTrde.js";const ee=[{key:"general",label:"General",icon:t.jsx(X,{size:14})},{key:"dependencies",label:"Connections",icon:t.jsx(K,{size:14})},{key:"sidebar",label:"Sidebar",icon:t.jsx(V,{size:14})},{key:"plugins",label:"Features",icon:t.jsx(Y,{size:14})},{key:"danger",label:"Danger Zone",icon:t.jsx(Q,{size:14})}];function te(){const e=I.c(9),{location:l}=M(),r=F();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const d=A(o);let s;e[1]!==r||e[2]!==d?(s=n=>{const a=`/${d.org}/${d.project}/settings/${n}`;r({href:a})},e[1]=r,e[2]=d,e[3]=s):s=e[3];const p=s;let i;e[4]!==p||e[5]!==l?(i=ee.map(n=>{const a=l.pathname.endsWith(`/settings/${n.key}`);return t.jsxs("button",{type:"button",onClick:()=>p(n.key),className:J("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",a?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[t.jsx("span",{className:"shrink-0",children:n.icon}),t.jsx("span",{className:"truncate",children:n.label})]},n.key)}),e[4]=p,e[5]=l,e[6]=i):i=e[6];let c;return e[7]!==i?(c=t.jsx("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-0.5 px-2",children:i}),e[7]=i,e[8]=c):c=e[8],c}function T(){const e=I.c(3);let l,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(w,{className:"h-6 w-48"}),r=t.jsx(w,{className:"h-4 w-80"}),e[0]=l,e[1]=r):(l=e[0],r=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[l,r,t.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[t.jsx(w,{className:"h-12 w-full"}),t.jsx(w,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function se(){const e=I.c(41);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const r=A(l),{org:o}=U(),d=r.project,{data:s,isLoading:p}=q(o.id,d);if(p||!s){let h;e[1]!==r.org?(h=t.jsx(b,{children:t.jsx(E,{asChild:!0,children:t.jsx(L,{to:"/$org/$project/projects",params:{org:r.org,project:B},children:"Projects"})})}),e[1]=r.org,e[2]=h):h=e[2];let $;e[3]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(O,{}),e[3]=$):$=e[3];let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(b,{children:t.jsx(H,{children:"Settings"})}),e[4]=v):v=e[4];let g;e[5]!==h?(g=t.jsx(m.Header,{children:t.jsx(m.Header.Left,{children:t.jsx(R,{children:t.jsxs(G,{children:[h,$,v]})})})}),e[5]=h,e[6]=g):g=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(m.Content,{children:t.jsx("div",{className:"p-8",children:t.jsx(T,{})})}),e[7]=C):C=e[7];let z;return e[8]!==g?(z=t.jsxs(m,{children:[g,C]}),e[8]=g,e[9]=z):z=e[9],z}const i=s.slug===B;let c;e[10]!==s.description||e[11]!==s.enabledPlugins||e[12]!==s.id||e[13]!==s.name||e[14]!==s.organizationId||e[15]!==s.slug||e[16]!==s.ui||e[17]!==i?(c={id:s.id,organizationId:s.organizationId,slug:s.slug,name:s.name,description:s.description,enabledPlugins:s.enabledPlugins,ui:s.ui,isOrgAdmin:i},e[10]=s.description,e[11]=s.enabledPlugins,e[12]=s.id,e[13]=s.name,e[14]=s.organizationId,e[15]=s.slug,e[16]=s.ui,e[17]=i,e[18]=c):c=e[18];const n=c;let a;e[19]!==r.org?(a=t.jsx(b,{children:t.jsx(E,{asChild:!0,children:t.jsx(L,{to:"/$org/$project/projects",params:{org:r.org,project:B},children:"Projects"})})}),e[19]=r.org,e[20]=a):a=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(O,{}),e[21]=S):S=e[21];let f;e[22]!==r.org||e[23]!==s.slug?(f={org:r.org,project:s.slug},e[22]=r.org,e[23]=s.slug,e[24]=f):f=e[24];let j;e[25]!==s.name||e[26]!==f?(j=t.jsx(b,{children:t.jsx(E,{asChild:!0,children:t.jsx(L,{to:"/$org/$project",params:f,children:s.name})})}),e[25]=s.name,e[26]=f,e[27]=j):j=e[27];let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(O,{}),e[28]=_):_=e[28];let y;e[29]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(b,{children:t.jsx(H,{children:"Settings"})}),e[29]=y):y=e[29];let x;e[30]!==a||e[31]!==j?(x=t.jsx(m.Header,{children:t.jsx(m.Header.Left,{children:t.jsx(R,{children:t.jsxs(G,{children:[a,S,j,_,y]})})})}),e[30]=a,e[31]=j,e[32]=x):x=e[32];let P;e[33]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(te,{}),e[33]=P):P=e[33];let k;e[34]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(m.Content,{className:"flex",children:[P,t.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:t.jsx(D.Suspense,{fallback:t.jsx(T,{}),children:t.jsx(W,{})})})]}),e[34]=k):k=e[34];let u;e[35]!==x?(u=t.jsxs(m,{children:[x,k]}),e[35]=x,e[36]=u):u=e[36];let N;return e[37]!==n||e[38]!==o||e[39]!==u?(N=t.jsx(Z,{org:o,project:n,children:u}),e[37]=n,e[38]=o,e[39]=u,e[40]=N):N=e[40],N}function pe(){const e=I.c(1);let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(D.Suspense,{fallback:null,children:t.jsx(se,{})}),e[0]=l):l=e[0],l}export{pe as default};
1
+ import{c as I,at as M,e as F,g as A,j as t,D as J,ad as Q,r as D,u as U,Q as L,O as B,au as W,P as Z}from"./index-NjMxPJgF.js";import{S as w}from"./skeleton-Cjm8s7CT.js";import{u as q}from"./use-project-b5C3lq5-.js";import{P as m}from"./index-De1iYnQy.js";import{b,d as E,B as R,a as G,e as O,c as H}from"./breadcrumb-C2RG4nAQ.js";import{n as K}from"./Container-DHyMOW_p.js";import{i as V}from"./LayoutLeft-B2KZfn2n.js";import{t as X}from"./Settings01-ClPVpLPy.js";import{i as Y}from"./Zap-BFN1DqIC.js";import"./useQuery-BYBCFxgb.js";import"./constants-D7qXOYRn.js";import"./useMutation-68NxhXCf.js";import"./tooltip-BJMSu0c2.js";import"./index-CqyqI90F.js";import"./ChevronRight-DsjLlugM.js";const ee=[{key:"general",label:"General",icon:t.jsx(X,{size:14})},{key:"dependencies",label:"Connections",icon:t.jsx(K,{size:14})},{key:"sidebar",label:"Sidebar",icon:t.jsx(V,{size:14})},{key:"plugins",label:"Features",icon:t.jsx(Y,{size:14})},{key:"danger",label:"Danger Zone",icon:t.jsx(Q,{size:14})}];function te(){const e=I.c(9),{location:l}=M(),r=F();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const d=A(o);let s;e[1]!==r||e[2]!==d?(s=n=>{const a=`/${d.org}/${d.project}/settings/${n}`;r({href:a})},e[1]=r,e[2]=d,e[3]=s):s=e[3];const p=s;let i;e[4]!==p||e[5]!==l?(i=ee.map(n=>{const a=l.pathname.endsWith(`/settings/${n.key}`);return t.jsxs("button",{type:"button",onClick:()=>p(n.key),className:J("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",a?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[t.jsx("span",{className:"shrink-0",children:n.icon}),t.jsx("span",{className:"truncate",children:n.label})]},n.key)}),e[4]=p,e[5]=l,e[6]=i):i=e[6];let c;return e[7]!==i?(c=t.jsx("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-0.5 px-2",children:i}),e[7]=i,e[8]=c):c=e[8],c}function T(){const e=I.c(3);let l,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(w,{className:"h-6 w-48"}),r=t.jsx(w,{className:"h-4 w-80"}),e[0]=l,e[1]=r):(l=e[0],r=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[l,r,t.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[t.jsx(w,{className:"h-12 w-full"}),t.jsx(w,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function se(){const e=I.c(41);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const r=A(l),{org:o}=U(),d=r.project,{data:s,isLoading:p}=q(o.id,d);if(p||!s){let h;e[1]!==r.org?(h=t.jsx(b,{children:t.jsx(E,{asChild:!0,children:t.jsx(L,{to:"/$org/$project/projects",params:{org:r.org,project:B},children:"Projects"})})}),e[1]=r.org,e[2]=h):h=e[2];let $;e[3]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(O,{}),e[3]=$):$=e[3];let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(b,{children:t.jsx(H,{children:"Settings"})}),e[4]=v):v=e[4];let g;e[5]!==h?(g=t.jsx(m.Header,{children:t.jsx(m.Header.Left,{children:t.jsx(R,{children:t.jsxs(G,{children:[h,$,v]})})})}),e[5]=h,e[6]=g):g=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(m.Content,{children:t.jsx("div",{className:"p-8",children:t.jsx(T,{})})}),e[7]=C):C=e[7];let z;return e[8]!==g?(z=t.jsxs(m,{children:[g,C]}),e[8]=g,e[9]=z):z=e[9],z}const i=s.slug===B;let c;e[10]!==s.description||e[11]!==s.enabledPlugins||e[12]!==s.id||e[13]!==s.name||e[14]!==s.organizationId||e[15]!==s.slug||e[16]!==s.ui||e[17]!==i?(c={id:s.id,organizationId:s.organizationId,slug:s.slug,name:s.name,description:s.description,enabledPlugins:s.enabledPlugins,ui:s.ui,isOrgAdmin:i},e[10]=s.description,e[11]=s.enabledPlugins,e[12]=s.id,e[13]=s.name,e[14]=s.organizationId,e[15]=s.slug,e[16]=s.ui,e[17]=i,e[18]=c):c=e[18];const n=c;let a;e[19]!==r.org?(a=t.jsx(b,{children:t.jsx(E,{asChild:!0,children:t.jsx(L,{to:"/$org/$project/projects",params:{org:r.org,project:B},children:"Projects"})})}),e[19]=r.org,e[20]=a):a=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(O,{}),e[21]=S):S=e[21];let f;e[22]!==r.org||e[23]!==s.slug?(f={org:r.org,project:s.slug},e[22]=r.org,e[23]=s.slug,e[24]=f):f=e[24];let j;e[25]!==s.name||e[26]!==f?(j=t.jsx(b,{children:t.jsx(E,{asChild:!0,children:t.jsx(L,{to:"/$org/$project",params:f,children:s.name})})}),e[25]=s.name,e[26]=f,e[27]=j):j=e[27];let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(O,{}),e[28]=_):_=e[28];let y;e[29]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(b,{children:t.jsx(H,{children:"Settings"})}),e[29]=y):y=e[29];let x;e[30]!==a||e[31]!==j?(x=t.jsx(m.Header,{children:t.jsx(m.Header.Left,{children:t.jsx(R,{children:t.jsxs(G,{children:[a,S,j,_,y]})})})}),e[30]=a,e[31]=j,e[32]=x):x=e[32];let P;e[33]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(te,{}),e[33]=P):P=e[33];let k;e[34]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(m.Content,{className:"flex",children:[P,t.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:t.jsx(D.Suspense,{fallback:t.jsx(T,{}),children:t.jsx(W,{})})})]}),e[34]=k):k=e[34];let u;e[35]!==x?(u=t.jsxs(m,{children:[x,k]}),e[35]=x,e[36]=u):u=e[36];let N;return e[37]!==n||e[38]!==o||e[39]!==u?(N=t.jsx(Z,{org:o,project:n,children:u}),e[37]=n,e[38]=o,e[39]=u,e[40]=N):N=e[40],N}function pe(){const e=I.c(1);let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(D.Suspense,{fallback:null,children:t.jsx(se,{})}),e[0]=l):l=e[0],l}export{pe as default};
@@ -1 +1 @@
1
- import{c as p,r,ar as w,j as n}from"./index-De7oAufQ.js";import{P as x}from"./index-BaVHKLOw.js";const R=r.createContext(null);function H(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.tabsEl)return null;let s;return e[0]!==l||e[1]!==t.tabsEl?(s=w.createPortal(l,t.tabsEl),e[0]=l,e[1]=t.tabsEl,e[2]=s):s=e[2],s}function L(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.actionsEl)return null;let s;return e[0]!==l||e[1]!==t.actionsEl?(s=w.createPortal(l,t.actionsEl),e[0]=l,e[1]=t.actionsEl,e[2]=s):s=e[2],s}function $(m){const e=p.c(18),{children:l,breadcrumb:t}=m,[s,y]=r.useState(null),[j,C]=r.useState(null),S=r.useRef(null),V=r.useRef(null);let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=c=>{S.current=c,c&&y(c)},e[0]=E):E=e[0];const g=E;let b;e[1]===Symbol.for("react.memo_cache_sentinel")?(b=c=>{V.current=c,c&&C(c)},e[1]=b):b=e[1];const v=b;let a;e[2]!==j||e[3]!==s?(a={tabsEl:s,actionsEl:j},e[2]=j,e[3]=s,e[4]=a):a=e[4];let o;e[5]!==t?(o=n.jsx(x.Header.Left,{children:t}),e[5]=t,e[6]=o):o=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsxs(x.Header.Right,{children:[n.jsx("div",{ref:g,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),n.jsx("div",{ref:v,className:"flex items-center gap-2 shrink-0"})]}),e[7]=h):h=e[7];let i;e[8]!==o?(i=n.jsxs(x.Header,{children:[o,h]}),e[8]=o,e[9]=i):i=e[9];let f;e[10]!==l?(f=n.jsx(x.Content,{children:l}),e[10]=l,e[11]=f):f=e[11];let u;e[12]!==i||e[13]!==f?(u=n.jsxs(x,{children:[i,f]}),e[12]=i,e[13]=f,e[14]=u):u=e[14];let d;return e[15]!==a||e[16]!==u?(d=n.jsx(R,{value:a,children:u}),e[15]=a,e[16]=u,e[17]=d):d=e[17],d}export{L as V,$ as a,H as b};
1
+ import{c as p,r,ar as w,j as n}from"./index-NjMxPJgF.js";import{P as x}from"./index-De1iYnQy.js";const R=r.createContext(null);function H(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.tabsEl)return null;let s;return e[0]!==l||e[1]!==t.tabsEl?(s=w.createPortal(l,t.tabsEl),e[0]=l,e[1]=t.tabsEl,e[2]=s):s=e[2],s}function L(m){const e=p.c(3),{children:l}=m,t=r.useContext(R);if(!t?.actionsEl)return null;let s;return e[0]!==l||e[1]!==t.actionsEl?(s=w.createPortal(l,t.actionsEl),e[0]=l,e[1]=t.actionsEl,e[2]=s):s=e[2],s}function $(m){const e=p.c(18),{children:l,breadcrumb:t}=m,[s,y]=r.useState(null),[j,C]=r.useState(null),S=r.useRef(null),V=r.useRef(null);let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=c=>{S.current=c,c&&y(c)},e[0]=E):E=e[0];const g=E;let b;e[1]===Symbol.for("react.memo_cache_sentinel")?(b=c=>{V.current=c,c&&C(c)},e[1]=b):b=e[1];const v=b;let a;e[2]!==j||e[3]!==s?(a={tabsEl:s,actionsEl:j},e[2]=j,e[3]=s,e[4]=a):a=e[4];let o;e[5]!==t?(o=n.jsx(x.Header.Left,{children:t}),e[5]=t,e[6]=o):o=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsxs(x.Header.Right,{children:[n.jsx("div",{ref:g,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),n.jsx("div",{ref:v,className:"flex items-center gap-2 shrink-0"})]}),e[7]=h):h=e[7];let i;e[8]!==o?(i=n.jsxs(x.Header,{children:[o,h]}),e[8]=o,e[9]=i):i=e[9];let f;e[10]!==l?(f=n.jsx(x.Content,{children:l}),e[10]=l,e[11]=f):f=e[11];let u;e[12]!==i||e[13]!==f?(u=n.jsxs(x,{children:[i,f]}),e[12]=i,e[13]=f,e[14]=u):u=e[14];let d;return e[15]!==a||e[16]!==u?(d=n.jsx(R,{value:a,children:u}),e[15]=a,e[16]=u,e[17]=d):d=e[17],d}export{L as V,$ as a,H as b};
@@ -1 +1 @@
1
- import{y as Q,r as x,f as p,j as e,B as g,D as T,d as ne,S as W,N as ae,c as ie}from"./index-De7oAufQ.js";import{u as B}from"./useMutation-BDzOMrvq.js";import{I}from"./input-_VKm0O_1.js";function oe({redirectUrl:s,callbackUrl:r="/"}){const{emailAndPassword:l,resetPassword:u,emailOtp:i,socialProviders:d}=Q(),[n,j]=x.useState(""),[y,D]=x.useState(""),[b,_]=x.useState(""),[C,O]=x.useState(""),[A,L]=x.useState(!1),[R,N]=x.useState(()=>!l.enabled&&i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=x.useState(""),[$,Y]=x.useState(!1),m=R==="signUp",f=R==="forgotPassword",v=R==="emailOtp",z=B({mutationFn:async({email:t,password:a,name:M})=>{try{if(m){const h=await p.signUp.email({email:t,password:a,name:M||""});if(h.error)throw new Error(h.error.message||"Sign up failed");return h}else{const h=await p.signIn.email({email:t,password:a});if(h.error)throw new Error(h.error.message||"Sign in failed");return h}}catch(h){throw h instanceof Error?h:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),F=B({mutationFn:async({email:t})=>{const a=await p.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{Y(!0)}}),k=B({mutationFn:async({email:t})=>{const a=await p.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{L(!0)}}),E=B({mutationFn:async({email:t,otp:a})=>{const M=await p.signIn.emailOtp({email:t,otp:a});if(M.error)throw new Error(M.error.message||"Invalid code");return M},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),q=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{n.trim()&&!q(n)&&S("Invalid email address")},X=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}z.mutate({email:n,password:y,name:b})},Z=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}F.mutate({email:n})},ee=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}k.mutate({email:n})},te=t=>{t.preventDefault(),E.mutate({email:n,otp:C})},P=t=>a=>{t(a.target.value),G&&z.reset(),H&&F.reset(),J&&(k.reset(),E.reset()),t===j&&c&&S("")},U=t=>{N(t),_(""),O(""),L(!1),S(""),Y(!1),z.reset(),F.reset(),k.reset(),E.reset()},o=z.isPending||F.isPending||k.isPending||E.isPending,G=z.error,H=F.error,J=k.error||E.error,w=m?n.trim()&&y.trim()&&b.trim():f?n.trim():v?A?C.trim():n.trim():n.trim()&&y.trim(),se=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=f?"Reset your password":v?A?"Enter verification code":"Sign in with email code":m?"Create your account":"Login or signup below";return e.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:re})}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:se(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!f&&d.enabled&&e.jsx("div",{className:"grid gap-3",children:d.providers.map(t=>e.jsxs(g,{type:"button",variant:"outline",size:"lg",className:"w-full font-medium",disabled:o,onClick:()=>{p.signIn.social({provider:t.name,callbackURL:s??r})},children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:"h-5 w-5","aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!f&&d.enabled&&(l.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),v&&i.enabled&&e.jsx(e.Fragment,{children:A?e.jsxs("form",{onSubmit:te,className:"grid gap-4",children:[e.jsxs("div",{className:"rounded-xl bg-muted/50 p-3 text-sm text-muted-foreground text-center",children:["Code sent to ",n]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:C,onChange:P(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code"})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Verifying...":"Verify"}),e.jsx(g,{type:"button",variant:"ghost",onClick:()=>{L(!1),O(""),k.reset(),E.reset()},disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send code"})]})}),f&&l.enabled&&!$&&e.jsxs("form",{onSubmit:Z,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send reset link"})]}),!f&&!v&&l.enabled&&e.jsxs("form",{onSubmit:X,className:"grid gap-4",children:[e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",m?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:T("p-1",!m&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:b,onChange:P(_),required:!0,disabled:o||!m,"aria-hidden":!m})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!m&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>U("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:P(D),required:!0,disabled:o})]}),e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",w?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:T("p-1",!w&&"pointer-events-none"),children:e.jsx(g,{type:"submit",disabled:o||!w,className:T("w-full font-semibold"),size:"lg","aria-hidden":!w,children:o?m?"Creating account...":"Signing in...":"Continue"})})})]}),!f&&i.enabled&&l.enabled&&!v&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("emailOtp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with email code instead"})}),v&&l.enabled&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with password instead"})}),e.jsx("div",{className:"text-center",children:f?e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):!v&&l.enabled?e.jsx(g,{type:"button",variant:"link",onClick:()=>U(m?"signIn":"signUp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:m?"Already have an account? Sign in":"Don't have an account? Sign up"}):null}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function le({redirectTo:s}){const[r,l]=x.useState(null);return x.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let d=0;d<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));d++)await new Promise(n=>setTimeout(n,Math.min(1e3*2**d,1e4)));if(!i?.ok){const d=await i?.json().catch(()=>({}));throw new Error(d?.error||"Auto-login failed")}if(!u){const d=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=d}}catch(i){u||l(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),r?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",r]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function de(s){if(!s.client_id||s.response_type!=="code")return null;const r=new URLSearchParams;return s.client_id&&r.set("client_id",s.client_id),s.redirect_uri&&r.set("redirect_uri",s.redirect_uri),s.response_type&&r.set("response_type",s.response_type),s.state&&r.set("state",s.state),s.scope&&r.set("scope",s.scope),s.code_challenge&&r.set("code_challenge",s.code_challenge),s.code_challenge_method&&r.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${r.toString()}`}function ce(s){const r=ie.c(5),{callbackURL:l,providerId:u}=s;let i,d;r[0]!==l||r[1]!==u?(i=()=>{(async()=>await p.signIn.sso({providerId:u,callbackURL:l}))()},d=[u,l],r[0]=l,r[1]=u,r[2]=i,r[3]=d):(i=r[2],d=r[3]),x.useEffect(i,d);let n;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(W,{}),r[4]=n):n=r[4],n}function he(){const s=p.useSession(),r=ne({from:"/login"}),{next:l="/",client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}=r,b=l.startsWith("/")&&!l.startsWith("//")?l:"/",{sso:_,emailAndPassword:C,magicLink:O,emailOtp:A,socialProviders:L,localMode:R}=Q(),N=de({client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}),c=N||b;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(ae,{to:b}):R?e.jsx(le,{redirectTo:c}):_.enabled?e.jsx(ce,{callbackURL:c,providerId:_.providerId}):C.enabled||O.enabled||A.enabled||L.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-brand to-brand/75 p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--brand-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx(oe,{redirectUrl:N,callbackUrl:b})]})]}):e.jsx("div",{children:"No login options available"})}export{he as default};
1
+ import{y as Q,r as x,f as p,j as e,B as g,D as T,d as ne,S as W,N as ae,c as ie}from"./index-NjMxPJgF.js";import{u as B}from"./useMutation-68NxhXCf.js";import{I}from"./input-B89sozd8.js";function oe({redirectUrl:s,callbackUrl:r="/"}){const{emailAndPassword:l,resetPassword:u,emailOtp:i,socialProviders:d}=Q(),[n,j]=x.useState(""),[y,D]=x.useState(""),[b,_]=x.useState(""),[C,O]=x.useState(""),[A,L]=x.useState(!1),[R,N]=x.useState(()=>!l.enabled&&i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=x.useState(""),[$,Y]=x.useState(!1),m=R==="signUp",f=R==="forgotPassword",v=R==="emailOtp",z=B({mutationFn:async({email:t,password:a,name:M})=>{try{if(m){const h=await p.signUp.email({email:t,password:a,name:M||""});if(h.error)throw new Error(h.error.message||"Sign up failed");return h}else{const h=await p.signIn.email({email:t,password:a});if(h.error)throw new Error(h.error.message||"Sign in failed");return h}}catch(h){throw h instanceof Error?h:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),F=B({mutationFn:async({email:t})=>{const a=await p.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{Y(!0)}}),k=B({mutationFn:async({email:t})=>{const a=await p.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{L(!0)}}),E=B({mutationFn:async({email:t,otp:a})=>{const M=await p.signIn.emailOtp({email:t,otp:a});if(M.error)throw new Error(M.error.message||"Invalid code");return M},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r}}),q=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{n.trim()&&!q(n)&&S("Invalid email address")},X=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}z.mutate({email:n,password:y,name:b})},Z=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}F.mutate({email:n})},ee=t=>{if(t.preventDefault(),!q(n)){S("Invalid email address");return}k.mutate({email:n})},te=t=>{t.preventDefault(),E.mutate({email:n,otp:C})},P=t=>a=>{t(a.target.value),G&&z.reset(),H&&F.reset(),J&&(k.reset(),E.reset()),t===j&&c&&S("")},U=t=>{N(t),_(""),O(""),L(!1),S(""),Y(!1),z.reset(),F.reset(),k.reset(),E.reset()},o=z.isPending||F.isPending||k.isPending||E.isPending,G=z.error,H=F.error,J=k.error||E.error,w=m?n.trim()&&y.trim()&&b.trim():f?n.trim():v?A?C.trim():n.trim():n.trim()&&y.trim(),se=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=f?"Reset your password":v?A?"Enter verification code":"Sign in with email code":m?"Create your account":"Login or signup below";return e.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:re})}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:se(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!f&&d.enabled&&e.jsx("div",{className:"grid gap-3",children:d.providers.map(t=>e.jsxs(g,{type:"button",variant:"outline",size:"lg",className:"w-full font-medium",disabled:o,onClick:()=>{p.signIn.social({provider:t.name,callbackURL:s??r})},children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:"h-5 w-5","aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!f&&d.enabled&&(l.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),v&&i.enabled&&e.jsx(e.Fragment,{children:A?e.jsxs("form",{onSubmit:te,className:"grid gap-4",children:[e.jsxs("div",{className:"rounded-xl bg-muted/50 p-3 text-sm text-muted-foreground text-center",children:["Code sent to ",n]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:C,onChange:P(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code"})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Verifying...":"Verify"}),e.jsx(g,{type:"button",variant:"ghost",onClick:()=>{L(!1),O(""),k.reset(),E.reset()},disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send code"})]})}),f&&l.enabled&&!$&&e.jsxs("form",{onSubmit:Z,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(g,{type:"submit",disabled:o||!w,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send reset link"})]}),!f&&!v&&l.enabled&&e.jsxs("form",{onSubmit:X,className:"grid gap-4",children:[e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",m?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:T("p-1",!m&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:b,onChange:P(_),required:!0,disabled:o||!m,"aria-hidden":!m})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:P(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!m&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>U("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:P(D),required:!0,disabled:o})]}),e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",w?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:T("p-1",!w&&"pointer-events-none"),children:e.jsx(g,{type:"submit",disabled:o||!w,className:T("w-full font-semibold"),size:"lg","aria-hidden":!w,children:o?m?"Creating account...":"Signing in...":"Continue"})})})]}),!f&&i.enabled&&l.enabled&&!v&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("emailOtp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with email code instead"})}),v&&l.enabled&&e.jsx("div",{className:"text-center",children:e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with password instead"})}),e.jsx("div",{className:"text-center",children:f?e.jsx(g,{type:"button",variant:"link",onClick:()=>U("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):!v&&l.enabled?e.jsx(g,{type:"button",variant:"link",onClick:()=>U(m?"signIn":"signUp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:m?"Already have an account? Sign in":"Don't have an account? Sign up"}):null}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function le({redirectTo:s}){const[r,l]=x.useState(null);return x.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let d=0;d<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));d++)await new Promise(n=>setTimeout(n,Math.min(1e3*2**d,1e4)));if(!i?.ok){const d=await i?.json().catch(()=>({}));throw new Error(d?.error||"Auto-login failed")}if(!u){const d=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=d}}catch(i){u||l(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),r?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",r]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function de(s){if(!s.client_id||s.response_type!=="code")return null;const r=new URLSearchParams;return s.client_id&&r.set("client_id",s.client_id),s.redirect_uri&&r.set("redirect_uri",s.redirect_uri),s.response_type&&r.set("response_type",s.response_type),s.state&&r.set("state",s.state),s.scope&&r.set("scope",s.scope),s.code_challenge&&r.set("code_challenge",s.code_challenge),s.code_challenge_method&&r.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${r.toString()}`}function ce(s){const r=ie.c(5),{callbackURL:l,providerId:u}=s;let i,d;r[0]!==l||r[1]!==u?(i=()=>{(async()=>await p.signIn.sso({providerId:u,callbackURL:l}))()},d=[u,l],r[0]=l,r[1]=u,r[2]=i,r[3]=d):(i=r[2],d=r[3]),x.useEffect(i,d);let n;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(W,{}),r[4]=n):n=r[4],n}function he(){const s=p.useSession(),r=ne({from:"/login"}),{next:l="/",client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}=r,b=l.startsWith("/")&&!l.startsWith("//")?l:"/",{sso:_,emailAndPassword:C,magicLink:O,emailOtp:A,socialProviders:L,localMode:R}=Q(),N=de({client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}),c=N||b;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(ae,{to:b}):R?e.jsx(le,{redirectTo:c}):_.enabled?e.jsx(ce,{callbackURL:c,providerId:_.providerId}):C.enabled||O.enabled||A.enabled||L.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-brand to-brand/75 p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--brand-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx(oe,{redirectUrl:N,callbackUrl:b})]})]}):e.jsx("div",{children:"No login options available"})}export{he as default};
@@ -1 +1 @@
1
- import{c as F,r as B,v as w,j as t,B as k}from"./index-De7oAufQ.js";import{i as E}from"./Upload01-CrylBwgE.js";import{i as S}from"./X-Dr3IGE6q.js";function M(L){const e=F.c(28),{value:s,onChange:l,name:b,disabled:r}=L,a=B.useRef(null);let f;e[0]!==l?(f=y=>{const N=y.target.files?.[0];if(N){if(N.size>2097152){w.error("Image must be smaller than 2MB");return}const o=new FileReader;o.onerror=()=>{const C=o.error;console.error("FileReader error:",C),w.error(C?.message||"Failed to read image file. Please try again."),a.current&&(a.current.value="")},o.onloadend=()=>{o.readyState===FileReader.DONE&&o.result&&l(o.result),a.current&&(a.current.value="")},o.readAsDataURL(N)}},e[0]=l,e[1]=f):f=e[1];const v=f;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{a.current?.click()},e[2]=h):h=e[2];const R=h;let x;e[3]!==l?(x=y=>{y.stopPropagation(),l("")},e[3]=l,e[4]=x):x=e[4];const n=x;let i;e[5]!==r||e[6]!==v?(i=t.jsx("input",{type:"file",ref:a,className:"hidden",accept:"image/*",onChange:v,disabled:r}),e[5]=r,e[6]=v,e[7]=i):i=e[7];let c;e[8]!==r||e[9]!==n||e[10]!==b||e[11]!==s?(c=s?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:t.jsx("img",{src:s,alt:b||"Logo",className:"w-full h-full object-cover"})}),t.jsx("button",{type:"button",onClick:n,disabled:r,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:t.jsx(S,{className:"h-3 w-3"})})]}):t.jsxs("button",{type:"button",onClick:R,disabled:r,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(E,{className:"h-5 w-5"}),t.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=r,e[9]=n,e[10]=b,e[11]=s,e[12]=c):c=e[12];const j=s?"Change Logo":"Upload Logo";let d;e[13]!==r||e[14]!==j?(d=t.jsx(k,{type:"button",variant:"outline",size:"sm",onClick:R,disabled:r,className:"mb-2",children:j}),e[13]=r,e[14]=j,e[15]=d):d=e[15];let m;e[16]!==r||e[17]!==n||e[18]!==s?(m=s&&t.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:r,className:"ml-2",children:"Remove"}),e[16]=r,e[17]=n,e[18]=s,e[19]=m):m=e[19];let p;e[20]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=p):p=e[20];let u;e[21]!==d||e[22]!==m?(u=t.jsxs("div",{className:"flex-1",children:[d,m,p]}),e[21]=d,e[22]=m,e[23]=u):u=e[23];let g;return e[24]!==u||e[25]!==i||e[26]!==c?(g=t.jsxs("div",{className:"flex items-start gap-4",children:[i,c,u]}),e[24]=u,e[25]=i,e[26]=c,e[27]=g):g=e[27],g}export{M as L};
1
+ import{c as F,r as B,v as w,j as t,B as k}from"./index-NjMxPJgF.js";import{i as E}from"./Upload01-CLIOr3Tj.js";import{i as S}from"./X-LzehymHS.js";function M(L){const e=F.c(28),{value:s,onChange:l,name:b,disabled:r}=L,a=B.useRef(null);let f;e[0]!==l?(f=y=>{const N=y.target.files?.[0];if(N){if(N.size>2097152){w.error("Image must be smaller than 2MB");return}const o=new FileReader;o.onerror=()=>{const C=o.error;console.error("FileReader error:",C),w.error(C?.message||"Failed to read image file. Please try again."),a.current&&(a.current.value="")},o.onloadend=()=>{o.readyState===FileReader.DONE&&o.result&&l(o.result),a.current&&(a.current.value="")},o.readAsDataURL(N)}},e[0]=l,e[1]=f):f=e[1];const v=f;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{a.current?.click()},e[2]=h):h=e[2];const R=h;let x;e[3]!==l?(x=y=>{y.stopPropagation(),l("")},e[3]=l,e[4]=x):x=e[4];const n=x;let i;e[5]!==r||e[6]!==v?(i=t.jsx("input",{type:"file",ref:a,className:"hidden",accept:"image/*",onChange:v,disabled:r}),e[5]=r,e[6]=v,e[7]=i):i=e[7];let c;e[8]!==r||e[9]!==n||e[10]!==b||e[11]!==s?(c=s?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:t.jsx("img",{src:s,alt:b||"Logo",className:"w-full h-full object-cover"})}),t.jsx("button",{type:"button",onClick:n,disabled:r,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:t.jsx(S,{className:"h-3 w-3"})})]}):t.jsxs("button",{type:"button",onClick:R,disabled:r,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(E,{className:"h-5 w-5"}),t.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=r,e[9]=n,e[10]=b,e[11]=s,e[12]=c):c=e[12];const j=s?"Change Logo":"Upload Logo";let d;e[13]!==r||e[14]!==j?(d=t.jsx(k,{type:"button",variant:"outline",size:"sm",onClick:R,disabled:r,className:"mb-2",children:j}),e[13]=r,e[14]=j,e[15]=d):d=e[15];let m;e[16]!==r||e[17]!==n||e[18]!==s?(m=s&&t.jsx(k,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:r,className:"ml-2",children:"Remove"}),e[16]=r,e[17]=n,e[18]=s,e[19]=m):m=e[19];let p;e[20]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=p):p=e[20];let u;e[21]!==d||e[22]!==m?(u=t.jsxs("div",{className:"flex-1",children:[d,m,p]}),e[21]=d,e[22]=m,e[23]=u):u=e[23];let g;return e[24]!==u||e[25]!==i||e[26]!==c?(g=t.jsxs("div",{className:"flex items-start gap-4",children:[i,c,u]}),e[24]=u,e[25]=i,e[26]=c,e[27]=g):g=e[27],g}export{M as L};
@@ -1,4 +1,4 @@
1
- import{r as O,c as Z,D as _,j as d}from"./index-De7oAufQ.js";import{u as V}from"./use-mcp-resources-DSKOWSEO.js";import{o as Q,N as q,A as K}from"./types-DQbIwrMI.js";const $=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Y(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${J(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=o.match(s);if(c){const i=(c.index??0)+c[0].length;return o.slice(0,i)+`
1
+ import{r as O,c as Z,D as _,j as d}from"./index-NjMxPJgF.js";import{u as V}from"./use-mcp-resources-qGdymfRz.js";import{o as Q,N as q,A as K}from"./types-BHeMLyAV.js";const $=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Y(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${J(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=o.match(s);if(c){const i=(c.index??0)+c[0].length;return o.slice(0,i)+`
2
2
  `+n+o.slice(i)}const a=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,r=o.match(a);if(r){const i=(r.index??0)+r[0].length;return o.slice(0,i)+`
3
3
  <head>
4
4
  `+n+`
@@ -1 +1 @@
1
- import{r as Z,c as V,D as H,j as n,B as J}from"./index-De7oAufQ.js";import{a as K,b as Q,T as X}from"./tooltip-C4rlkzSj.js";import{i as F}from"./CheckVerified02-CyloHbYs.js";import{s as Y}from"./Globe02-DpkPR1qQ.js";import{i as ee}from"./Lock01-CrtAKCVY.js";import{s as te}from"./Plus-Bah3bfIq.js";import{i as se}from"./Terminal-BkHJq74m.js";import{C as le}from"./card-C0MItTW_.js";import{I as ie}from"./integration-icon-BkY1vh6I.js";import{g as ne}from"./registry-utils-Dqc_kCiP.js";const W=({size:s=24,color:e="currentColor",...i})=>Z.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},Z.createElement("path",{d:"M6 6h.01M6 18h.01m-.81-8h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 8.48 22 7.92 22 6.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 3.52 2 4.08 2 5.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 10 4.08 10 5.2 10Zm0 12h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 20.48 22 19.92 22 18.8v-1.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 14 19.92 14 18.8 14H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 15.52 2 16.08 2 17.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 22 4.08 22 5.2 22Z"}));W.displayName="Server01";function ae(s){if(!s.includes("/"))return s;const e=s.split("/"),i=e[0],l=e[1];if(!i||!l)return s;if(i.includes(".")){const a=i.split("."),r=a[a.length-1]||i,c=l.replace(/^mcp-?/,"").replace(/-?mcp$/,"").replace(/^server-?/,"").replace(/-?server$/,"");return!c||c.length<2?r:c}return l}function re(s){const e=V.c(2),{protocol:i,className:l}=s;let a;return e[0]!==l?(a={http:n.jsx(Y,{className:l}),sse:n.jsx(W,{className:l}),stdio:n.jsx(se,{className:l})},e[0]=l,e[1]=a):a=e[1],a[i]}function ce(s){switch(s){case"http":return"HTTP";case"sse":return"SSE";case"stdio":return"STDIO"}}function oe(s){const e=V.c(9),{protocol:i}=s;let l;e[0]!==i?(l=H("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium shrink-0",{http:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",sse:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",stdio:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}[i]),e[0]=i,e[1]=l):l=e[1];let a,r;e[2]!==i?(a=n.jsx(re,{protocol:i,className:"w-3 h-3"}),r=ce(i),e[2]=i,e[3]=a,e[4]=r):(a=e[3],r=e[4]);let c;return e[5]!==l||e[6]!==a||e[7]!==r?(c=n.jsxs("div",{className:l,children:[a,r]}),e[5]=l,e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function me(s){const e=V.c(73),{icon:i,displayName:l,description:a,onClick:r}=s,t=(s.variant??"store")==="server",m=t?s.hostname:null,f=t?s.protocol:null,p=t?s.isInstalling:!1,x=t?s.actionLabel:void 0,d=t?null:s.scopeName,o=t?!1:s.isVerified,u=t?!1:s.isOfficial,h=t?!0:s.canInstall,R=t?"p-4":"p-6";let g;e[0]!==R?(g=H("cursor-pointer hover:bg-muted/50 transition-colors",R),e[0]=R,e[1]=g):g=e[1];const A=t?"gap-3":"gap-4";let v;e[2]!==A?(v=H("flex flex-col h-full relative",A),e[2]=A,e[3]=v):v=e[3];const G=t?"sm":"md";let j;e[4]!==l||e[5]!==i||e[6]!==G?(j=n.jsx(ie,{icon:i,name:l,size:G,className:"shadow-sm shrink-0"}),e[4]=l,e[5]=i,e[6]=G,e[7]=j):j=e[7];const U=t?"text-sm":"text-base";let N;e[8]!==U?(N=H("flex items-center gap-2 font-medium min-w-0",U),e[8]=U,e[9]=N):N=e[9];let C;e[10]!==l?(C=n.jsx("span",{className:"truncate",children:l}),e[10]=l,e[11]=C):C=e[11];let b;e[12]!==u||e[13]!==t?(b=!t&&u&&n.jsx(F,{size:16,className:"text-primary shrink-0"}),e[12]=u,e[13]=t,e[14]=b):b=e[14];let k;e[15]!==u||e[16]!==t||e[17]!==o?(k=!t&&!u&&o&&n.jsx(F,{size:16,className:"text-success shrink-0"}),e[15]=u,e[16]=t,e[17]=o,e[18]=k):k=e[18];let y;e[19]!==h||e[20]!==t?(y=!t&&!h&&n.jsx(ee,{size:16,className:"text-muted-foreground shrink-0"}),e[19]=h,e[20]=t,e[21]=y):y=e[21];let I;e[22]!==t||e[23]!==f?(I=t&&f&&n.jsx(oe,{protocol:f}),e[22]=t,e[23]=f,e[24]=I):I=e[24];let w;e[25]!==k||e[26]!==y||e[27]!==I||e[28]!==N||e[29]!==C||e[30]!==b?(w=n.jsx(K,{asChild:!0,children:n.jsxs("div",{className:N,children:[C,b,k,y,I]})}),e[25]=k,e[26]=y,e[27]=I,e[28]=N,e[29]=C,e[30]=b,e[31]=w):w=e[31];let S;e[32]!==l?(S=n.jsx("p",{children:l}),e[32]=l,e[33]=S):S=e[33];let $;e[34]!==h||e[35]!==t?($=!t&&!h&&n.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[34]=h,e[35]=t,e[36]=$):$=e[36];let P;e[37]!==S||e[38]!==$?(P=n.jsxs(Q,{children:[S,$]}),e[37]=S,e[38]=$,e[39]=P):P=e[39];let T;e[40]!==w||e[41]!==P?(T=n.jsxs(X,{children:[w,P]}),e[40]=w,e[41]=P,e[42]=T):T=e[42];let _;e[43]!==m||e[44]!==t||e[45]!==d?(_=(d||m)&&n.jsx("div",{className:H("text-muted-foreground truncate",t?"text-xs mt-0.5":"text-sm"),children:d||m}),e[43]=m,e[44]=t,e[45]=d,e[46]=_):_=e[46];let D;e[47]!==T||e[48]!==_?(D=n.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:n.jsxs("div",{className:"min-w-0 flex-1",children:[T,_]})}),e[47]=T,e[48]=_,e[49]=D):D=e[49];let z;e[50]!==D||e[51]!==j?(z=n.jsxs("div",{className:"flex gap-3",children:[j,D]}),e[50]=D,e[51]=j,e[52]=z):z=e[52];let E;e[53]!==a?(E=a&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:a}),e[53]=a,e[54]=E):E=e[54];let M;e[55]!==a||e[56]!==t?(M=!a&&!t&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:"No description available"}),e[55]=a,e[56]=t,e[57]=M):M=e[57];let L;e[58]!==x||e[59]!==p||e[60]!==t||e[61]!==r?(L=t&&n.jsxs(J,{variant:"outline",size:"sm",onClick:q=>{q.stopPropagation(),r()},disabled:p,className:"w-full mt-auto cursor-pointer",children:[n.jsx(te,{size:16}),p?"Connecting...":x||"Connect"]}),e[58]=x,e[59]=p,e[60]=t,e[61]=r,e[62]=L):L=e[62];let B;e[63]!==z||e[64]!==E||e[65]!==M||e[66]!==L||e[67]!==v?(B=n.jsxs("div",{className:v,children:[z,E,M,L]}),e[63]=z,e[64]=E,e[65]=M,e[66]=L,e[67]=v,e[68]=B):B=e[68];let O;return e[69]!==r||e[70]!==g||e[71]!==B?(O=n.jsx(le,{className:g,onClick:r,children:B}),e[69]=r,e[70]=g,e[71]=B,e[72]=O):O=e[72],O}function de(s){const e=s.server,i=s._meta?.["mcp.mesh"],l=i?.friendly_name||s.name||e?.title||s.title||s.id||"Unnamed Item",a=i?.short_description||i?.mesh_description||e?.description||s.description||null,r=e?.icons?.[0]?.src||ne(e?.repository)||null,c=i?.verified??!1,t=i?.official??!1,m=(e?.remotes?.length??0)>0,f=(e?.packages?.length??0)>0,p=m||f;let x=l,d=null;if(l.includes("/")){const o=l.split("/");o.length>=2&&(d=o[0]||null,x=ae(l))}if(!d){const o=i?.scopeName,u=i?.appName;o&&u?d=`${o}/${u}`:o&&(d=o)}return!d&&s.id?.includes("/")&&(d=s.id),i?.friendly_name&&(x=i.friendly_name),{icon:r,scopeName:d,displayName:x,description:a,isVerified:c,isOfficial:t,canInstall:p}}function ke(s){const e=V.c(19),{items:i,title:l,onItemClick:a}=s;let r,c,t,m,f;if(e[0]!==i||e[1]!==a||e[2]!==l){f=Symbol.for("react.early_return_sentinel");e:{const d=i.filter(fe);if(d.length===0){f=null;break e}t="flex flex-col gap-4",e[8]!==l?(m=l&&n.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:n.jsx("h2",{className:"text-lg font-medium",children:l})}),e[8]=l,e[9]=m):m=e[9],r="grid grid-cols-4 gap-4";let o;e[10]!==a?(o=u=>{const h=de(u);return n.jsx(me,{...h,onClick:()=>a(u)},u.id)},e[10]=a,e[11]=o):o=e[11],c=d.map(o)}e[0]=i,e[1]=a,e[2]=l,e[3]=r,e[4]=c,e[5]=t,e[6]=m,e[7]=f}else r=e[3],c=e[4],t=e[5],m=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;e[12]!==r||e[13]!==c?(p=n.jsx("div",{className:r,children:c}),e[12]=r,e[13]=c,e[14]=p):p=e[14];let x;return e[15]!==t||e[16]!==m||e[17]!==p?(x=n.jsxs("div",{className:t,children:[m,p]}),e[15]=t,e[16]=m,e[17]=p,e[18]=x):x=e[18],x}function fe(s){return s!=null}export{ke as M,me as a,W as b,ae as e};
1
+ import{r as Z,c as V,D as H,j as n,B as J}from"./index-NjMxPJgF.js";import{a as K,b as Q,T as X}from"./tooltip-BJMSu0c2.js";import{i as F}from"./CheckVerified02-r17ymUCs.js";import{s as Y}from"./Globe02-wRhoc1N5.js";import{i as ee}from"./Lock01-CnZITIks.js";import{s as te}from"./Plus-CajZ9VfC.js";import{i as se}from"./Terminal-CGwuP-_5.js";import{C as le}from"./card-B8qDZGCZ.js";import{I as ie}from"./integration-icon-BPVDVJvP.js";import{g as ne}from"./registry-utils-cjX9P5J9.js";const W=({size:s=24,color:e="currentColor",...i})=>Z.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},Z.createElement("path",{d:"M6 6h.01M6 18h.01m-.81-8h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 8.48 22 7.92 22 6.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 3.52 2 4.08 2 5.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 10 4.08 10 5.2 10Zm0 12h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 20.48 22 19.92 22 18.8v-1.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 14 19.92 14 18.8 14H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 15.52 2 16.08 2 17.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 22 4.08 22 5.2 22Z"}));W.displayName="Server01";function ae(s){if(!s.includes("/"))return s;const e=s.split("/"),i=e[0],l=e[1];if(!i||!l)return s;if(i.includes(".")){const a=i.split("."),r=a[a.length-1]||i,c=l.replace(/^mcp-?/,"").replace(/-?mcp$/,"").replace(/^server-?/,"").replace(/-?server$/,"");return!c||c.length<2?r:c}return l}function re(s){const e=V.c(2),{protocol:i,className:l}=s;let a;return e[0]!==l?(a={http:n.jsx(Y,{className:l}),sse:n.jsx(W,{className:l}),stdio:n.jsx(se,{className:l})},e[0]=l,e[1]=a):a=e[1],a[i]}function ce(s){switch(s){case"http":return"HTTP";case"sse":return"SSE";case"stdio":return"STDIO"}}function oe(s){const e=V.c(9),{protocol:i}=s;let l;e[0]!==i?(l=H("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium shrink-0",{http:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",sse:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",stdio:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}[i]),e[0]=i,e[1]=l):l=e[1];let a,r;e[2]!==i?(a=n.jsx(re,{protocol:i,className:"w-3 h-3"}),r=ce(i),e[2]=i,e[3]=a,e[4]=r):(a=e[3],r=e[4]);let c;return e[5]!==l||e[6]!==a||e[7]!==r?(c=n.jsxs("div",{className:l,children:[a,r]}),e[5]=l,e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function me(s){const e=V.c(73),{icon:i,displayName:l,description:a,onClick:r}=s,t=(s.variant??"store")==="server",m=t?s.hostname:null,f=t?s.protocol:null,p=t?s.isInstalling:!1,x=t?s.actionLabel:void 0,d=t?null:s.scopeName,o=t?!1:s.isVerified,u=t?!1:s.isOfficial,h=t?!0:s.canInstall,R=t?"p-4":"p-6";let g;e[0]!==R?(g=H("cursor-pointer hover:bg-muted/50 transition-colors",R),e[0]=R,e[1]=g):g=e[1];const A=t?"gap-3":"gap-4";let v;e[2]!==A?(v=H("flex flex-col h-full relative",A),e[2]=A,e[3]=v):v=e[3];const G=t?"sm":"md";let j;e[4]!==l||e[5]!==i||e[6]!==G?(j=n.jsx(ie,{icon:i,name:l,size:G,className:"shadow-sm shrink-0"}),e[4]=l,e[5]=i,e[6]=G,e[7]=j):j=e[7];const U=t?"text-sm":"text-base";let N;e[8]!==U?(N=H("flex items-center gap-2 font-medium min-w-0",U),e[8]=U,e[9]=N):N=e[9];let C;e[10]!==l?(C=n.jsx("span",{className:"truncate",children:l}),e[10]=l,e[11]=C):C=e[11];let b;e[12]!==u||e[13]!==t?(b=!t&&u&&n.jsx(F,{size:16,className:"text-primary shrink-0"}),e[12]=u,e[13]=t,e[14]=b):b=e[14];let k;e[15]!==u||e[16]!==t||e[17]!==o?(k=!t&&!u&&o&&n.jsx(F,{size:16,className:"text-success shrink-0"}),e[15]=u,e[16]=t,e[17]=o,e[18]=k):k=e[18];let y;e[19]!==h||e[20]!==t?(y=!t&&!h&&n.jsx(ee,{size:16,className:"text-muted-foreground shrink-0"}),e[19]=h,e[20]=t,e[21]=y):y=e[21];let I;e[22]!==t||e[23]!==f?(I=t&&f&&n.jsx(oe,{protocol:f}),e[22]=t,e[23]=f,e[24]=I):I=e[24];let w;e[25]!==k||e[26]!==y||e[27]!==I||e[28]!==N||e[29]!==C||e[30]!==b?(w=n.jsx(K,{asChild:!0,children:n.jsxs("div",{className:N,children:[C,b,k,y,I]})}),e[25]=k,e[26]=y,e[27]=I,e[28]=N,e[29]=C,e[30]=b,e[31]=w):w=e[31];let S;e[32]!==l?(S=n.jsx("p",{children:l}),e[32]=l,e[33]=S):S=e[33];let $;e[34]!==h||e[35]!==t?($=!t&&!h&&n.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[34]=h,e[35]=t,e[36]=$):$=e[36];let P;e[37]!==S||e[38]!==$?(P=n.jsxs(Q,{children:[S,$]}),e[37]=S,e[38]=$,e[39]=P):P=e[39];let T;e[40]!==w||e[41]!==P?(T=n.jsxs(X,{children:[w,P]}),e[40]=w,e[41]=P,e[42]=T):T=e[42];let _;e[43]!==m||e[44]!==t||e[45]!==d?(_=(d||m)&&n.jsx("div",{className:H("text-muted-foreground truncate",t?"text-xs mt-0.5":"text-sm"),children:d||m}),e[43]=m,e[44]=t,e[45]=d,e[46]=_):_=e[46];let D;e[47]!==T||e[48]!==_?(D=n.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:n.jsxs("div",{className:"min-w-0 flex-1",children:[T,_]})}),e[47]=T,e[48]=_,e[49]=D):D=e[49];let z;e[50]!==D||e[51]!==j?(z=n.jsxs("div",{className:"flex gap-3",children:[j,D]}),e[50]=D,e[51]=j,e[52]=z):z=e[52];let E;e[53]!==a?(E=a&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:a}),e[53]=a,e[54]=E):E=e[54];let M;e[55]!==a||e[56]!==t?(M=!a&&!t&&n.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:"No description available"}),e[55]=a,e[56]=t,e[57]=M):M=e[57];let L;e[58]!==x||e[59]!==p||e[60]!==t||e[61]!==r?(L=t&&n.jsxs(J,{variant:"outline",size:"sm",onClick:q=>{q.stopPropagation(),r()},disabled:p,className:"w-full mt-auto cursor-pointer",children:[n.jsx(te,{size:16}),p?"Connecting...":x||"Connect"]}),e[58]=x,e[59]=p,e[60]=t,e[61]=r,e[62]=L):L=e[62];let B;e[63]!==z||e[64]!==E||e[65]!==M||e[66]!==L||e[67]!==v?(B=n.jsxs("div",{className:v,children:[z,E,M,L]}),e[63]=z,e[64]=E,e[65]=M,e[66]=L,e[67]=v,e[68]=B):B=e[68];let O;return e[69]!==r||e[70]!==g||e[71]!==B?(O=n.jsx(le,{className:g,onClick:r,children:B}),e[69]=r,e[70]=g,e[71]=B,e[72]=O):O=e[72],O}function de(s){const e=s.server,i=s._meta?.["mcp.mesh"],l=i?.friendly_name||s.name||e?.title||s.title||s.id||"Unnamed Item",a=i?.short_description||i?.mesh_description||e?.description||s.description||null,r=e?.icons?.[0]?.src||ne(e?.repository)||null,c=i?.verified??!1,t=i?.official??!1,m=(e?.remotes?.length??0)>0,f=(e?.packages?.length??0)>0,p=m||f;let x=l,d=null;if(l.includes("/")){const o=l.split("/");o.length>=2&&(d=o[0]||null,x=ae(l))}if(!d){const o=i?.scopeName,u=i?.appName;o&&u?d=`${o}/${u}`:o&&(d=o)}return!d&&s.id?.includes("/")&&(d=s.id),i?.friendly_name&&(x=i.friendly_name),{icon:r,scopeName:d,displayName:x,description:a,isVerified:c,isOfficial:t,canInstall:p}}function ke(s){const e=V.c(19),{items:i,title:l,onItemClick:a}=s;let r,c,t,m,f;if(e[0]!==i||e[1]!==a||e[2]!==l){f=Symbol.for("react.early_return_sentinel");e:{const d=i.filter(fe);if(d.length===0){f=null;break e}t="flex flex-col gap-4",e[8]!==l?(m=l&&n.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:n.jsx("h2",{className:"text-lg font-medium",children:l})}),e[8]=l,e[9]=m):m=e[9],r="grid grid-cols-4 gap-4";let o;e[10]!==a?(o=u=>{const h=de(u);return n.jsx(me,{...h,onClick:()=>a(u)},u.id)},e[10]=a,e[11]=o):o=e[11],c=d.map(o)}e[0]=i,e[1]=a,e[2]=l,e[3]=r,e[4]=c,e[5]=t,e[6]=m,e[7]=f}else r=e[3],c=e[4],t=e[5],m=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;e[12]!==r||e[13]!==c?(p=n.jsx("div",{className:r,children:c}),e[12]=r,e[13]=c,e[14]=p):p=e[14];let x;return e[15]!==t||e[16]!==m||e[17]!==p?(x=n.jsxs("div",{className:t,children:[m,p]}),e[15]=t,e[16]=m,e[17]=p,e[18]=x):x=e[18],x}function fe(s){return s!=null}export{ke as M,me as a,W as b,ae as e};