@decocms/mesh 2.135.1 → 2.136.1
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.
- package/dist/client/assets/{AlertCircle-C0eftc-S.js → AlertCircle-CXJCnY_R.js} +1 -1
- package/dist/client/assets/{AlignLeft-y_Ps49tB.js → AlignLeft-Ckpqqq7X.js} +1 -1
- package/dist/client/assets/{ArrowDown-BVK-2NZv.js → ArrowDown-BXCgJapO.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BNX_fMaj.js → ArrowLeft-ihbjidrQ.js} +1 -1
- package/dist/client/assets/{ArrowUp-N8lcMBug.js → ArrowUp-B3tPpNuu.js} +1 -1
- package/dist/client/assets/{Check-Cjs4C9GE.js → Check-G22LpKFd.js} +1 -1
- package/dist/client/assets/{CheckCircle-KfoOm4QY.js → CheckCircle-Dl3Eh5mw.js} +1 -1
- package/dist/client/assets/{CheckDone01-BesDn4jt.js → CheckDone01-DQOA8kaK.js} +1 -1
- package/dist/client/assets/{CheckVerified02-dNCcvCnV.js → CheckVerified02-C58oaMz8.js} +1 -1
- package/dist/client/assets/{ChevronDown-jKZz68gN.js → ChevronDown-DAk1F2Sn.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DrJ63fdN.js → ChevronLeft-CGPjZdmg.js} +1 -1
- package/dist/client/assets/{ChevronRight-O5hZNhHU.js → ChevronRight-BT7U8Kip.js} +1 -1
- package/dist/client/assets/{Clock-CZrEpwOM.js → Clock-CPO-Cqx6.js} +1 -1
- package/dist/client/assets/{Code01-DVgdcTZ1.js → Code01-UXkm6aqY.js} +1 -1
- package/dist/client/assets/{Container-BADgIox6.js → Container-CyEPuAYL.js} +1 -1
- package/dist/client/assets/{Copy01-CwZDv92A.js → Copy01-tzx60ICS.js} +1 -1
- package/dist/client/assets/{Dataflow03-BD9MOeSH.js → Dataflow03-mD5gBD1P.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-M2BFmBhE.js → DotsHorizontal-9qiIYu_T.js} +1 -1
- package/dist/client/assets/{DotsVertical-B7FmF1Xu.js → DotsVertical-DHxrk-2J.js} +1 -1
- package/dist/client/assets/{Download01-9ocXQLzr.js → Download01-DM18IWVp.js} +1 -1
- package/dist/client/assets/{Edit01-kvm_TgXf.js → Edit01-D3PaS600.js} +1 -1
- package/dist/client/assets/{Edit05-D4Vt7tOt.js → Edit05-B64h7zay.js} +1 -1
- package/dist/client/assets/{Eye-BCmEvczH.js → Eye-C_LYW9jG.js} +1 -1
- package/dist/client/assets/{File02-CK_RNTh6.js → File02-CY9LI3Y-.js} +1 -1
- package/dist/client/assets/{File06-B3E-bjor.js → File06-Dy7xo8XS.js} +1 -1
- package/dist/client/assets/{FilterLines-DAyCv-Xk.js → FilterLines-BvkJQ7ij.js} +1 -1
- package/dist/client/assets/{Globe01-jKd57I4x.js → Globe01-39jWI59e.js} +1 -1
- package/dist/client/assets/{Globe02-D-yCMf5N.js → Globe02-X-Xm1ngz.js} +1 -1
- package/dist/client/assets/{Grid01-DRBx9FRw.js → Grid01-DTf5JuyC.js} +1 -1
- package/dist/client/assets/{Hash02-CyfLltcT.js → Hash02-AH6eTaow.js} +1 -1
- package/dist/client/assets/{Home02-BcZSV_S0.js → Home02-DzIcdgJH.js} +1 -1
- package/dist/client/assets/{Image01-Dg_KnZBd.js → Image01-Dvb2vnmH.js} +1 -1
- package/dist/client/assets/{Inbox01-nkL2-2Zq.js → Inbox01-CsvPcK33.js} +1 -1
- package/dist/client/assets/{InfoCircle-Ipgqrfv0.js → InfoCircle-D2mDfen0.js} +1 -1
- package/dist/client/assets/{Key01-CyP1-GBg.js → Key01-C3Fh3hes.js} +1 -1
- package/dist/client/assets/{LayersTwo01-rKs-Uww3.js → LayersTwo01-CRgWs3EX.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BH3urRkN.js → LayoutLeft-C-0_xlw0.js} +1 -1
- package/dist/client/assets/{Link01-D-1AbdDy.js → Link01-C74Jreax.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DIMSPk19.js → LinkExternal01-D6xwQf32.js} +1 -1
- package/dist/client/assets/{List-BzhQuBp2.js → List-DJEz6yKj.js} +1 -1
- package/dist/client/assets/{Loading01-BSgMOGt8.js → Loading01-B3gOoSbd.js} +1 -1
- package/dist/client/assets/{Lock01-T7BR0zuk.js → Lock01-CodP_ius.js} +1 -1
- package/dist/client/assets/{Play-CBKoaI1n.js → Play-CxAaQi_l.js} +1 -1
- package/dist/client/assets/{Plus-kcfCg7FH.js → Plus-Bo0L9uYY.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DiAOUquJ.js → RefreshCcw01-v6pXwg6P.js} +1 -1
- package/dist/client/assets/{Save01-CgyWcG00.js → Save01-CU3VjXKO.js} +1 -1
- package/dist/client/assets/{SearchMd-DyDznS8C.js → SearchMd-Cpf31N-H.js} +1 -1
- package/dist/client/assets/{Settings01-B90Jx8ZC.js → Settings01-BmEB9pVn.js} +1 -1
- package/dist/client/assets/{Shield01-B2Y9HIu6.js → Shield01-CqrrEAw-.js} +1 -1
- package/dist/client/assets/{Terminal-BxQK5nsd.js → Terminal-BS-6VR5p.js} +1 -1
- package/dist/client/assets/{Trash01-Dhrt1Goe.js → Trash01-HuK-pEft.js} +1 -1
- package/dist/client/assets/{Upload01-Dja0ZgIT.js → Upload01-DcyyJb_e.js} +1 -1
- package/dist/client/assets/{Users03-DHATZiFL.js → Users03-CPWgVi4r.js} +1 -1
- package/dist/client/assets/{X-BpJJDPzv.js → X-uHaUni9w.js} +1 -1
- package/dist/client/assets/{XCircle-D52fnGO6.js → XCircle-C4iqiznn.js} +1 -1
- package/dist/client/assets/{XClose-DcdK3w1e.js → XClose-DGYV-4S5.js} +1 -1
- package/dist/client/assets/{Zap-CP5UH1Dw.js → Zap-5c_DBEtK.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-v4ndb6aJ.js → agent-connections-preview-BsjSZYGn.js} +1 -1
- package/dist/client/assets/agent-detail-BxRuQLTH.js +2 -0
- package/dist/client/assets/agents-KBFzt520.js +1 -0
- package/dist/client/assets/{alert-dialog-PSmHhGOE.js → alert-dialog-D3oCqQtu.js} +2 -2
- package/dist/client/assets/{auth-catchall-CplMsxXE.js → auth-catchall-bz6gJ41s.js} +1 -1
- package/dist/client/assets/{avatar-VPsqzp0K.js → avatar-rYlL0ZoJ.js} +1 -1
- package/dist/client/assets/{badge-DSAomO1_.js → badge-CxJArm69.js} +1 -1
- package/dist/client/assets/{binder-8_Oel13A.js → binder-BXDCztlr.js} +1 -1
- package/dist/client/assets/{breadcrumb-Dxn3nF83.js → breadcrumb-CGrLS5HH.js} +1 -1
- package/dist/client/assets/{card-CRGkE-QK.js → card-CAORA3L1.js} +1 -1
- package/dist/client/assets/{chart-B-ayLZ8-.js → chart-DX1_yJHY.js} +1 -1
- package/dist/client/assets/{checkbox-Dj6Qb3KC.js → checkbox-BCSzUsPR.js} +1 -1
- package/dist/client/assets/{circle-alert-DcuI5GGM.js → circle-alert-B4C3d1aQ.js} +1 -1
- package/dist/client/assets/{collapsible-D2Mpu85K.js → collapsible-sQONDG4w.js} +1 -1
- package/dist/client/assets/{collection-detail-FNWcZVfu.js → collection-detail-B42SRwNb.js} +3 -3
- package/dist/client/assets/collection-display-button-M7dfC2Rf.js +1 -0
- package/dist/client/assets/{collection-search-FSS_Lkwz.js → collection-search-q4T1hb73.js} +1 -1
- package/dist/client/assets/collection-tab-e-VwhAzh.js +1 -0
- package/dist/client/assets/collection-table-wrapper-DXH0yXJC.js +1 -0
- package/dist/client/assets/{collection-tabs-CK4hfCPZ.js → collection-tabs-BbVq4J-5.js} +1 -1
- package/dist/client/assets/{command-BK3ZFocj.js → command-CPQN970u.js} +1 -1
- package/dist/client/assets/{connect-D2cFEIR8.js → connect-BGH3KdkD.js} +1 -1
- package/dist/client/assets/{connection-card-GLkE1rwd.js → connection-card-DTiOZbAC.js} +1 -1
- package/dist/client/assets/connection-detail-DznxU3SC.js +1 -0
- package/dist/client/assets/connections-AQfSUAp3.js +1 -0
- package/dist/client/assets/{constants-3MhIA0pZ.js → constants-D9bRXDQp.js} +1 -1
- package/dist/client/assets/constants-DvJZMaim.js +1 -0
- package/dist/client/assets/{create-organization-dialog-CR8t2T4R.js → create-organization-dialog-Bs4zbKG7.js} +1 -1
- package/dist/client/assets/{create-project-dialog-DFaC5_HT.js → create-project-dialog-BkL7vqeo.js} +1 -1
- package/dist/client/assets/{danger-BEh_Y1ce.js → danger-C_vn0auF.js} +1 -1
- package/dist/client/assets/{danger-zone-CpwKIZ0p.js → danger-zone-CdUOoCFt.js} +1 -1
- package/dist/client/assets/{decopilot-events-CA9aFPSQ.js → decopilot-events-DHSwekTa.js} +1 -1
- package/dist/client/assets/dependencies-DTmw6OGT.js +1 -0
- package/dist/client/assets/{dialog-CPWJMuHX.js → dialog-Baq_fjtR.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DW1GDWfN.js → dropdown-menu-CSqO4Mxn.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-d0KDA7MF.js +1 -0
- package/dist/client/assets/{editable-task-title-D4gyoQ4x.js → editable-task-title-HUenZvZX.js} +1 -1
- package/dist/client/assets/{empty-state-boxcABsi.js → empty-state-BPClkF2j.js} +1 -1
- package/dist/client/assets/{env-vars-editor-x5YLFI-P.js → env-vars-editor-DDp7f4JN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D40JrSD8.js → extract-connection-data-BkJeK0tX.js} +1 -1
- package/dist/client/assets/{file-browser-CrcClgQC.js → file-browser-DVzV35Ko.js} +2 -2
- package/dist/client/assets/{form-7Q-FsNtX.js → form-C5R0_qWR.js} +1 -1
- package/dist/client/assets/{general-C0buekt8.js → general-mBNwCpsS.js} +1 -1
- package/dist/client/assets/{grid-view-J96VhXfb.js → grid-view-7eQhfO8f.js} +1 -1
- package/dist/client/assets/{home-H46nCwT5.js → home-okrTp5Gh.js} +1 -1
- package/dist/client/assets/{icon-picker-DPVWLIZ3.js → icon-picker-DevrZ9IQ.js} +1 -1
- package/dist/client/assets/{index-CsXxowFD.js → index-B-STjJpH.js} +1 -1
- package/dist/client/assets/{index-ZgdunwGI.js → index-BK6i23a9.js} +1 -1
- package/dist/client/assets/{index-D7M37zt-.js → index-BWSvBz7o.js} +1 -1
- package/dist/client/assets/{index-3zbyfLqi.js → index-B_0vsVr1.js} +3 -3
- package/dist/client/assets/{index-DqzqEzLf.js → index-ByA6j7_H.js} +1 -1
- package/dist/client/assets/{index-DziKeC8s.js → index-CvEIDmnk.js} +1 -1
- package/dist/client/assets/index-D6E08wfB.css +1 -0
- package/dist/client/assets/index-DYY56DJY.js +1 -0
- package/dist/client/assets/{index-DZgOYNf-.js → index-QCmdl8uj.js} +1 -1
- package/dist/client/assets/{index-CW624IAb.js → index-UbeVlDrq.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DkOiuhUg.js → infiniteQueryObserver-DKiK82rX.js} +1 -1
- package/dist/client/assets/{input-DVv1wKLp.js → input-CW7SVowR.js} +1 -1
- package/dist/client/assets/{integration-icon-_0Y5dukY.js → integration-icon-DAFtApWT.js} +1 -1
- package/dist/client/assets/{label-CfzCa7Vm.js → label-DWU1nKSS.js} +1 -1
- package/dist/client/assets/{layout-DemCWqB_.js → layout-CzVwolFw.js} +1 -1
- package/dist/client/assets/{layout-CFi42XXk.js → layout-DEcRD72T.js} +1 -1
- package/dist/client/assets/{localstorage-keys-D2dx16dH.js → localstorage-keys-BAzeyS9J.js} +1 -1
- package/dist/client/assets/{login-BXUbt1kV.js → login-OPfY3bsF.js} +1 -1
- package/dist/client/assets/{markdown-89WWPNXO.js → markdown-DCSB9ejV.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-MJ3LmhBP.js → mcp-app-renderer-BtuEhdWL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CPAKRpWT.js → mcp-oauth-D8pA0WRM.js} +1 -1
- package/dist/client/assets/{mcp-server-card-gl2xF4cu.js → mcp-server-card-D7xlSyX7.js} +1 -1
- package/dist/client/assets/mcp-server-detail-DdKXdUu2.js +2 -0
- package/dist/client/assets/members-YKyOsCaT.js +3 -0
- package/dist/client/assets/{monaco-editor-Qwuf1rYM.js → monaco-editor-zyWgiZEt.js} +1 -1
- package/dist/client/assets/{monitoring-C-vcUHdF.js → monitoring-SM_c8qxT.js} +2 -2
- package/dist/client/assets/monitoring-dashboard-edit-cexdjvMw.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-D7MwbzDH.js → monitoring-dashboard-view-C3qQNwfm.js} +1 -1
- package/dist/client/assets/{oauth-callback-BnBZDVD6.js → oauth-callback-1SC3hH5y.js} +1 -1
- package/dist/client/assets/page-DfTTOYQt.js +1 -0
- package/dist/client/assets/page-hoODnFtN.js +1 -0
- package/dist/client/assets/{plugin-empty-state-DfdPh9Ts.js → plugin-empty-state-Cl_h_OgT.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BuLjcm9B.js → plugin-empty-state-Doboc7Tq.js} +1 -1
- package/dist/client/assets/{plugin-header-CKLaOHoT.js → plugin-header-C4Dfehzm.js} +1 -1
- package/dist/client/assets/{plugin-header-Bi-8qclQ.js → plugin-header-DNeaPoeS.js} +1 -1
- package/dist/client/assets/plugins-H9eiCXso.js +1 -0
- package/dist/client/assets/popover-BNZ96bFv.js +1 -0
- package/dist/client/assets/project-app-view-Bsbq4Qf_.js +1 -0
- package/dist/client/assets/project-layout-B4cnkESa.js +1 -0
- package/dist/client/assets/{project-plugins-B1sb2cJf.js → project-plugins-CqDaIw1P.js} +1 -1
- package/dist/client/assets/{projects-list-D0DH8k1c.js → projects-list-CgsVuZof.js} +1 -1
- package/dist/client/assets/{readme-viewer-BvJA0DXw.js → readme-viewer-CKidIXa3.js} +1 -1
- package/dist/client/assets/{registry-layout-BJCo3ZwE.js → registry-layout-oUh5Zl7W.js} +2 -2
- package/dist/client/assets/{registry-utils-Cx5oa6Ne.js → registry-utils-DXJps8H7.js} +1 -1
- package/dist/client/assets/{reports-layout-DYTNa8h-.js → reports-layout-CFJRqv-Q.js} +2 -2
- package/dist/client/assets/{reset-password-DFzqJN6I.js → reset-password-ZQI9gTW6.js} +1 -1
- package/dist/client/assets/{resizable-PA9Y3YAt.js → resizable-CWRglWOX.js} +1 -1
- package/dist/client/assets/{save-actions-CXaB5WYr.js → save-actions-eGQZXGI3.js} +1 -1
- package/dist/client/assets/{scroll-area-DoXCMB9j.js → scroll-area-By1z4ZyY.js} +1 -1
- package/dist/client/assets/{select-DaTaxi5W.js → select-CYY4CENz.js} +1 -1
- package/dist/client/assets/shell-layout-DMKfJTmj.js +3 -0
- package/dist/client/assets/{sidebar-settings-BZwWXZuX.js → sidebar-settings-ILgspCqY.js} +1 -1
- package/dist/client/assets/{skeleton-C9OYLAME.js → skeleton-C4ZMp7sl.js} +1 -1
- package/dist/client/assets/{spinner-RGw-eBKN.js → spinner-oA3jiJW_.js} +1 -1
- package/dist/client/assets/{store-invite-Fvga4enp.js → store-invite-Bfy0Alsf.js} +1 -1
- package/dist/client/assets/{switch-CKTW0M5S.js → switch-BSc4dVNg.js} +1 -1
- package/dist/client/assets/{table-Dr33PlEJ.js → table-RFgqEt_E.js} +1 -1
- package/dist/client/assets/{tabs-t9dEapgX.js → tabs-BZ-xfLNG.js} +1 -1
- package/dist/client/assets/tasks-Cy-gkHRX.js +1 -0
- package/dist/client/assets/{tasks-panel-DLy55FSi.js → tasks-panel-C7RwVTDD.js} +1 -1
- package/dist/client/assets/{textarea-CNTbi5Nk.js → textarea-4HpXofT0.js} +1 -1
- package/dist/client/assets/{time-range-picker-Do8ix4-A.js → time-range-picker-Cx2A-Fs_.js} +1 -1
- package/dist/client/assets/{toggle-group-Ck1YCESf.js → toggle-group-CVFHcp8K.js} +1 -1
- package/dist/client/assets/tools-list-BYphEqhu.js +1 -0
- package/dist/client/assets/{tooltip-CzsT_Xmu.js → tooltip-Cz-bAWiO.js} +1 -1
- package/dist/client/assets/{topbar-portal-pZDSuDEC.js → topbar-portal-DOwsTUY4.js} +1 -1
- package/dist/client/assets/{types-BFBQ7LBo.js → types-B46wd5bS.js} +1 -1
- package/dist/client/assets/{use-binding-Cz4OU82g.js → use-binding-Dz1SRdBY.js} +1 -1
- package/dist/client/assets/use-collections-vccihohV.js +1 -0
- package/dist/client/assets/use-connection-DeEn4qfI.js +1 -0
- package/dist/client/assets/{use-copy-C0vtJ5Ye.js → use-copy-CykDvxn6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CsNENE7l.js → use-create-virtual-mcp-DB14T-Ft.js} +1 -1
- package/dist/client/assets/use-install-from-registry-BeHRHLDl.js +1 -0
- package/dist/client/assets/{use-list-state-DUq5hUJc.js → use-list-state-ykkfYLR3.js} +1 -1
- package/dist/client/assets/use-llm-B_iPCa-K.js +1 -0
- package/dist/client/assets/{use-mcp-resources-DjDOJ-nS.js → use-mcp-resources-Rqzq7A0J.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-WZlm0cnW.js → use-mcp-tools-BXihKxpu.js} +1 -1
- package/dist/client/assets/{use-members-BLjJfltI.js → use-members-DAcqcxDX.js} +1 -1
- package/dist/client/assets/{use-mobile-CzcHKmhL.js → use-mobile-B2VAoWT2.js} +1 -1
- package/dist/client/assets/{use-project-CIyZUlkd.js → use-project-D96OXk4y.js} +1 -1
- package/dist/client/assets/{use-settings-modal-BU5fs4m_.js → use-settings-modal-CouKpdi3.js} +1 -1
- package/dist/client/assets/{use-view-mode-BadETRuZ.js → use-view-mode-DyK0fMBe.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-OwU65kyR.js +1 -0
- package/dist/client/assets/useInfiniteQuery-Cl9EtkM0.js +1 -0
- package/dist/client/assets/{useMutation-CqJLXgOK.js → useMutation-lBFQDcxE.js} +1 -1
- package/dist/client/assets/useQuery-DcRkCB2j.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DdSDu-rZ.js +1 -0
- package/dist/client/assets/{user-vKqDbtP6.js → user-C73vNaiS.js} +1 -1
- package/dist/client/assets/workflow-S9BhswBs.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-DyOlL9jH.js +0 -2
- package/dist/client/assets/agents-CB6IRof4.js +0 -1
- package/dist/client/assets/collection-tab-FKeWJS1r.js +0 -1
- package/dist/client/assets/collection-table-wrapper-C3jcR2VW.js +0 -1
- package/dist/client/assets/connection-detail-PegJ7rZR.js +0 -1
- package/dist/client/assets/connections-C18lG_Ow.js +0 -1
- package/dist/client/assets/constants-Csevqii0.js +0 -1
- package/dist/client/assets/dependencies-mwSdsJgD.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-CY4G5d8i.js +0 -1
- package/dist/client/assets/index-Cr3FYIgR.css +0 -1
- package/dist/client/assets/index-DFlYm7QG.js +0 -1
- package/dist/client/assets/mcp-server-detail-CzmUyYsJ.js +0 -2
- package/dist/client/assets/members-BjMeazP1.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-DdMgOlQK.js +0 -1
- package/dist/client/assets/page-BNQcXJwH.js +0 -1
- package/dist/client/assets/page-DvC0ZQe5.js +0 -1
- package/dist/client/assets/plugins-cGh_gky2.js +0 -1
- package/dist/client/assets/popover-7xIJyxqf.js +0 -1
- package/dist/client/assets/project-app-view-C_PL72tZ.js +0 -1
- package/dist/client/assets/project-layout-DIwsntjO.js +0 -1
- package/dist/client/assets/shell-layout-BqF7J7La.js +0 -3
- package/dist/client/assets/tasks-OJAbxkK1.js +0 -1
- package/dist/client/assets/tools-list-DLfR0anP.js +0 -1
- package/dist/client/assets/use-connection-Dlr-wAwU.js +0 -1
- package/dist/client/assets/use-install-from-registry-C_roXw8y.js +0 -1
- package/dist/client/assets/use-llm-B6AzV9Iw.js +0 -1
- package/dist/client/assets/use-virtual-mcp-BjGr5L6n.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CGGEgi5q.js +0 -1
- package/dist/client/assets/useQuery-DWLTdDjg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-YGfVGowO.js +0 -1
- package/dist/client/assets/workflow--wyybZpA.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,c as u,v as g,j as n,e as $,aC as T,B as _}from"./index-
|
|
1
|
+
import{r as b,c as u,v as g,j as n,e as $,aC as T,B as _}from"./index-B_0vsVr1.js";import{u as w,L as S}from"./localstorage-keys-BAzeyS9J.js";import{a as k,b as O,T as R}from"./tooltip-Cz-bAWiO.js";const v=({size:t=24,color:e="currentColor",...l})=>b.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},b.createElement("path",{d:"M8 9.5h4M8 13h7m-3 8a9 9 0 1 0-8.342-5.616c.081.2.122.3.14.381a.907.907 0 0 1 .024.219c0 .083-.015.173-.045.353l-.593 3.558c-.062.373-.093.56-.035.694a.5.5 0 0 0 .262.262c.135.058.321.027.694-.035l3.558-.593c.18-.03.27-.045.353-.045.081 0 .14.006.219.024.08.018.18.059.38.14A8.973 8.973 0 0 0 12 21Z"}));v.displayName="MessageTextCircle02";function y(){const t=u.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=S.decoChatOpen(),t[0]=e):e=t[0];const[l,o]=w(e,E);let s;return t[1]!==l||t[2]!==o?(s=[l,o],t[1]=l,t[2]=o,t[3]=s):s=t[3],s}function E(t){return!!(t??!0)}function j(t,e){const l=b.Children.toArray(t);for(const o of l)if(b.isValidElement(o)&&o.type===e)return o;return null}function L(){const t=u.c(12),[e,l]=y();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{org:s,project:r}=$(o),{location:h}=T();if(h.pathname===`/${s}/${r}`||h.pathname===`/${s}/${r}/`)return null;const m=e&&"bg-accent text-foreground";let i;t[1]!==m?(i=g("h-7 px-2 gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground",m),t[1]=m,t[2]=i):i=t[2];let a;t[3]!==l?(a=()=>l(P),t[3]=l,t[4]=a):a=t[4];let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(v,{size:14,className:"text-inherit"}),t[5]=f):f=t[5];let c;t[6]!==i||t[7]!==a?(c=n.jsx(k,{asChild:!0,children:n.jsxs(_,{variant:"ghost",className:i,onClick:a,"aria-label":"Toggle Decopilot",children:[f,"Chat"]})}),t[6]=i,t[7]=a,t[8]=c):c=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{side:"bottom",children:"Toggle Decopilot"}),t[9]=d):d=t[9];let p;return t[10]!==c?(p=n.jsxs(R,{children:[c,d]}),t[10]=c,t[11]=p):p=t[11],p}function P(t){return!t}function H(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex flex-col h-full bg-background overflow-hidden",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(17),{children:l,className:o,hideSidebarTrigger:s}=t;let r;e[0]!==l?(r=j(l,C),e[0]=l,e[1]=r):r=e[1];const h=r;let x;e[2]!==l?(x=j(l,N),e[2]=l,e[3]=x):x=e[3];const m=x;let i;e[4]!==o?(i=g("shrink-0 w-full border-b border-border/50 h-11 overflow-x-auto","flex items-center justify-between gap-3 pr-2 pl-4 min-w-max",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==h?(a=n.jsx("div",{className:"flex items-center gap-1",children:h}),e[6]=h,e[7]=a):a=e[7];let f;e[8]!==s?(f=!s&&n.jsx("div",{className:"flex items-center border-l border-border/50 pl-2 ml-1",children:n.jsx(L,{})}),e[8]=s,e[9]=f):f=e[9];let c;e[10]!==m||e[11]!==f?(c=n.jsxs("div",{className:"flex items-center",children:[m,f]}),e[10]=m,e[11]=f,e[12]=c):c=e[12];let d;return e[13]!==i||e[14]!==a||e[15]!==c?(d=n.jsxs("div",{className:i,children:[a,c]}),e[13]=i,e[14]=a,e[15]=c,e[16]=d):d=e[16],d}function C(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex items-center gap-2 shrink-0 overflow-hidden",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function N(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex items-center gap-2 shrink-0 overflow-hidden border-l border-border pl-3",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function A(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex-1 overflow-auto",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}const G=Object.assign(H,{Header:Object.assign(B,{Left:C,Right:N}),Content:A});export{G as P,y as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as L,c as Y,o as Tr,k as kS,l as wS,j as b,B as ke,s as si,cm as OS,cn as vC,bF as Qe,co as _C,a2 as LS,v as ee,u as jn,E as DS,t as $t,aG as CC,_ as IC,cp as RC,bd as MS,cq as xC,cr as Rt,cs as $s,ct as kC,cu as js,cv as wC,cw as OC,cx as LC,cy as DC,m as MC,K as th,cz as PC,cA as FC,cB as BC,cC as UC,n as PS,b as FS,O as Ka,cD as oi,bG as HC,$ as $C,d as jC}from"./index-3zbyfLqi.js";import{u as Sa,a as nh,c as qC,i as BS,m as US,M as zC,d as GC,f as VC,C as WC,t as HS,k as YC}from"./collapsible-D2Mpu85K.js";import{a as yr,b as Sr,P as Ar}from"./popover-7xIJyxqf.js";import{S as ym}from"./skeleton-C9OYLAME.js";import{S as ns}from"./spinner-RGw-eBKN.js";import{T as ut,a as ct,b as dt,c as rs}from"./tooltip-CzsT_Xmu.js";import{d as $S,u as as,i as ur,f as KC}from"./constants-3MhIA0pZ.js";import{u as XC,g as jS,l as Sm}from"./decopilot-events-CA9aFPSQ.js";import{c as ZC,b as QC,e as JC,a as eI,D as tI}from"./dialog-CPWJMuHX.js";import{a as of,F as is,b as ss,c as nI,d as ls,f as us}from"./form-7Q-FsNtX.js";import{I as qS}from"./input-DVv1wKLp.js";import{c as rI,a as aI,e as iI}from"./usage-B8eRkRZY.js";import{i as sI}from"./ArrowUp-N8lcMBug.js";import{t as oI}from"./ChevronDown-jKZz68gN.js";import{i as zS}from"./Edit01-kvm_TgXf.js";import{t as ia}from"./Users03-DHATZiFL.js";import{i as lI}from"./XCircle-D52fnGO6.js";import{i as rh}from"./AlertCircle-C0eftc-S.js";import{i as uI}from"./X-BpJJDPzv.js";import{c as cI,S as dI,d as pI,a as fI,b as hI}from"./select-DaTaxi5W.js";import{u as mI,c as gI,b as bI}from"./tabs-t9dEapgX.js";import{i as EI}from"./ArrowLeft-BNX_fMaj.js";import{i as TI,t as GS,u as VS}from"./use-copy-C0vtJ5Ye.js";import{B as yI}from"./badge-DSAomO1_.js";import{i as qn}from"./Check-Cjs4C9GE.js";import{i as SI}from"./Code01-DVgdcTZ1.js";import{I as ah}from"./integration-icon-_0Y5dukY.js";import{b as AI}from"./use-virtual-mcp-BjGr5L6n.js";import{i as WS}from"./SearchMd-DyDznS8C.js";import{u as NI}from"./use-create-virtual-mcp-CsNENE7l.js";import{l as Am,r as vI}from"./use-mcp-resources-DjDOJ-nS.js";import{i as _I}from"./ChevronRight-O5hZNhHU.js";import{a as cs}from"./Copy01-CwZDv92A.js";import{m as CI}from"./marked.esm-BaswSlok.js";import{f as ih,p as Nm,a as vm,n as _m,h as ds,s as Aa,o as lf,b as II,c as RI,d as zn,v as xI,e as YS,g as Cm,m as kI,i as wI,r as OI}from"./markdown-89WWPNXO.js";import{M as LI}from"./mcp-app-renderer-MJ3LmhBP.js";import{g as KS}from"./types-BFBQ7LBo.js";import{s as DI}from"./Eye-BCmEvczH.js";import{s as MI}from"./Globe02-D-yCMf5N.js";import{s as XS}from"./LayersTwo01-rKs-Uww3.js";import{s as PI}from"./XClose-DcdK3w1e.js";import{E as FI}from"./collection-search-FSS_Lkwz.js";import{g as BI,h as UI}from"./use-connection-Dlr-wAwU.js";import{g as HI}from"./generate-id-Dyweu44Y.js";import{u as $I}from"./index-DZgOYNf-.js";import{s as Im}from"./Clock-CZrEpwOM.js";import{s as jI}from"./Trash01-Dhrt1Goe.js";const ZS=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"}));ZS.displayName="Activity";const QS=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));QS.displayName="Atom02";const JS=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"m21.152 10.9-9.015 9.015a5.25 5.25 0 0 1-7.425-7.425l9.016-9.015a3.5 3.5 0 1 1 4.95 4.95l-8.662 8.662a1.75 1.75 0 1 1-2.475-2.475l7.601-7.602"}));JS.displayName="Attachment01";const sh=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));sh.displayName="Edit02";const eA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));eA.displayName="Lightbulb01";const tA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"m9 11.5 2 2L15.5 9m4.5 3c0 4.908-5.354 8.478-7.302 9.615-.221.129-.332.194-.488.227a1.137 1.137 0 0 1-.42 0c-.156-.034-.267-.098-.488-.227C9.354 20.478 4 16.908 4 12V7.217c0-.799 0-1.199.13-1.542a2 2 0 0 1 .548-.79c.276-.243.65-.383 1.398-.664l5.362-2.01c.208-.078.312-.117.419-.133a1 1 0 0 1 .286 0c.107.016.21.055.419.133l5.362 2.01c.748.28 1.123.421 1.398.664a2 2 0 0 1 .547.79c.131.343.131.743.131 1.542V12Z"}));tA.displayName="ShieldTick";const nA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.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"}));nA.displayName="Stop";const rA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));rA.displayName="Target04";const Rm={}.hasOwnProperty;function aA(t,e){const n=e||{};function r(a,...i){let s=r.invalid;const o=r.handlers;if(a&&Rm.call(a,t)){const l=String(a[t]);s=Rm.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function qI(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?si().min(1,"Required"):si();return Tr(e)}function zI(t){const e={};for(const n of t.arguments??[])e[n.name]="";return e}function iA(t){const e=Y.c(64),{prompt:n,setPrompt:r,onSubmit:a}=t,i=L.useId();let s;if(e[0]!==n){const P=n?qI(n):Tr({});s=kS(P),e[0]=n,e[1]=s}else s=e[1];const l=s;let u;e[2]!==n?(u=n?zI(n):{},e[2]=n,e[3]=u):u=e[3];let c;e[4]!==l||e[5]!==u?(c={resolver:l,defaultValues:u,mode:"onChange"},e[4]=l,e[5]=u,e[6]=c):c=e[6];const d=wS(c);let p;e[7]!==n?.arguments?(p=n?.arguments??[],e[7]=n?.arguments,e[8]=p):p=e[8];const f=p;let m;e[9]!==d||e[10]!==a||e[11]!==r?(m=async P=>{await a(P),r(null),d.reset()},e[9]=d,e[10]=a,e[11]=r,e[12]=m):m=e[12];const g=m;let E;e[13]!==d||e[14]!==r?(E=P=>{P||(d.reset(),r(null))},e[13]=d,e[14]=r,e[15]=E):E=e[15];const T=E;if(!n)return null;let y;e[16]!==n.name||e[17]!==n.title?(y=n.title||n.name.replace(/_/g," "),e[16]=n.name,e[17]=n.title,e[18]=y):y=e[18];let S;e[19]!==y?(S=b.jsx(ZC,{children:y}),e[19]=y,e[20]=S):S=e[20];let N;e[21]!==n.description?(N=n.description&&b.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=N):N=e[22];let _;e[23]!==N||e[24]!==S?(_=b.jsxs(QC,{children:[S,N]}),e[23]=N,e[24]=S,e[25]=_):_=e[25];let A;e[26]!==d||e[27]!==g?(A=P=>{P.stopPropagation(),d.handleSubmit(g)(P)},e[26]=d,e[27]=g,e[28]=A):A=e[28];let v;if(e[29]!==f||e[30]!==d.control||e[31]!==d.formState.isSubmitting){let P;e[33]!==d.control||e[34]!==d.formState.isSubmitting?(P=W=>b.jsx(is,{control:d.control,name:W.name,render:Z=>{const{field:K}=Z;return b.jsxs(ss,{children:[b.jsxs(nI,{className:"text-xs",children:[W.name,W.required?null:b.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),b.jsx(ls,{children:b.jsx(qS,{...K,value:K.value??"",required:W.required,placeholder:W.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),b.jsx(us,{})]})}},W.name),e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=P):P=e[35],v=f.map(P),e[29]=f,e[30]=d.control,e[31]=d.formState.isSubmitting,e[32]=v}else v=e[32];let R;e[36]!==T?(R=()=>T(!1),e[36]=T,e[37]=R):R=e[37];let I;e[38]!==d.formState.isSubmitting||e[39]!==R?(I=b.jsx(ke,{type:"button",variant:"ghost",onClick:R,disabled:d.formState.isSubmitting,children:"Cancel"}),e[38]=d.formState.isSubmitting,e[39]=R,e[40]=I):I=e[40];const O=!d.formState.isValid||d.formState.isSubmitting;let w;e[41]!==d.formState.isSubmitting?(w=d.formState.isSubmitting?b.jsxs("span",{className:"flex items-center gap-2",children:[b.jsx(ns,{size:"xs"}),"Loading..."]}):"Use prompt",e[41]=d.formState.isSubmitting,e[42]=w):w=e[42];let M;e[43]!==i||e[44]!==O||e[45]!==w?(M=b.jsx(ke,{type:"submit",form:i,disabled:O,children:w}),e[43]=i,e[44]=O,e[45]=w,e[46]=M):M=e[46];let U;e[47]!==I||e[48]!==M?(U=b.jsxs(JC,{children:[I,M]}),e[47]=I,e[48]=M,e[49]=U):U=e[49];let B;e[50]!==i||e[51]!==A||e[52]!==v||e[53]!==U?(B=b.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:A,children:[v,U]}),e[50]=i,e[51]=A,e[52]=v,e[53]=U,e[54]=B):B=e[54];let $;e[55]!==d||e[56]!==B?($=b.jsx(of,{...d,children:B}),e[55]=d,e[56]=B,e[57]=$):$=e[57];let H;e[58]!==_||e[59]!==$?(H=b.jsxs(eI,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[_,$]}),e[58]=_,e[59]=$,e[60]=H):H=e[60];let q;return e[61]!==T||e[62]!==H?(q=b.jsx(tI,{open:!0,onOpenChange:T,children:H}),e[61]=T,e[62]=H,e[63]=q):q=e[63],q}function je(t){this.content=t}je.prototype={constructor:je,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,a=r.find(t),i=r.content.slice();return a==-1?i.push(n||t,e):(i[a+1]=e,n&&(i[a]=n)),new je(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new je(n)},addToStart:function(t,e){return new je([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new je(n)},addBefore:function(t,e,n){var r=this.remove(e),a=r.content.slice(),i=r.find(t);return a.splice(i==-1?a.length:i,0,e,n),new je(a)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=je.from(t),t.size?new je(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=je.from(t),t.size?new je(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=je.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};je.from=function(t){if(t instanceof je)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new je(e)};function sA(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let a=t.child(r),i=e.child(r);if(a==i){n+=a.nodeSize;continue}if(!a.sameMarkup(i))return n;if(a.isText&&a.text!=i.text){for(let s=0;a.text[s]==i.text[s];s++)n++;return n}if(a.content.size||i.content.size){let s=sA(a.content,i.content,n+1);if(s!=null)return s}n+=a.nodeSize}}function oA(t,e,n,r){for(let a=t.childCount,i=e.childCount;;){if(a==0||i==0)return a==i?null:{a:n,b:r};let s=t.child(--a),o=e.child(--i),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=oA(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class z{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,a=0,i){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,a+o,i||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,a+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,a){let i="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?a?typeof a=="function"?a(o):a:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(a[a.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)a.push(e.content[i]);return new z(a,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],a=0;if(n>e)for(let i=0,s=0;s<n;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),a+=o.nodeSize),s=l}return new z(r,a)}cutByIndex(e,n){return e==n?z.empty:e==0&&n==this.content.length?this:new z(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let a=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return a[e]=n,new z(a,i)}addToStart(e){return new z([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new z(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let a=this.content[n];e(a,r,n),r+=a.nodeSize}}findDiffStart(e,n=0){return sA(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return oA(this,e,n,r)}findIndex(e){if(e==0)return Oa(0,e);if(e==this.size)return Oa(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let a=this.child(n),i=r+a.nodeSize;if(i>=e)return i==e?Oa(n+1,i):Oa(n,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,n){if(!n)return z.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new z(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return z.empty;let n,r=0;for(let a=0;a<e.length;a++){let i=e[a];r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)?(n||(n=e.slice(0,a)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new z(n||e,r)}static from(e){if(!e)return z.empty;if(e instanceof z)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new z([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}z.empty=new z([],0);const qs={index:0,offset:0};function Oa(t,e){return qs.index=t,qs.offset=e,qs}function li(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!li(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!li(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let fe=class uf{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,a));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,a)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&li(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=r.create(n.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return uf.none;if(e instanceof uf)return[e];let n=e.slice();return n.sort((r,a)=>r.type.rank-a.type.rank),n}};fe.none=[];class ui extends Error{}class Q{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=uA(this.content,e+this.openStart,n);return r&&new Q(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Q(lA(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Q.empty;let r=n.openStart||0,a=n.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Q(z.fromJSON(e,n.content),r,a)}static maxOpen(e,n=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)a++;return new Q(e,r,a)}}Q.empty=new Q(z.empty,0,0);function lA(t,e,n){let{index:r,offset:a}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(a==e||i.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(lA(i.content,e-a-1,n-a-1)))}function uA(t,e,n,r){let{index:a,offset:i}=t.findIndex(e),s=t.maybeChild(a);if(i==e||s.isText)return r&&!r.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=uA(s.content,e-i-1,n,s);return o&&t.replaceChild(a,s.copy(o))}function GI(t,e,n){if(n.openStart>t.depth)throw new ui("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ui("Inconsistent open depths");return cA(t,e,n,0)}function cA(t,e,n,r){let a=t.index(r),i=t.node(r);if(a==e.index(r)&&r<t.depth-n.openStart){let s=cA(t,e,n,r+1);return i.copy(i.content.replaceChild(a,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return wn(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=VI(n,t);return wn(i,pA(t,s,o,e,r))}else return wn(i,ci(t,e,r))}function dA(t,e){if(!e.type.compatibleContent(t.type))throw new ui("Cannot join "+e.type.name+" onto "+t.type.name)}function cf(t,e,n){let r=t.node(n);return dA(r,e.node(n)),r}function kn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function qr(t,e,n,r){let a=(e||t).node(n),i=0,s=e?e.index(n):a.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(kn(t.nodeAfter,r),i++));for(let o=i;o<s;o++)kn(a.child(o),r);e&&e.depth==n&&e.textOffset&&kn(e.nodeBefore,r)}function wn(t,e){return t.type.checkContent(e),t.copy(e)}function pA(t,e,n,r,a){let i=t.depth>a&&cf(t,e,a+1),s=r.depth>a&&cf(n,r,a+1),o=[];return qr(null,t,a,o),i&&s&&e.index(a)==n.index(a)?(dA(i,s),kn(wn(i,pA(t,e,n,r,a+1)),o)):(i&&kn(wn(i,ci(t,e,a+1)),o),qr(e,n,a,o),s&&kn(wn(s,ci(n,r,a+1)),o)),qr(r,null,a,o),new z(o)}function ci(t,e,n){let r=[];if(qr(null,t,n,r),t.depth>n){let a=cf(t,e,n+1);kn(wn(a,ci(t,e,n+1)),r)}return qr(e,null,n,r),new z(r)}function VI(t,e){let n=e.depth-t.openStart,a=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)a=e.node(i).copy(z.from(a));return{start:a.resolveNoCache(t.openStart+n),end:a.resolveNoCache(a.content.size-t.openEnd-n)}}class sa{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(n);return r?e.child(n).cut(r):a}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],a=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),a=e.maybeChild(n);if(!r){let o=r;r=a,a=o}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!a||!i[s].isInSet(a.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new di(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],a=0,i=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,o,a+l),!u||(s=s.child(o),s.isText))break;i=u-1,a+=l+1}return new sa(n,r,i)}static resolveCached(e,n){let r=xm.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else xm.set(e,r=new WI);let a=r.elts[r.i]=sa.resolve(e,n);return r.i=(r.i+1)%YI,a}}class WI{constructor(){this.elts=[],this.i=0}}const YI=12,xm=new WeakMap;class di{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const KI=Object.create(null);let on=class df{constructor(e,n,r,a=fe.none){this.type=e,this.attrs=n,this.marks=a,this.content=r||z.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,a=0){this.content.nodesBetween(e,n,r,a,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,a){return this.content.textBetween(e,n,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&li(this.attrs,n||e.defaultAttrs||KI)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new df(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new df(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Q.empty;let a=this.resolve(e),i=this.resolve(n),s=r?0:a.sharedDepth(n),o=a.start(s),u=a.node(s).content.cut(a.pos-o,i.pos-o);return new Q(u,a.depth-s,i.depth-s)}replace(e,n,r){return GI(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:a}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(a==e||n.isText)return n;e-=a+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let a=this.content.child(n-1);return{node:a,index:n-1,offset:r-a.nodeSize}}resolve(e){return sa.resolveCached(this,e)}resolveNoCache(e){return sa.resolve(this,e)}rangeHasMark(e,n,r){let a=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(a=!0),!a)),a}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()+")"),fA(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=z.empty,a=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,a,i),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=a;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.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=fe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!fe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let a=z.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,a,r);return i.type.checkAttrs(i.attrs),i}};on.prototype.text=void 0;class pi extends on{constructor(e,n,r,a){if(super(e,n,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fA(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new pi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new pi(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function fA(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Fn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new XI(e,n);if(r.next==null)return Fn.empty;let a=hA(r);r.next&&r.err("Unexpected trailing text");let i=rR(nR(a));return aR(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let a=this;for(let i=n;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let a=[this];function i(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return z.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&a.indexOf(d)==-1){a.push(d);let p=i(d,o.concat(c));if(p)return p}}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 n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),i=a.match;if(i.matchType(e)){let s=[];for(let o=a;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:o,next:l}=i.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!a.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:a}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let a=0;a<r.next.length;a++)e.indexOf(r.next[a].next)==-1&&n(r.next[a].next)}return n(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
1
|
+
import{r as L,c as Y,o as Tr,k as kS,l as wS,j as b,B as ke,s as si,cm as OS,cn as vC,bF as Qe,co as _C,a2 as LS,v as ee,u as jn,E as DS,t as $t,bc as CC,_ as IC,cp as RC,bd as MS,cq as xC,cr as Rt,cs as $s,ct as kC,cu as js,cv as wC,cw as OC,cx as LC,cy as DC,m as MC,K as th,cz as PC,cA as FC,cB as BC,cC as UC,n as PS,b as FS,O as Ka,cD as oi,bG as HC,$ as $C,d as jC}from"./index-B_0vsVr1.js";import{u as Sa,a as nh,c as qC,i as BS,m as US,M as zC,d as GC,f as VC,C as WC,t as HS,k as YC}from"./collapsible-sQONDG4w.js";import{a as yr,b as Sr,P as Ar}from"./popover-BNZ96bFv.js";import{S as ym}from"./skeleton-C4ZMp7sl.js";import{S as ns}from"./spinner-oA3jiJW_.js";import{T as ut,a as ct,b as dt,c as rs}from"./tooltip-Cz-bAWiO.js";import{d as $S,u as as,i as ur,e as KC}from"./constants-D9bRXDQp.js";import{u as XC,g as jS,l as Sm}from"./decopilot-events-DHSwekTa.js";import{c as ZC,b as QC,e as JC,a as eI,D as tI}from"./dialog-Baq_fjtR.js";import{a as of,F as is,b as ss,c as nI,d as ls,f as us}from"./form-C5R0_qWR.js";import{I as qS}from"./input-CW7SVowR.js";import{c as rI,a as aI,e as iI}from"./usage-B8eRkRZY.js";import{i as sI}from"./ArrowUp-B3tPpNuu.js";import{t as oI}from"./ChevronDown-DAk1F2Sn.js";import{i as zS}from"./Edit01-D3PaS600.js";import{t as ia}from"./Users03-CPWgVi4r.js";import{i as lI}from"./XCircle-C4iqiznn.js";import{i as rh}from"./AlertCircle-CXJCnY_R.js";import{i as uI}from"./X-uHaUni9w.js";import{c as cI,S as dI,d as pI,a as fI,b as hI}from"./select-CYY4CENz.js";import{u as mI,c as gI,b as bI}from"./tabs-BZ-xfLNG.js";import{i as EI}from"./ArrowLeft-ihbjidrQ.js";import{i as TI,t as GS,u as VS}from"./use-copy-CykDvxn6.js";import{B as yI}from"./badge-CxJArm69.js";import{i as qn}from"./Check-G22LpKFd.js";import{i as SI}from"./Code01-UXkm6aqY.js";import{I as ah}from"./integration-icon-DAFtApWT.js";import{b as AI}from"./use-virtual-mcp-OwU65kyR.js";import{i as WS}from"./SearchMd-Cpf31N-H.js";import{u as NI}from"./use-create-virtual-mcp-DB14T-Ft.js";import{l as Am,r as vI}from"./use-mcp-resources-Rqzq7A0J.js";import{i as _I}from"./ChevronRight-BT7U8Kip.js";import{a as cs}from"./Copy01-tzx60ICS.js";import{m as CI}from"./marked.esm-BaswSlok.js";import{f as ih,p as Nm,a as vm,n as _m,h as ds,s as Aa,o as lf,b as II,c as RI,d as zn,v as xI,e as YS,g as Cm,m as kI,i as wI,r as OI}from"./markdown-DCSB9ejV.js";import{M as LI}from"./mcp-app-renderer-BtuEhdWL.js";import{g as KS}from"./types-B46wd5bS.js";import{s as DI}from"./Eye-C_LYW9jG.js";import{s as MI}from"./Globe02-X-Xm1ngz.js";import{s as XS}from"./LayersTwo01-CRgWs3EX.js";import{s as PI}from"./XClose-DGYV-4S5.js";import{E as FI}from"./collection-search-q4T1hb73.js";import{a as BI,b as UI}from"./use-connection-DeEn4qfI.js";import{g as HI}from"./generate-id-Dyweu44Y.js";import{u as $I}from"./index-QCmdl8uj.js";import{s as Im}from"./Clock-CPO-Cqx6.js";import{s as jI}from"./Trash01-HuK-pEft.js";const ZS=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"}));ZS.displayName="Activity";const QS=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));QS.displayName="Atom02";const JS=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"m21.152 10.9-9.015 9.015a5.25 5.25 0 0 1-7.425-7.425l9.016-9.015a3.5 3.5 0 1 1 4.95 4.95l-8.662 8.662a1.75 1.75 0 1 1-2.475-2.475l7.601-7.602"}));JS.displayName="Attachment01";const sh=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"m18 10-4-4M2.5 21.5l3.384-.376c.414-.046.62-.069.814-.131a2 2 0 0 0 .485-.234c.17-.111.317-.259.61-.553L21 7a2.828 2.828 0 1 0-4-4L3.794 16.206c-.294.294-.442.442-.553.611a2 2 0 0 0-.234.485c-.062.193-.085.4-.131.814L2.5 21.5Z"}));sh.displayName="Edit02";const eA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));eA.displayName="Lightbulb01";const tA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"m9 11.5 2 2L15.5 9m4.5 3c0 4.908-5.354 8.478-7.302 9.615-.221.129-.332.194-.488.227a1.137 1.137 0 0 1-.42 0c-.156-.034-.267-.098-.488-.227C9.354 20.478 4 16.908 4 12V7.217c0-.799 0-1.199.13-1.542a2 2 0 0 1 .548-.79c.276-.243.65-.383 1.398-.664l5.362-2.01c.208-.078.312-.117.419-.133a1 1 0 0 1 .286 0c.107.016.21.055.419.133l5.362 2.01c.748.28 1.123.421 1.398.664a2 2 0 0 1 .547.79c.131.343.131.743.131 1.542V12Z"}));tA.displayName="ShieldTick";const nA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.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"}));nA.displayName="Stop";const rA=({size:t=24,color:e="currentColor",...n})=>L.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},L.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));rA.displayName="Target04";const Rm={}.hasOwnProperty;function aA(t,e){const n=e||{};function r(a,...i){let s=r.invalid;const o=r.handlers;if(a&&Rm.call(a,t)){const l=String(a[t]);s=Rm.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function qI(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?si().min(1,"Required"):si();return Tr(e)}function zI(t){const e={};for(const n of t.arguments??[])e[n.name]="";return e}function iA(t){const e=Y.c(64),{prompt:n,setPrompt:r,onSubmit:a}=t,i=L.useId();let s;if(e[0]!==n){const P=n?qI(n):Tr({});s=kS(P),e[0]=n,e[1]=s}else s=e[1];const l=s;let u;e[2]!==n?(u=n?zI(n):{},e[2]=n,e[3]=u):u=e[3];let c;e[4]!==l||e[5]!==u?(c={resolver:l,defaultValues:u,mode:"onChange"},e[4]=l,e[5]=u,e[6]=c):c=e[6];const d=wS(c);let p;e[7]!==n?.arguments?(p=n?.arguments??[],e[7]=n?.arguments,e[8]=p):p=e[8];const f=p;let m;e[9]!==d||e[10]!==a||e[11]!==r?(m=async P=>{await a(P),r(null),d.reset()},e[9]=d,e[10]=a,e[11]=r,e[12]=m):m=e[12];const g=m;let E;e[13]!==d||e[14]!==r?(E=P=>{P||(d.reset(),r(null))},e[13]=d,e[14]=r,e[15]=E):E=e[15];const T=E;if(!n)return null;let y;e[16]!==n.name||e[17]!==n.title?(y=n.title||n.name.replace(/_/g," "),e[16]=n.name,e[17]=n.title,e[18]=y):y=e[18];let S;e[19]!==y?(S=b.jsx(ZC,{children:y}),e[19]=y,e[20]=S):S=e[20];let N;e[21]!==n.description?(N=n.description&&b.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=N):N=e[22];let _;e[23]!==N||e[24]!==S?(_=b.jsxs(QC,{children:[S,N]}),e[23]=N,e[24]=S,e[25]=_):_=e[25];let A;e[26]!==d||e[27]!==g?(A=P=>{P.stopPropagation(),d.handleSubmit(g)(P)},e[26]=d,e[27]=g,e[28]=A):A=e[28];let v;if(e[29]!==f||e[30]!==d.control||e[31]!==d.formState.isSubmitting){let P;e[33]!==d.control||e[34]!==d.formState.isSubmitting?(P=W=>b.jsx(is,{control:d.control,name:W.name,render:Z=>{const{field:K}=Z;return b.jsxs(ss,{children:[b.jsxs(nI,{className:"text-xs",children:[W.name,W.required?null:b.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),b.jsx(ls,{children:b.jsx(qS,{...K,value:K.value??"",required:W.required,placeholder:W.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),b.jsx(us,{})]})}},W.name),e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=P):P=e[35],v=f.map(P),e[29]=f,e[30]=d.control,e[31]=d.formState.isSubmitting,e[32]=v}else v=e[32];let R;e[36]!==T?(R=()=>T(!1),e[36]=T,e[37]=R):R=e[37];let I;e[38]!==d.formState.isSubmitting||e[39]!==R?(I=b.jsx(ke,{type:"button",variant:"ghost",onClick:R,disabled:d.formState.isSubmitting,children:"Cancel"}),e[38]=d.formState.isSubmitting,e[39]=R,e[40]=I):I=e[40];const O=!d.formState.isValid||d.formState.isSubmitting;let w;e[41]!==d.formState.isSubmitting?(w=d.formState.isSubmitting?b.jsxs("span",{className:"flex items-center gap-2",children:[b.jsx(ns,{size:"xs"}),"Loading..."]}):"Use prompt",e[41]=d.formState.isSubmitting,e[42]=w):w=e[42];let M;e[43]!==i||e[44]!==O||e[45]!==w?(M=b.jsx(ke,{type:"submit",form:i,disabled:O,children:w}),e[43]=i,e[44]=O,e[45]=w,e[46]=M):M=e[46];let U;e[47]!==I||e[48]!==M?(U=b.jsxs(JC,{children:[I,M]}),e[47]=I,e[48]=M,e[49]=U):U=e[49];let B;e[50]!==i||e[51]!==A||e[52]!==v||e[53]!==U?(B=b.jsxs("form",{id:i,className:"space-y-4 py-4",autoComplete:"off",onSubmit:A,children:[v,U]}),e[50]=i,e[51]=A,e[52]=v,e[53]=U,e[54]=B):B=e[54];let $;e[55]!==d||e[56]!==B?($=b.jsx(of,{...d,children:B}),e[55]=d,e[56]=B,e[57]=$):$=e[57];let H;e[58]!==_||e[59]!==$?(H=b.jsxs(eI,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[_,$]}),e[58]=_,e[59]=$,e[60]=H):H=e[60];let q;return e[61]!==T||e[62]!==H?(q=b.jsx(tI,{open:!0,onOpenChange:T,children:H}),e[61]=T,e[62]=H,e[63]=q):q=e[63],q}function je(t){this.content=t}je.prototype={constructor:je,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,a=r.find(t),i=r.content.slice();return a==-1?i.push(n||t,e):(i[a+1]=e,n&&(i[a]=n)),new je(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new je(n)},addToStart:function(t,e){return new je([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new je(n)},addBefore:function(t,e,n){var r=this.remove(e),a=r.content.slice(),i=r.find(t);return a.splice(i==-1?a.length:i,0,e,n),new je(a)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=je.from(t),t.size?new je(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=je.from(t),t.size?new je(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=je.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};je.from=function(t){if(t instanceof je)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new je(e)};function sA(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let a=t.child(r),i=e.child(r);if(a==i){n+=a.nodeSize;continue}if(!a.sameMarkup(i))return n;if(a.isText&&a.text!=i.text){for(let s=0;a.text[s]==i.text[s];s++)n++;return n}if(a.content.size||i.content.size){let s=sA(a.content,i.content,n+1);if(s!=null)return s}n+=a.nodeSize}}function oA(t,e,n,r){for(let a=t.childCount,i=e.childCount;;){if(a==0||i==0)return a==i?null:{a:n,b:r};let s=t.child(--a),o=e.child(--i),l=s.nodeSize;if(s==o){n-=l,r-=l;continue}if(!s.sameMarkup(o))return{a:n,b:r};if(s.isText&&s.text!=o.text){let u=0,c=Math.min(s.text.length,o.text.length);for(;u<c&&s.text[s.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||o.content.size){let u=oA(s.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class z{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,a=0,i){for(let s=0,o=0;o<n;s++){let l=this.content[s],u=o+l.nodeSize;if(u>e&&r(l,a+o,i||null,s)!==!1&&l.content.size){let c=o+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,a+c)}o=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,a){let i="",s=!0;return this.nodesBetween(e,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(e,l)-l,n-l):o.isLeaf?a?typeof a=="function"?a(o):a:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,a=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(a[a.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)a.push(e.content[i]);return new z(a,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],a=0;if(n>e)for(let i=0,s=0;s<n;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>n)&&(o.isText?o=o.cut(Math.max(0,e-s),Math.min(o.text.length,n-s)):o=o.cut(Math.max(0,e-s-1),Math.min(o.content.size,n-s-1))),r.push(o),a+=o.nodeSize),s=l}return new z(r,a)}cutByIndex(e,n){return e==n?z.empty:e==0&&n==this.content.length?this:new z(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let a=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return a[e]=n,new z(a,i)}addToStart(e){return new z([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new z(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let a=this.content[n];e(a,r,n),r+=a.nodeSize}}findDiffStart(e,n=0){return sA(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return oA(this,e,n,r)}findIndex(e){if(e==0)return Oa(0,e);if(e==this.size)return Oa(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let a=this.child(n),i=r+a.nodeSize;if(i>=e)return i==e?Oa(n+1,i):Oa(n,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,n){if(!n)return z.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new z(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return z.empty;let n,r=0;for(let a=0;a<e.length;a++){let i=e[a];r+=i.nodeSize,a&&i.isText&&e[a-1].sameMarkup(i)?(n||(n=e.slice(0,a)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new z(n||e,r)}static from(e){if(!e)return z.empty;if(e instanceof z)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new z([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}z.empty=new z([],0);const qs={index:0,offset:0};function Oa(t,e){return qs.index=t,qs.offset=e,qs}function li(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!li(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!li(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let fe=class uf{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let a=0;a<e.length;a++){let i=e[a];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,a));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,a)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&li(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let a=r.create(n.attrs);return r.checkAttrs(a.attrs),a}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return uf.none;if(e instanceof uf)return[e];let n=e.slice();return n.sort((r,a)=>r.type.rank-a.type.rank),n}};fe.none=[];class ui extends Error{}class Q{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=uA(this.content,e+this.openStart,n);return r&&new Q(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Q(lA(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Q.empty;let r=n.openStart||0,a=n.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Q(z.fromJSON(e,n.content),r,a)}static maxOpen(e,n=!0){let r=0,a=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)a++;return new Q(e,r,a)}}Q.empty=new Q(z.empty,0,0);function lA(t,e,n){let{index:r,offset:a}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:o}=t.findIndex(n);if(a==e||i.isText){if(o!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(lA(i.content,e-a-1,n-a-1)))}function uA(t,e,n,r){let{index:a,offset:i}=t.findIndex(e),s=t.maybeChild(a);if(i==e||s.isText)return r&&!r.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let o=uA(s.content,e-i-1,n,s);return o&&t.replaceChild(a,s.copy(o))}function GI(t,e,n){if(n.openStart>t.depth)throw new ui("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ui("Inconsistent open depths");return cA(t,e,n,0)}function cA(t,e,n,r){let a=t.index(r),i=t.node(r);if(a==e.index(r)&&r<t.depth-n.openStart){let s=cA(t,e,n,r+1);return i.copy(i.content.replaceChild(a,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,o=s.content;return wn(s,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}else{let{start:s,end:o}=VI(n,t);return wn(i,pA(t,s,o,e,r))}else return wn(i,ci(t,e,r))}function dA(t,e){if(!e.type.compatibleContent(t.type))throw new ui("Cannot join "+e.type.name+" onto "+t.type.name)}function cf(t,e,n){let r=t.node(n);return dA(r,e.node(n)),r}function kn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function qr(t,e,n,r){let a=(e||t).node(n),i=0,s=e?e.index(n):a.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(kn(t.nodeAfter,r),i++));for(let o=i;o<s;o++)kn(a.child(o),r);e&&e.depth==n&&e.textOffset&&kn(e.nodeBefore,r)}function wn(t,e){return t.type.checkContent(e),t.copy(e)}function pA(t,e,n,r,a){let i=t.depth>a&&cf(t,e,a+1),s=r.depth>a&&cf(n,r,a+1),o=[];return qr(null,t,a,o),i&&s&&e.index(a)==n.index(a)?(dA(i,s),kn(wn(i,pA(t,e,n,r,a+1)),o)):(i&&kn(wn(i,ci(t,e,a+1)),o),qr(e,n,a,o),s&&kn(wn(s,ci(n,r,a+1)),o)),qr(r,null,a,o),new z(o)}function ci(t,e,n){let r=[];if(qr(null,t,n,r),t.depth>n){let a=cf(t,e,n+1);kn(wn(a,ci(t,e,n+1)),r)}return qr(e,null,n,r),new z(r)}function VI(t,e){let n=e.depth-t.openStart,a=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)a=e.node(i).copy(z.from(a));return{start:a.resolveNoCache(t.openStart+n),end:a.resolveNoCache(a.content.size-t.openEnd-n)}}class sa{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=e.child(n);return r?e.child(n).cut(r):a}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],a=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)a+=r.child(i).nodeSize;return a}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),a=e.maybeChild(n);if(!r){let o=r;r=a,a=o}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!a||!i[s].isInSet(a.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,a=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!a||!r[i].isInSet(a.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new di(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],a=0,i=n;for(let s=e;;){let{index:o,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,o,a+l),!u||(s=s.child(o),s.isText))break;i=u-1,a+=l+1}return new sa(n,r,i)}static resolveCached(e,n){let r=xm.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else xm.set(e,r=new WI);let a=r.elts[r.i]=sa.resolve(e,n);return r.i=(r.i+1)%YI,a}}class WI{constructor(){this.elts=[],this.i=0}}const YI=12,xm=new WeakMap;class di{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const KI=Object.create(null);let on=class df{constructor(e,n,r,a=fe.none){this.type=e,this.attrs=n,this.marks=a,this.content=r||z.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,a=0){this.content.nodesBetween(e,n,r,a,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,a){return this.content.textBetween(e,n,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&li(this.attrs,n||e.defaultAttrs||KI)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new df(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new df(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Q.empty;let a=this.resolve(e),i=this.resolve(n),s=r?0:a.sharedDepth(n),o=a.start(s),u=a.node(s).content.cut(a.pos-o,i.pos-o);return new Q(u,a.depth-s,i.depth-s)}replace(e,n,r){return GI(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:a}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(a==e||n.isText)return n;e-=a+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let a=this.content.child(n-1);return{node:a,index:n-1,offset:r-a.nodeSize}}resolve(e){return sa.resolveCached(this,e)}resolveNoCache(e){return sa.resolve(this,e)}rangeHasMark(e,n,r){let a=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(a=!0),!a)),a}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()+")"),fA(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=z.empty,a=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,a,i),o=s&&s.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=a;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,a){if(a&&!this.type.allowsMarks(a))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.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=fe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!fe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let a=z.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,a,r);return i.type.checkAttrs(i.attrs),i}};on.prototype.text=void 0;class pi extends on{constructor(e,n,r,a){if(super(e,n,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fA(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new pi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new pi(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function fA(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Fn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new XI(e,n);if(r.next==null)return Fn.empty;let a=hA(r);r.next&&r.err("Unexpected trailing text");let i=rR(nR(a));return aR(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let a=this;for(let i=n;a&&i<r;i++)a=a.matchType(e.child(i).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let a=[this];function i(s,o){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return z.from(o.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&a.indexOf(d)==-1){a.push(d);let p=i(d,o.concat(c));if(p)return p}}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 n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),i=a.match;if(i.matchType(e)){let s=[];for(let o=a;o.type;o=o.via)s.push(o.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:o,next:l}=i.next[s];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!a.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:a}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let a=0;a<r.next.length;a++)e.indexOf(r.next[a].next)==-1&&n(r.next[a].next)}return n(this),e.map((r,a)=>{let i=a+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
2
2
|
`)}}Fn.empty=new Fn(!0);class XI{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function hA(t){let e=[];do e.push(ZI(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ZI(t){let e=[];do e.push(QI(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function QI(t){let e=tR(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=JI(t,e);else break;return e}function km(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function JI(t,e){let n=km(t),r=n;return t.eat(",")&&(t.next!="}"?r=km(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function eR(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let a=[];for(let i in n){let s=n[i];s.isInGroup(e)&&a.push(s)}return a.length==0&&t.err("No node type or group '"+e+"' found"),a}function tR(t){if(t.eat("(")){let e=hA(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=eR(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function nR(t){let e=[[]];return a(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,o,l){let u={term:l,to:o};return e[s].push(u),u}function a(s,o){s.forEach(l=>l.to=o)}function i(s,o){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,o)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],o);if(l==s.exprs.length-1)return u;a(u,o=n())}else if(s.type=="star"){let l=n();return r(o,l),a(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return a(i(s.expr,o),l),a(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(o)].concat(i(s.expr,o));if(s.type=="range"){let l=o;for(let u=0;u<s.min;u++){let c=n();a(i(s.expr,l),c),l=c}if(s.max==-1)a(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();r(l,c),a(i(s.expr,l),c),l=c}return[r(l)]}else{if(s.type=="name")return[r(o,void 0,s.value)];throw new Error("Unknown expr type")}}}}function mA(t,e){return e-t}function wm(t,e){let n=[];return r(e),n.sort(mA);function r(a){let i=t[a];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(a);for(let s=0;s<i.length;s++){let{term:o,to:l}=i[s];!o&&n.indexOf(l)==-1&&r(l)}}}function rR(t){let e=Object.create(null);return n(wm(t,0));function n(r){let a=[];r.forEach(s=>{t[s].forEach(({term:o,to:l})=>{if(!o)return;let u;for(let c=0;c<a.length;c++)a[c][0]==o&&(u=a[c][1]);wm(t,l).forEach(c=>{u||a.push([o,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[r.join(",")]=new Fn(r.indexOf(t.length-1)>-1);for(let s=0;s<a.length;s++){let o=a[s][1].sort(mA);i.next.push({type:a[s][0],next:e[o.join(",")]||n(o)})}return i}}function aR(t,e){for(let n=0,r=[t];n<r.length;n++){let a=r[n],i=!a.validEnd,s=[];for(let o=0;o<a.next.length;o++){let{type:l,next:u}=a.next[o];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function gA(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function bA(t,e){let n=Object.create(null);for(let r in t){let a=e&&e[r];if(a===void 0){let i=t[r];if(i.hasDefault)a=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=a}return n}function EA(t,e,n,r){for(let a in e)if(!(a in t))throw new RangeError(`Unsupported attribute ${a} for ${n} of type ${a}`);for(let a in t){let i=t[a];i.validate&&i.validate(e[a])}}function TA(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new sR(t,r,e[r]);return n}let Om=class yA{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=TA(e,r.attrs),this.defaultAttrs=gA(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==Fn.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:bA(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new on(this,this.computeAttrs(e),z.from(n),fe.setFrom(r))}createChecked(e=null,n,r){return n=z.from(n),this.checkContent(n),new on(this,this.computeAttrs(e),n,fe.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=z.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let a=this.contentMatch.matchFragment(n),i=a&&a.fillBefore(z.empty,!0);return i?new on(this,e,n.append(i),fe.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){EA(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:fe.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new yA(i,n,s));let a=n.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");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 iR(t,e,n){let r=n.split("|");return a=>{let i=a===null?"null":typeof a;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class sR{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?iR(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ps{constructor(e,n,r,a){this.name=e,this.rank=n,this.schema=r,this.spec=a,this.attrs=TA(e,a.attrs),this.excluded=null;let i=gA(this.attrs);this.instance=i?new fe(this,i):null}create(e=null){return!e&&this.instance?this.instance:new fe(this,bA(this.attrs,e))}static compile(e,n){let r=Object.create(null),a=0;return e.forEach((i,s)=>r[i]=new ps(i,a++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){EA(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class SA{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let a in e)n[a]=e[a];n.nodes=je.from(e.nodes),n.marks=je.from(e.marks||{}),this.nodes=Om.compile(this.spec.nodes,this),this.marks=ps.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let i=this.nodes[a],s=i.spec.content||"",o=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Fn.parse(s,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=o=="_"?null:o?Lm(this,o.split(" ")):o==""||!i.inlineContent?[]:null}for(let a in this.marks){let i=this.marks[a],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:Lm(this,s.split(" "))}this.nodeFromJSON=a=>on.fromJSON(this,a),this.markFromJSON=a=>fe.fromJSON(this,a),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,a){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Om){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,a)}text(e,n){let r=this.nodes.text;return new pi(r,r.defaultAttrs,e,fe.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Lm(t,e){let n=[];for(let r=0;r<e.length;r++){let a=e[r],i=t.marks[a],s=i;if(i)n.push(i);else for(let o in t.marks){let l=t.marks[o];(a=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(a)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function oR(t){return t.tag!=null}function lR(t){return t.style!=null}class ln{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(a=>{if(oR(a))this.tags.push(a);else if(lR(a)){let i=/[^=]*/.exec(a.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let i=e.nodes[a.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Mm(this,n,!1);return r.addAll(e,fe.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Mm(this,n,!0);return r.addAll(e,fe.none,n.from,n.to),Q.maxOpen(r.finish())}matchTag(e,n,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let i=this.tags[a];if(dR(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,a){for(let i=a?this.styles.indexOf(a)+1:0;i<this.styles.length;i++){let s=this.styles[i],o=s.style;if(!(o.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||o.length>e.length&&(o.charCodeAt(e.length)!=61||o.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(a){let i=a.priority==null?50:a.priority,s=0;for(;s<n.length;s++){let o=n[s];if((o.priority==null?50:o.priority)<i)break}n.splice(s,0,a)}for(let a in e.marks){let i=e.marks[a].spec.parseDOM;i&&i.forEach(s=>{r(s=Pm(s)),s.mark||s.ignore||s.clearMark||(s.mark=a)})}for(let a in e.nodes){let i=e.nodes[a].spec.parseDOM;i&&i.forEach(s=>{r(s=Pm(s)),s.node||s.ignore||s.mark||(s.node=a)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ln(e,ln.schemaRules(e)))}}const AA={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},uR={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},NA={ol:!0,ul:!0},oa=1,pf=2,zr=4;function Dm(t,e,n){return e!=null?(e?oa:0)|(e==="full"?pf:0):t&&t.whitespace=="pre"?oa|pf:n&~zr}class La{constructor(e,n,r,a,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=a,this.options=s,this.content=[],this.activeMarks=fe.none,this.match=i||(s&zr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(z.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(e.type))?(this.match=r,a):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&oa)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-a[0].length))}}let n=z.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(z.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!AA.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Mm{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let a=n.topNode,i,s=Dm(null,n.preserveWhitespace,0)|(r?zr:0);a?i=new La(a.type,a.attrs,fe.none,!0,n.topMatch||a.type.contentMatch,s):r?i=new La(null,null,fe.none,!0,null,s):i=new La(e.schema.topNodeType,null,fe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,a=this.top,i=a.options&pf?"full":this.localPreserveWS||(a.options&oa)>0,{schema:s}=this.parser;if(i==="full"||a.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(s.text(o[l]),n,!/\S/.test(o[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=a.content[a.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let a=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;NA.hasOwnProperty(s)&&this.parser.normalizeLists&&cR(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));e:if(l?l.ignore:uR.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(AA.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(i),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?o:void 0)}this.localPreserveWS=a}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],s=r.getPropertyValue(i);if(s)for(let o=void 0;;){let l=this.parser.matchStyle(i,s,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(e,n,r,a){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(a)this.addElement(e,r,a);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(o)&&this.open--}addAll(e,n,r,a){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,o=a==null?null:e.childNodes[a];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let a,i;for(let s=this.open,o=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!a||a.length>u.length+o)&&(a=u,i=l,!u.length))break;if(l.solid){if(r)break;o+=2}}if(!a)return null;this.sync(i);for(let s=0;s<a.length;s++)n=this.enterInner(a[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let a=this.findPlace(e,n,r);if(a){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=fe.none;for(let o of a.concat(e.marks))(i.type?i.type.allowsMarkType(o.type):Fm(o.type,e.type))&&(s=o.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,a){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,a)),i}enterInner(e,n,r,a=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=Dm(e,i,s.options);s.options&zr&&s.content.length==0&&(o|=zr);let l=fe.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):Fm(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new La(e,n,l,a,null,o)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=oa)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let a=r.length-1;a>=0;a--)e+=r[a].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&e.nodeType==1&&e.contains(this.find[a].node)&&n.compareDocumentPosition(this.find[a].node)&(r?2:4)&&(this.find[a].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(a?0:1),s=(o,l)=>{for(;o>=0;o--){let u=n[o];if(u==""){if(o==n.length-1||o==0)continue;for(;l>=i;l--)if(s(o-1,l))return!0;return!1}else{let c=l>0||l==0&&a?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function cR(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&NA.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function dR(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Pm(t){let e={};for(let n in t)e[n]=t[n];return e}function Fm(t,e){let n=e.schema.nodes;for(let r in n){let a=n[r];if(!a.allowsMarkType(t))continue;let i=[],s=o=>{i.push(o);for(let l=0;l<o.edgeCount;l++){let{type:u,next:c}=o.edge(l);if(u==e||i.indexOf(c)<0&&s(c))return!0}};if(s(a.contentMatch))return!0}}class Gn{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=zs(n).createDocumentFragment());let a=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let o=0,l=0;for(;o<i.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[o][0])||u.type.spec.spanning===!1)break;o++,l++}for(;o<i.length;)a=i.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(i.push([u,a]),a.appendChild(c.dom),a=c.contentDOM||c.dom)}}a.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:a}=Xa(zs(n),this.nodes[e.type.name](e),null,e.attrs);if(a){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,a)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let a=e.marks.length-1;a>=0;a--){let i=this.serializeMark(e.marks[a],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let a=this.marks[e.type.name];return a&&Xa(zs(r),a(e,n),null,e.attrs)}static renderSpec(e,n,r=null,a){return Xa(e,n,r,a)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Gn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Bm(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Bm(e.marks)}}function Bm(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function zs(t){return t.document||window.document}const Um=new WeakMap;function pR(t){let e=Um.get(t);return e===void 0&&Um.set(t,e=fR(t)),e}function fR(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let a=0;a<r.length;a++)n(r[a]);else for(let a in r)n(r[a])}return n(t),e}function Xa(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let a=e[0],i;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=pR(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 s=a.indexOf(" ");s>0&&(n=a.slice(0,s),a=a.slice(s+1));let o,l=n?t.createElementNS(n,a):t.createElement(a),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let p=d.indexOf(" ");p>0?l.setAttributeNS(d.slice(0,p),d.slice(p+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let p=e[d];if(p===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:m}=Xa(t,p,n,r);if(l.appendChild(f),m){if(o)throw new RangeError("Multiple content holes");o=m}}}return{dom:l,contentDOM:o}}const vA=65535,_A=Math.pow(2,16);function hR(t,e){return t+e*_A}function Hm(t){return t&vA}function mR(t){return(t-(t&vA))/_A}const CA=1,IA=2,Za=4,RA=8;class ff{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&RA)>0}get deletedBefore(){return(this.delInfo&(CA|Za))>0}get deletedAfter(){return(this.delInfo&(IA|Za))>0}get deletedAcross(){return(this.delInfo&Za)>0}}class ot{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ot.empty)return ot.empty}recover(e){let n=0,r=Hm(e);if(!this.inverted)for(let a=0;a<r;a++)n+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+n+mR(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let a=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?a:0);if(l>e)break;let u=this.ranges[o+i],c=this.ranges[o+s],d=l+u;if(e<=d){let p=u?e==l?-1:e==d?1:n:n,f=l+a+(p<0?0:c);if(r)return f;let m=e==(n<0?l:d)?null:hR(o/3,e-l),g=e==l?IA:e==d?CA:Za;return(n<0?e!=l:e!=d)&&(g|=RA),new ff(f,g,m)}a+=c-u}return r?e+a:new ff(e+a,0,null)}touches(e,n){let r=0,a=Hm(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[o+i],c=l+u;if(e<=c&&o==a*3)return!0;r+=this.ranges[o+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let s=this.ranges[a],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),u=this.ranges[a+n],c=this.ranges[a+r];e(o,o+u,l,l+c),i+=c-u}}invert(){return new ot(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ot.empty:new ot(e<0?[0,-e,0]:[0,0,e])}}ot.empty=new ot([]);class la{constructor(e,n,r=0,a=e?e.length:0){this.mirror=n,this.from=r,this.to=a,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new la(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let a=e.getMirror(n);this.appendMap(e._maps[n],a!=null&&a<n?r+a:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let a=e.getMirror(n);this.appendMap(e._maps[n].invert(),a!=null&&a>n?r-a-1:void 0)}}invert(){let e=new la;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let a=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],o=s.mapResult(e,n);if(o.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(o.recover);continue}}a|=o.delInfo,e=o.pos}return r?e:new ff(e,a,null)}}const Gs=Object.create(null);class Ke{getMap(){return ot.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Gs[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Gs)throw new RangeError("Duplicate use of step JSON ID "+e);return Gs[e]=n,n.prototype.jsonID=e,n}}class xe{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new xe(e,null)}static fail(e){return new xe(null,e)}static fromReplace(e,n,r,a){try{return xe.ok(e.replace(n,r,a))}catch(i){if(i instanceof ui)return xe.fail(i.message);throw i}}}function oh(t,e,n){let r=[];for(let a=0;a<t.childCount;a++){let i=t.child(a);i.content.size&&(i=i.copy(oh(i.content,e,i))),i.isInline&&(i=e(i,n,a)),r.push(i)}return z.fromArray(r)}class tn extends Ke{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),a=r.node(r.sharedDepth(this.to)),i=new Q(oh(n.content,(s,o)=>!s.isAtom||!o.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),a),n.openStart,n.openEnd);return xe.fromReplace(e,this.from,this.to,i)}invert(){return new St(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new tn(n.pos,r.pos,this.mark)}merge(e){return e instanceof tn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new tn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new tn(n.from,n.to,e.markFromJSON(n.mark))}}Ke.jsonID("addMark",tn);class St extends Ke{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Q(oh(n.content,a=>a.mark(this.mark.removeFromSet(a.marks)),e),n.openStart,n.openEnd);return xe.fromReplace(e,this.from,this.to,r)}invert(){return new tn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new St(n.pos,r.pos,this.mark)}merge(e){return e instanceof St&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new St(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new St(n.from,n.to,e.markFromJSON(n.mark))}}Ke.jsonID("removeMark",St);class nn extends Ke{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return xe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return xe.fromReplace(e,this.pos,this.pos+1,new Q(z.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let a=0;a<n.marks.length;a++)if(!n.marks[a].isInSet(r))return new nn(this.pos,n.marks[a]);return new nn(this.pos,this.mark)}}return new Bn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new nn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new nn(n.pos,e.markFromJSON(n.mark))}}Ke.jsonID("addNodeMark",nn);class Bn extends Ke{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return xe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return xe.fromReplace(e,this.pos,this.pos+1,new Q(z.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new nn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Bn(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Bn(n.pos,e.markFromJSON(n.mark))}}Ke.jsonID("removeNodeMark",Bn);class Fe extends Ke{constructor(e,n,r,a=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=a}apply(e){return this.structure&&hf(e,this.from,this.to)?xe.fail("Structure replace would overwrite content"):xe.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ot([this.from,this.to-this.from,this.slice.size])}invert(e){return new Fe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Fe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Fe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Q.empty:new Q(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Fe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Q.empty:new Q(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Fe(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Fe(n.from,n.to,Q.fromJSON(e,n.slice),!!n.structure)}}Ke.jsonID("replace",Fe);class Ue extends Ke{constructor(e,n,r,a,i,s,o=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=a,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(hf(e,this.from,this.gapFrom)||hf(e,this.gapTo,this.to)))return xe.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return xe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?xe.fromReplace(e,this.from,this.to,r):xe.fail("Content does not fit in gap")}getMap(){return new ot([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Ue(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),a=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||a<n.pos||i>r.pos?null:new Ue(n.pos,r.pos,a,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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ue(n.from,n.to,n.gapFrom,n.gapTo,Q.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ke.jsonID("replaceAround",Ue);function hf(t,e,n){let r=t.resolve(e),a=n-e,i=r.depth;for(;a>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,a--;if(a>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;a>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,a--}}return!1}function gR(t,e,n,r){let a=[],i=[],s,o;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let p=Math.max(u,e),f=Math.min(u+l.nodeSize,n),m=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(m)||(s&&s.to==p&&s.mark.eq(d[g])?s.to=f:a.push(s=new St(p,f,d[g])));o&&o.to==p?o.to=f:i.push(o=new tn(p,f,r))}}),a.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function bR(t,e,n,r){let a=[],i=0;t.doc.nodesBetween(e,n,(s,o)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof ps){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(o+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],p;for(let f=0;f<a.length;f++){let m=a[f];m.step==i-1&&d.eq(a[f].style)&&(p=m)}p?(p.to=u,p.step=i):a.push({style:d,from:Math.max(o,e),to:u,step:i})}}}),a.forEach(s=>t.step(new St(s.from,s.to,s.style)))}function lh(t,e,n,r=n.contentMatch,a=!0){let i=t.doc.nodeAt(e),s=[],o=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),c=o+u.nodeSize,d=r.matchType(u.type);if(!d)s.push(new Fe(o,c,Q.empty));else{r=d;for(let p=0;p<u.marks.length;p++)n.allowsMarkType(u.marks[p].type)||t.step(new St(o,c,u.marks[p]));if(a&&u.isText&&n.whitespace!="pre"){let p,f=/\r?\n|\r/g,m;for(;p=f.exec(u.text);)m||(m=new Q(z.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Fe(o+p.index,o+p.index+p[0].length,m))}}o=c}if(!r.validEnd){let l=r.fillBefore(z.empty,!0);t.replace(o,o,new Q(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function ER(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Nr(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,a=0,i=0;;--r){let s=t.$from.node(r),o=t.$from.index(r)+a,l=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(o,l,n))return r;if(r==0||s.type.spec.isolating||!ER(s,o,l))break;o&&(a=1),l<s.childCount&&(i=1)}return null}function TR(t,e,n){let{$from:r,$to:a,depth:i}=e,s=r.before(i+1),o=a.after(i+1),l=s,u=o,c=z.empty,d=0;for(let m=i,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,c=z.from(r.node(m).copy(c)),d++):l--;let p=z.empty,f=0;for(let m=i,g=!1;m>n;m--)g||a.after(m+1)<a.end(m)?(g=!0,p=z.from(a.node(m).copy(p)),f++):u++;t.step(new Ue(l,u,s,o,new Q(c.append(p),d,f),c.size-d,!0))}function uh(t,e,n=null,r=t){let a=yR(t,e),i=a&&SR(r,e);return i?a.map($m).concat({type:e,attrs:n}).concat(i.map($m)):null}function $m(t){return{type:t,attrs:null}}function yR(t,e){let{parent:n,startIndex:r,endIndex:a}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,a,s)?i:null}function SR(t,e){let{parent:n,startIndex:r,endIndex:a}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<a;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function AR(t,e,n){let r=z.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let o=n[s].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=z.from(n[s].type.create(n[s].attrs,r))}let a=e.start,i=e.end;t.step(new Ue(a,i,a,i,new Q(r,0,0),n.length,!0))}function NR(t,e,n,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,o)=>{let l=typeof a=="function"?a(s):a;if(s.isTextblock&&!s.hasMarkup(r,l)&&vR(t.doc,t.mapping.slice(i).map(o),r)){let u=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!m?u=!1:!f&&m&&(u=!0)}u===!1&&kA(t,s,o,i),lh(t,t.mapping.slice(i).map(o,1),r,void 0,u===null);let c=t.mapping.slice(i),d=c.map(o,1),p=c.map(o+s.nodeSize,1);return t.step(new Ue(d,p,d+1,p-1,new Q(z.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&xA(t,s,o,i),!1}})}function xA(t,e,n,r){e.forEach((a,i)=>{if(a.isText){let s,o=/\r?\n|\r/g;for(;s=o.exec(a.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function kA(t,e,n,r){e.forEach((a,i)=>{if(a.type==a.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
package/dist/client/assets/{infiniteQueryObserver-DkOiuhUg.js → infiniteQueryObserver-DKiK82rX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a3 as d,av as f,aw as v,ax as x}from"./index-
|
|
1
|
+
import{a3 as d,av as f,aw as v,ax as x}from"./index-B_0vsVr1.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:x(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,v as a,j as d}from"./index-
|
|
1
|
+
import{c as s,v as a,j as d}from"./index-B_0vsVr1.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,v as N}from"./index-
|
|
1
|
+
import{c as z,j as h,r as L,v as N}from"./index-B_0vsVr1.js";import{n as k}from"./Container-CyEPuAYL.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},y={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-8",md:"min-w-12",lg:"min-w-16"},A={"2xs":8,xs:12,sm:16,md:24,lg:32};function q(g){const e=z.c(7),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,x=s??"no-icon";let c;return e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==o||e[4]!==t||e[5]!==x?(c=h.jsx(R,{icon:s,name:o,size:t,className:n,fallbackIcon:l},x),e[0]=n,e[1]=l,e[2]=s,e[3]=o,e[4]=t,e[5]=x,e[6]=c):c=e[6],c}function R(g){const e=z.c(24),{icon:s,name:o,size:u,className:n,fallbackIcon:l}=g,t=u===void 0?"md":u,[x,c]=L.useState(!1),_=!!s&&x,j=C[t],b=y[t];let i;e[0]!==n||e[1]!==j||e[2]!==b?(i=N("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,v=!_&&"hidden";let r;e[4]!==v?(r=N("h-full w-full object-cover",v),e[4]=v,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 E=_&&"hidden";let m;e[12]!==E?(m=N("h-full w-full flex items-center justify-center bg-muted/20",E),e[12]=E,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{q as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,v as r,j as i,ag as p}from"./index-
|
|
1
|
+
import{c as n,v as r,j as i,ag as p}from"./index-B_0vsVr1.js";function c(l){const e=n.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=r("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=i.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 p,r,j as n,a2 as w}from"./index-
|
|
1
|
+
import{c as p,r,j as n,a2 as w}from"./index-B_0vsVr1.js";import{P as x}from"./index-QCmdl8uj.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{c as z,aC as D,j as s,aD as C,v as M,_ as F,r as T,e as J,u as U,O as L,aE as W,P as Z}from"./index-
|
|
1
|
+
import{c as z,aC as D,j as s,aD as C,v as M,_ as F,r as T,e as J,u as U,O as L,aE as W,P as Z}from"./index-B_0vsVr1.js";import{S as v}from"./skeleton-C4ZMp7sl.js";import{u as q}from"./use-project-D96OXk4y.js";import{P as n}from"./index-QCmdl8uj.js";import{b as u,d as B,B as O,a as R,e as E,c as G}from"./breadcrumb-CGrLS5HH.js";import{n as K}from"./Container-CyEPuAYL.js";import{i as Q}from"./LayoutLeft-C-0_xlw0.js";import{t as V}from"./Settings01-BmEB9pVn.js";import{i as X}from"./Zap-5c_DBEtK.js";import"./useQuery-DcRkCB2j.js";import"./constants-D9bRXDQp.js";import"./localstorage-keys-BAzeyS9J.js";import"./useMutation-lBFQDcxE.js";import"./tooltip-Cz-bAWiO.js";import"./index-CvEIDmnk.js";import"./ChevronRight-BT7U8Kip.js";const Y=[{key:"general",label:"General",icon:s.jsx(V,{size:14})},{key:"dependencies",label:"Connections",icon:s.jsx(K,{size:14})},{key:"sidebar",label:"Sidebar",icon:s.jsx(Q,{size:14})},{key:"plugins",label:"Features",icon:s.jsx(X,{size:14})},{key:"danger",label:"Danger Zone",icon:s.jsx(F,{size:14})}];function ee(){const e=z.c(4),{location:l}=D();let r;e[0]!==l?(r=Y.map(i=>{const t=l.pathname.endsWith(`/settings/${i.key}`);return s.jsxs(C,{to:`/$org/$project/projects/$slug/settings/${i.key}`,className:M("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",t?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:i.icon}),s.jsx("span",{className:"truncate",children:i.label})]},i.key)}),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=s.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:r}),e[2]=r,e[3]=o):o=e[3],o}function H(){const e=z.c(3);let l,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(v,{className:"h-6 w-48"}),r=s.jsx(v,{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=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[l,r,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(v,{className:"h-12 w-full"}),s.jsx(v,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function se(){const e=z.c(41);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const r=J(l),{org:o}=U(),i=r.slug,{data:t,isLoading:A}=q(o.id,i);if(A||!t){let x;e[1]!==r.org?(x=s.jsx(u,{children:s.jsx(B,{asChild:!0,children:s.jsx(C,{to:"/$org/$project/projects",params:{org:r.org,project:L},children:"Projects"})})}),e[1]=r.org,e[2]=x):x=e[2];let P;e[3]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(E,{}),e[3]=P):P=e[3];let $;e[4]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(u,{children:s.jsx(G,{children:"Settings"})}),e[4]=$):$=e[4];let f;e[5]!==x?(f=s.jsx(n.Header,{children:s.jsx(n.Header.Left,{children:s.jsx(O,{children:s.jsxs(R,{children:[x,P,$]})})})}),e[5]=x,e[6]=f):f=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(n.Content,{children:s.jsx("div",{className:"p-8",children:s.jsx(H,{})})}),e[7]=k):k=e[7];let N;return e[8]!==f?(N=s.jsxs(n,{children:[f,k]}),e[8]=f,e[9]=N):N=e[9],N}const w=t.slug===L;let h;e[10]!==t.description||e[11]!==t.enabledPlugins||e[12]!==t.id||e[13]!==t.name||e[14]!==t.organizationId||e[15]!==t.slug||e[16]!==t.ui||e[17]!==w?(h={id:t.id,organizationId:t.organizationId,slug:t.slug,name:t.name,description:t.description,enabledPlugins:t.enabledPlugins,ui:t.ui,isOrgAdmin:w},e[10]=t.description,e[11]=t.enabledPlugins,e[12]=t.id,e[13]=t.name,e[14]=t.organizationId,e[15]=t.slug,e[16]=t.ui,e[17]=w,e[18]=h):h=e[18];const I=h;let a;e[19]!==r.org?(a=s.jsx(u,{children:s.jsx(B,{asChild:!0,children:s.jsx(C,{to:"/$org/$project/projects",params:{org:r.org,project:L},children:"Projects"})})}),e[19]=r.org,e[20]=a):a=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(E,{}),e[21]=g):g=e[21];let c;e[22]!==r.org||e[23]!==t.slug?(c={org:r.org,project:t.slug},e[22]=r.org,e[23]=t.slug,e[24]=c):c=e[24];let m;e[25]!==t.name||e[26]!==c?(m=s.jsx(u,{children:s.jsx(B,{asChild:!0,children:s.jsx(C,{to:"/$org/$project",params:c,children:t.name})})}),e[25]=t.name,e[26]=c,e[27]=m):m=e[27];let p;e[28]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(E,{}),e[28]=p):p=e[28];let b;e[29]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(u,{children:s.jsx(G,{children:"Settings"})}),e[29]=b):b=e[29];let d;e[30]!==a||e[31]!==m?(d=s.jsx(n.Header,{children:s.jsx(n.Header.Left,{children:s.jsx(O,{children:s.jsxs(R,{children:[a,g,m,p,b]})})})}),e[30]=a,e[31]=m,e[32]=d):d=e[32];let S;e[33]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ee,{}),e[33]=S):S=e[33];let _;e[34]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(n.Content,{className:"flex",children:[S,s.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:s.jsx(T.Suspense,{fallback:s.jsx(H,{}),children:s.jsx(W,{})})})]}),e[34]=_):_=e[34];let j;e[35]!==d?(j=s.jsxs(n,{children:[d,_]}),e[35]=d,e[36]=j):j=e[36];let y;return e[37]!==I||e[38]!==o||e[39]!==j?(y=s.jsx(Z,{org:o,project:I,children:j}),e[37]=I,e[38]=o,e[39]=j,e[40]=y):y=e[40],y}function pe(){const e=z.c(1);let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(T.Suspense,{fallback:null,children:s.jsx(se,{})}),e[0]=l):l=e[0],l}export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,n as I}from"./index-
|
|
1
|
+
import{c as v,n as I}from"./index-B_0vsVr1.js";import{u as x}from"./useQuery-DcRkCB2j.js";import{u as L}from"./useMutation-lBFQDcxE.js";function M(e){try{return JSON.parse(e)}catch{return}}function y(e,s){const t=localStorage.getItem(e),o=t?M(t):void 0,a=typeof s=="function"?s(o):o??s;if(o===void 0||a!==o)try{const n=JSON.stringify(a);localStorage.setItem(e,n)}catch{}return a}function A(e,s){const t=v.c(25),o=I();let a;t[0]!==e?(a=["localStorage",e],t[0]=e,t[1]=a):a=t[1];const n=a;let r,i;t[2]!==s||t[3]!==e?(r=()=>y(e,s),i=()=>y(e,s),t[2]=s,t[3]=e,t[4]=r,t[5]=i):(r=t[4],i=t[5]);let u;t[6]!==n||t[7]!==r||t[8]!==i?(u={queryKey:n,queryFn:r,initialData:i,staleTime:1/0,gcTime:1/0},t[6]=n,t[7]=r,t[8]=i,t[9]=u):u=t[9];const{data:C}=x(u);let l;t[10]!==e?(l=async c=>{const $=JSON.stringify(c);return localStorage.setItem(e,$),c},t[10]=e,t[11]=l):l=t[11];let m;t[12]!==o||t[13]!==n?(m=c=>{o.setQueryData(n,c)},t[12]=o,t[13]=n,t[14]=m):m=t[14];let h;t[15]!==l||t[16]!==m?(h={mutationFn:l,onSuccess:m},t[15]=l,t[16]=m,t[17]=h):h=t[17];const g=L(h);let f;t[18]!==g||t[19]!==o||t[20]!==n?(f=c=>{const $=o.getQueryData(n),O=typeof c=="function"?c($):c;g.mutate(O)},t[18]=g,t[19]=o,t[20]=n,t[21]=f):f=t[21];const S=f,p=C;let d;return t[22]!==S||t[23]!==p?(d=[p,S],t[22]=S,t[23]=p,t[24]=d):d=t[24],d}const D={assistantChatTasks:e=>`mesh:assistant-chat:tasks:${e}`,messages:(e,s)=>`mesh:messages:${e}:${s}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:e=>`mesh:chat:selectedModel:${e}`,chatSelectedMode:e=>`mesh:chat:selectedMode:${e}`,assistantChatActiveTask:e=>`mesh:assistant-chat:active-task:${e}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:e=>`mesh:store:selected-registry:${e}`,orgHomeQuickstart:e=>`mesh:org-home:quickstart:${e}`,storeShowStdio:()=>"mesh:store:show-stdio",preferences:()=>"mesh:user:preferences",pluginConnection:(e,s)=>`mesh:plugin:connection:${e}:${s}`};export{D as L,A as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aB as T,r as f,d as N,j as e,B as I,v as j,a as Y,S as q,N as G,c as H}from"./index-
|
|
1
|
+
import{aB as T,r as f,d as N,j as e,B as I,v as j,a as Y,S as q,N as G,c as H}from"./index-B_0vsVr1.js";import{u as F}from"./useMutation-lBFQDcxE.js";import{I as C}from"./input-CW7SVowR.js";function J({redirectUrl:s}){const{emailAndPassword:t,resetPassword:u}=T(),[a,l]=f.useState(""),[o,g]=f.useState(""),[p,S]=f.useState(""),[_,P]=f.useState(()=>globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[m,x]=f.useState(""),[k,h]=f.useState(!1),i=_==="signUp",b=_==="forgotPassword",w=F({mutationFn:async({email:r,password:n,name:V})=>{try{if(i){const c=await N.signUp.email({email:r,password:n,name:V||""});if(c.error)throw new Error(c.error.message||"Sign up failed");return c}else{const c=await N.signIn.email({email:r,password:n});if(c.error)throw new Error(c.error.message||"Sign in failed");return c}}catch(c){throw c instanceof Error?c:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),s&&(window.location.href=s)}}),v=F({mutationFn:async({email:r})=>{const n=await N.requestPasswordReset({email:r,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||"Failed to send reset email");return n},onSuccess:()=>{h(!0)}}),L=r=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r),R=()=>{a.trim()&&!L(a)&&x("Invalid email address")},M=r=>{if(r.preventDefault(),!L(a)){x("Invalid email address");return}w.mutate({email:a,password:o,name:p})},D=r=>{if(r.preventDefault(),!L(a)){x("Invalid email address");return}v.mutate({email:a})},E=r=>n=>{r(n.target.value),U&&w.reset(),z&&v.reset(),r===l&&m&&x("")},A=r=>{P(r),S(""),x(""),h(!1),w.reset(),v.reset()},d=w.isPending||v.isPending,U=w.error,z=v.error,y=i?a.trim()&&o.trim()&&p.trim():b?a.trim():a.trim()&&o.trim(),$=r=>{if(!r)return null;const n=r.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?"Invalid email or password. Please try again.":n.includes("already exists")||n.includes("409")?"An account with this email already exists. Try signing in instead.":n.includes("network")||n.includes("fetch")?"Network error. Please check your connection and try again.":n.includes("rate limit")||n.includes("429")?"Too many attempts. Please wait a moment and try again.":r.message||"An error occurred. Please try again."},B=U||z,O=b?"Reset your password":i?"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:O})}),B&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$(B)}),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."}),b&&t.enabled&&!k&&e.jsxs("form",{onSubmit:D,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(C,{type:"email",placeholder:"you@example.com",value:a,onChange:E(l),onBlur:R,required:!0,disabled:d,"aria-invalid":!!m}),m&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:m})]}),e.jsx(I,{type:"submit",disabled:d||!y,className:"w-full font-semibold",size:"lg",children:d?"Sending...":"Send reset link"})]}),!b&&t.enabled&&e.jsxs("form",{onSubmit:M,className:"grid gap-4",children:[e.jsx("div",{className:j("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",i?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:j("p-1",!i&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(C,{type:"text",placeholder:"Your name",value:p,onChange:E(S),required:!0,disabled:d||!i,"aria-hidden":!i})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(C,{type:"email",placeholder:"you@example.com",value:a,onChange:E(l),onBlur:R,required:!0,disabled:d,"aria-invalid":!!m}),m&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:m})]}),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"}),!i&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>A("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(C,{type:"password",placeholder:"••••••••",value:o,onChange:E(g),required:!0,disabled:d})]}),e.jsx("div",{className:j("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",y?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:j("p-1",!y&&"pointer-events-none"),children:e.jsx(I,{type:"submit",disabled:d||!y,className:j("w-full font-semibold"),size:"lg","aria-hidden":!y,children:d?i?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-center",children:b?e.jsx(I,{type:"button",variant:"link",onClick:()=>A("signIn"),disabled:d,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):e.jsx(I,{type:"button",variant:"link",onClick:()=>A(i?"signIn":"signUp"),disabled:d,className:"text-sm text-muted-foreground hover:text-foreground",children:i?"Already have an account? Sign in":"Don't have an account? Sign up"})}),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 K(s){if(!s.client_id||s.response_type!=="code")return null;const t=new URLSearchParams;return s.client_id&&t.set("client_id",s.client_id),s.redirect_uri&&t.set("redirect_uri",s.redirect_uri),s.response_type&&t.set("response_type",s.response_type),s.state&&t.set("state",s.state),s.scope&&t.set("scope",s.scope),s.code_challenge&&t.set("code_challenge",s.code_challenge),s.code_challenge_method&&t.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function Q(s){const t=H.c(5),{callbackURL:u,providerId:a}=s;let l,o;t[0]!==u||t[1]!==a?(l=()=>{(async()=>await N.signIn.sso({providerId:a,callbackURL:u}))()},o=[a,u],t[0]=u,t[1]=a,t[2]=l,t[3]=o):(l=t[2],o=t[3]),f.useEffect(l,o);let g;return t[4]===Symbol.for("react.memo_cache_sentinel")?(g=e.jsx(q,{}),t[4]=g):g=t[4],g}function ee(){const s=N.useSession(),t=Y({from:"/login"}),{next:u="/",client_id:a,redirect_uri:l,response_type:o,state:g,scope:p,code_challenge:S,code_challenge_method:_}=t,{sso:P,emailAndPassword:m,magicLink:x,socialProviders:k}=T(),h=K({client_id:a,redirect_uri:l,response_type:o,state:g,scope:p,code_challenge:S,code_challenge_method:_}),i=h||u;return s.data?h?(window.location.href=h,e.jsx(q,{})):e.jsx(G,{to:u}):P.enabled?e.jsx(Q,{callbackURL:i,providerId:P.providerId}):m.enabled||x.enabled||k.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(J,{redirectUrl:h})]})]}):e.jsx("div",{children:"No login options available"})}export{ee as default};
|