decocms 2.316.0 → 2.316.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BhKIfxeV.js → AlertCircle-CUtXIfwC.js} +1 -1
- package/dist/client/assets/{Archive-Dz0wtILE.js → Archive-Btl9BXLu.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-D2IzKz0U.js → ArrowNarrowLeft-CVkIxPAV.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DQNhEvxd.js → ArrowUpRight-BrfnA0N_.js} +1 -1
- package/dist/client/assets/{Check-B3zx_U26.js → Check-Ccw422Wb.js} +1 -1
- package/dist/client/assets/{CheckCircle-S5ffz95T.js → CheckCircle-C3sPsdSO.js} +1 -1
- package/dist/client/assets/{ChevronDown-B2rzld2y.js → ChevronDown-cpZNJlz9.js} +1 -1
- package/dist/client/assets/{ChevronRight-E3ry5bv1.js → ChevronRight-CeUhrzuf.js} +1 -1
- package/dist/client/assets/{ChevronUp-CR14Z0nx.js → ChevronUp-C-rBrlqd.js} +1 -1
- package/dist/client/assets/{Container-hpy3kvOB.js → Container-OQiFme-7.js} +1 -1
- package/dist/client/assets/{DotsVertical-DlBHJ9PJ.js → DotsVertical-BV7jVmIB.js} +1 -1
- package/dist/client/assets/{LayoutLeft-O15r8yaV.js → LayoutLeft-BuJA8_jK.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CqYIOZ9A.js → LinkExternal01-CRxfzQ_Z.js} +1 -1
- package/dist/client/assets/{Lock01-BWTd97_q.js → Lock01-D2YNxdLq.js} +1 -1
- package/dist/client/assets/{Palette-48b46GGh.js → Palette-By9pNqp1.js} +1 -1
- package/dist/client/assets/{Play-CWd0g6Ov.js → Play-CcNC_puc.js} +1 -1
- package/dist/client/assets/{Plus-Dld8jPbl.js → Plus-D1tHeJo2.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DlZMdaR5.js → RefreshCcw01-BESGm5a8.js} +1 -1
- package/dist/client/assets/{SearchMd-BzVtNNV8.js → SearchMd-eCR8N7AG.js} +1 -1
- package/dist/client/assets/{Settings02-Yw9y8zcL.js → Settings02-xGJb-3cc.js} +1 -1
- package/dist/client/assets/{Shield01-Bryrtn4R.js → Shield01-CA7f1yxn.js} +1 -1
- package/dist/client/assets/{Star01-D7-_AozX.js → Star01-nv1oI22I.js} +1 -1
- package/dist/client/assets/{Sun-BRoJ4FPT.js → Sun-hmutQjwc.js} +1 -1
- package/dist/client/assets/{Tool01-C_J_zDPh.js → Tool01-DmFqON6q.js} +1 -1
- package/dist/client/assets/{Trash01-CWiWK8tz.js → Trash01-IeycYlZQ.js} +1 -1
- package/dist/client/assets/{User01-Cuf_FrNk.js → User01-CnizOinw.js} +1 -1
- package/dist/client/assets/{Users03-BvEJiMrD.js → Users03-y_ec4Rh1.js} +1 -1
- package/dist/client/assets/{X-DCaJ2DR_.js → X-C63lgCLS.js} +1 -1
- package/dist/client/assets/{XCircle-Xm8lpkAu.js → XCircle-BkB1Kg5O.js} +1 -1
- package/dist/client/assets/{XClose-BpbAJCm9.js → XClose-DA8jbEWY.js} +1 -1
- package/dist/client/assets/{Zap-DkdmeY_3.js → Zap-N-AnbCTG.js} +1 -1
- package/dist/client/assets/{ZapSquare-D31ZX-yT.js → ZapSquare-Biue2YhF.js} +1 -1
- package/dist/client/assets/{accordion-D2I2JgOz.js → accordion-C4V_UW2A.js} +1 -1
- package/dist/client/assets/{agent-icon-DIgcdFeV.js → agent-icon-CGz6_qSV.js} +1 -1
- package/dist/client/assets/{agents-list-DJEDnQKa.js → agents-list-TldZe4YF.js} +1 -1
- package/dist/client/assets/{ai-providers-BKQlREzu.js → ai-providers-DGBj5bEk.js} +1 -1
- package/dist/client/assets/{alert-dialog-CoBaZf61.js → alert-dialog-BTkTE2x9.js} +1 -1
- package/dist/client/assets/{auth-catchall-C__PbIds.js → auth-catchall-8PNCF3Wj.js} +1 -1
- package/dist/client/assets/{automation-list-row-BjJTW98i.js → automation-list-row-BY-_98AX.js} +1 -1
- package/dist/client/assets/{automations-sFtOtWq7.js → automations-CqPMUDuQ.js} +1 -1
- package/dist/client/assets/{avatar-C31fe2qO.js → avatar-Bb8VCoXQ.js} +1 -1
- package/dist/client/assets/{badge-wVDQydbB.js → badge-DP5IQfr9.js} +1 -1
- package/dist/client/assets/{brand-context-CQ0dSgsx.js → brand-context-CPtzFC3q.js} +1 -1
- package/dist/client/assets/{card-BsjNx5Cg.js → card-Bl-Rmbpi.js} +1 -1
- package/dist/client/assets/{chat-context-CXqWCM0D.js → chat-context-CZtWWj-u.js} +1 -1
- package/dist/client/assets/{checkbox-B5i71aX9.js → checkbox-B4-n2Voa.js} +1 -1
- package/dist/client/assets/{collection-detail-w94sCgAJ.js → collection-detail-DjrRkSmH.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dy9WKszB.js → collection-display-button-BCIVtUBW.js} +1 -1
- package/dist/client/assets/{collection-search-DRd31o69.js → collection-search-ByjHguQI.js} +1 -1
- package/dist/client/assets/{collection-search-CkG6QTlc.js → collection-search-DEySGVjR.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BIwFJIlS.js → collection-table-wrapper-BQ8LubEz.js} +1 -1
- package/dist/client/assets/{collection-tabs-DZIZ-iDz.js → collection-tabs-CU9XDvba.js} +1 -1
- package/dist/client/assets/{collections-BbDNQEWM.js → collections-D541sKCa.js} +1 -1
- package/dist/client/assets/{command-DGrDaXPR.js → command-MAfm8eaf.js} +1 -1
- package/dist/client/assets/{connection-card-CtNK-usI.js → connection-card-C9CMuiWA.js} +1 -1
- package/dist/client/assets/{connection-detail-Dy49P_Wb.js → connection-detail-Du5PjTQN.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Ck24jZcw.js → connection-form-helpers-1qctTRqV.js} +1 -1
- package/dist/client/assets/{connections-YpkySNNU.js → connections-DYgmyz3C.js} +1 -1
- package/dist/client/assets/{constants-hHr1XnHs.js → constants-CjJyIjLn.js} +1 -1
- package/dist/client/assets/{constants-ClujOLL0.js → constants-CmcFrIt1.js} +1 -1
- package/dist/client/assets/{dialog-DlXEbbro.js → dialog-C8PiJXDq.js} +1 -1
- package/dist/client/assets/{domain-settings-Bk8xfxCT.js → domain-settings-BqGEv34a.js} +1 -1
- package/dist/client/assets/{drawer-PL1KJG8h.js → drawer-SuAP4nw3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DX0TPN0k.js → dropdown-menu-B6XbAhub.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BN4WTDcX.js → dynamic-plugin-layout-zW_YPWvS.js} +1 -1
- package/dist/client/assets/{empty-state-BDuWm3OO.js → empty-state-CG0ziTmf.js} +1 -1
- package/dist/client/assets/{empty-state-D8kZInFe.js → empty-state-ChZyciKg.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D2pRgNGp.js → extract-connection-data-CH0LUcT-.js} +1 -1
- package/dist/client/assets/{features-Cfl0ad_g.js → features-BwQY7IjX.js} +1 -1
- package/dist/client/assets/{form-lvEVsZiS.js → form-C_Vw9izm.js} +1 -1
- package/dist/client/assets/{general-DTam8mrI.js → general-CLqSOIWH.js} +1 -1
- package/dist/client/assets/{index-xu72xd1g.js → index-4sYeFn0S.js} +1 -1
- package/dist/client/assets/{index-Bq8MNgeV.js → index-B3N0ijMe.js} +2 -2
- package/dist/client/assets/{index-CuEDzA2l.js → index-B5tvQ-SE.js} +1 -1
- package/dist/client/assets/{index-DF2eiQ1x.js → index-Bn0UKgPw.js} +1 -1
- package/dist/client/assets/{index-DJVBUrUD.js → index-BtaMjmKz.js} +1 -1
- package/dist/client/assets/{index-mhkzUFBK.js → index-CQv-4_0B.js} +1 -1
- package/dist/client/assets/{index-Ea3ltYi1.js → index-Ccxjprlf.js} +20 -20
- package/dist/client/assets/{index-BRQL1Qy9.js → index-CdOnHCPx.js} +1 -1
- package/dist/client/assets/{index-5QFk1v1j.js → index-CtJF4A1M.js} +1 -1
- package/dist/client/assets/{index-C0JHkPGv.js → index-D07mVDo7.js} +1 -1
- package/dist/client/assets/{index-C-ZizHKt.js → index-D5WZXYzH.js} +1 -1
- package/dist/client/assets/{index-Fz2lfOzM.js → index-DBM1DnAx.js} +1 -1
- package/dist/client/assets/{index-s_hf2jI7.js → index-DIhFNhBy.js} +1 -1
- package/dist/client/assets/{index-n7gxPtHW.js → index-DaDKcZx1.js} +1 -1
- package/dist/client/assets/{index-DhY6sTVx.js → index-MYhsZ8uD.js} +1 -1
- package/dist/client/assets/{index-DaOIazOa.js → index-VVahlVGx.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DKVQWAgx.js → infiniteQueryObserver-CFUccQoY.js} +1 -1
- package/dist/client/assets/{input-DTt32vul.js → input-t1YlgH6I.js} +1 -1
- package/dist/client/assets/{integration-icon-C60b_d7I.js → integration-icon-BtzcxrlN.js} +1 -1
- package/dist/client/assets/{label-BhsxXb5j.js → label-DqZ3xuXa.js} +1 -1
- package/dist/client/assets/{layout-R2hI-PPe.js → layout-CN45dcgI.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-cabC6cgI.js → lean-canvas-recruit-modal-Bjwqo_gw.js} +1 -1
- package/dist/client/assets/{login-Dva0Y2V_.js → login-AnZ_hiQc.js} +1 -1
- package/dist/client/assets/{members-Ou1keNAh.js → members-iSwHLVLc.js} +1 -1
- package/dist/client/assets/{monaco-editor-CMrJ86sf.js → monaco-editor-B-GoBXtk.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-tiSP7a3c.js → monitoring-stats-row-D2ikvjk9.js} +1 -1
- package/dist/client/assets/{oauth-callback-Cz2eV7A_.js → oauth-callback-DZdNeSYS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C9l8YAob.js → oauth-callback-ai-provider-CmcHfY8z.js} +1 -1
- package/dist/client/assets/{onboarding-RgB912Pu.js → onboarding-CSFkAYKn.js} +1 -1
- package/dist/client/assets/{org-layout-B68eO6KC.js → org-layout-MhC4Qi2j.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-Dy7mAYsZ.js → org-plugin-layout-v3On4cF4.js} +1 -1
- package/dist/client/assets/{pair-mPsfY4Tl.js → pair-C3CCgNgt.js} +52 -52
- package/dist/client/assets/{plugin-empty-state-DNUBfOpk.js → plugin-empty-state-A7iG48Mg.js} +1 -1
- package/dist/client/assets/{plugin-header-D-036HBF.js → plugin-header-Bs3leeaa.js} +1 -1
- package/dist/client/assets/{plugin-layout-MmU0m6ZW.js → plugin-layout-BS79Aht2.js} +1 -1
- package/dist/client/assets/{popover-BJlGGBoZ.js → popover-GjQldSsa.js} +1 -1
- package/dist/client/assets/{profile-CDeQH0Ne.js → profile-D-pIBEjg.js} +1 -1
- package/dist/client/assets/{project-app-view-DhcSNy7a.js → project-app-view-BqjrqgzX.js} +1 -1
- package/dist/client/assets/registry-BzLfRgnp.js +2 -0
- package/dist/client/assets/{registry-layout-DjRsP-ha.js → registry-layout-D60NS6tY.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CanoKJcr.js → required-auth-layout-B7ZjdWLg.js} +1 -1
- package/dist/client/assets/{reset-password-CeQ244pS.js → reset-password-CmC0LepN.js} +1 -1
- package/dist/client/assets/{roles-ClefMxwg.js → roles-BsRaXL8k.js} +1 -1
- package/dist/client/assets/{scroll-area-Bg2pYWAU.js → scroll-area-DGuVxP9B.js} +1 -1
- package/dist/client/assets/{search-input-CtBB2Ogw.js → search-input-DUMgPofa.js} +1 -1
- package/dist/client/assets/{select-Bmu7KX9g.js → select-C6LJ-qZk.js} +1 -1
- package/dist/client/assets/{select-model-A6plReXc.js → select-model-CTQ1Ef9H.js} +1 -1
- package/dist/client/assets/{settings-layout-arVQNb4q.js → settings-layout-BORw4NbB.js} +1 -1
- package/dist/client/assets/{settings-section-Bh35ipKE.js → settings-section-BXgkeIdc.js} +1 -1
- package/dist/client/assets/{shell-layout-G1fWb3Wf.js → shell-layout-C-KiCZAL.js} +1 -1
- package/dist/client/assets/{sidebar-CaCy2pvj.js → sidebar-DC8b4t6M.js} +1 -1
- package/dist/client/assets/{skeleton-B2ZrUZa6.js → skeleton-DMpf-C3P.js} +1 -1
- package/dist/client/assets/{spinner-M0_j9E66.js → spinner-BN00SFRY.js} +1 -1
- package/dist/client/assets/{sso-BP3gjZB7.js → sso-Df0_hBqL.js} +1 -1
- package/dist/client/assets/{store-B88v1kcS.js → store-B6hVgdLD.js} +1 -1
- package/dist/client/assets/store-registry-BTMEZZNw.js +2 -0
- package/dist/client/assets/{switch-MKqFhI8u.js → switch-XlpH18pA.js} +1 -1
- package/dist/client/assets/{table-Dpz7V2d2.js → table-0An9LWy-.js} +1 -1
- package/dist/client/assets/{tabs-Jp4EeqTR.js → tabs-O1R9U7Ur.js} +1 -1
- package/dist/client/assets/{task-status-Ch-lJ70q.js → task-status-DIXYIX6U.js} +1 -1
- package/dist/client/assets/{textarea-D4e6a8Nz.js → textarea-BVeCELvS.js} +1 -1
- package/dist/client/assets/{toggle-group-BDnmrZSN.js → toggle-group-BrCYmglG.js} +1 -1
- package/dist/client/assets/{tools-list-DuzUp3Cr.js → tools-list-BBH__HqN.js} +1 -1
- package/dist/client/assets/{tooltip-Cop6BWIB.js → tooltip-D_KYUaTY.js} +1 -1
- package/dist/client/assets/{types-B1bS009C.js → types-D5VFAtuD.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BGcGBNhE.js → use-ai-providers-D1Gd_B23.js} +1 -1
- package/dist/client/assets/{use-collections-8VzaVe93.js → use-collections-Cqjc7P8G.js} +1 -1
- package/dist/client/assets/{use-connection-Lr8heJ8D.js → use-connection-BIHmIl4c.js} +1 -1
- package/dist/client/assets/{use-copy-Cu8-dSUz.js → use-copy-C_1CDwM3.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BobcuW0I.js → use-create-virtual-mcp-CAXfmcVs.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CyEn9Ro2.js → use-debounced-autosave-CHZpR2fH.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CiJL_0vR.js → use-decopilot-events-C4C_kTbf.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CiGpEvZr.js → use-delete-connection-s3Ve1Sl_.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BkIExLyi.js → use-infinite-scroll-BHuVaefo.js} +1 -1
- package/dist/client/assets/{use-list-state-DbpCBDBf.js → use-list-state-BK9s1zn4.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DQxTqUp3.js → use-mcp-tools-CclZhRpl.js} +1 -1
- package/dist/client/assets/{use-members-B_II-0yJ.js → use-members-CZYThJQZ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C4qiakGR.js → use-navigate-to-agent-Cz6wq5hE.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BACib0-t.js → use-org-auth-client-D-j4hyAV.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dam1kDCD.js → use-org-sso-BFDAXwGH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-STx8KC7J.js → use-organization-roles-NjEscIo4.js} +1 -1
- package/dist/client/assets/{use-organization-settings-4FSfpkha.js → use-organization-settings-CNcnwjVj.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Dr0EGoqa.js → use-registry-connections-SMKAO0tY.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DTHvTmo7.js → use-status-sounds-CfCko9iv.js} +1 -1
- package/dist/client/assets/{use-tasks-C2q1pKyD.js → use-tasks-BGvJcXek.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bo1TFi-O.js → use-view-mode-DQdopV9M.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CD_T-y85.js → use-virtual-mcp-fhETXyqA.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-dYBf2D3j.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-02EoyUEK.js +1 -0
- package/dist/client/assets/{user-DOkjJZQI.js → user-CgpKaSQi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Cf3Unpm2.js → view-mode-toggle-f23VJfhB.js} +1 -1
- package/dist/client/assets/{workflow-CQNAZF1P.js → workflow-CpYJf0EI.js} +1 -1
- package/dist/client/assets/workflow-detail-lNDVTwYf.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +52 -37
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/{slice-ansi → ansi-styles}/license +0 -1
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/environment/license +9 -0
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/ink/build/ansi-tokenizer.d.ts +38 -0
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js +316 -0
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js.map +1 -0
- package/dist/server/node_modules/ink/build/apply-styles.js +175 -0
- package/dist/server/node_modules/ink/build/build-layout.js +77 -0
- package/dist/server/node_modules/ink/build/calculate-wrapped-text.js +53 -0
- package/dist/server/node_modules/ink/build/colorize.d.ts +3 -0
- package/dist/server/node_modules/ink/build/colorize.js +48 -0
- package/dist/server/node_modules/ink/build/colorize.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.d.ts +3 -0
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js +5 -0
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/App.d.ts +18 -0
- package/dist/server/node_modules/ink/build/components/App.js +351 -0
- package/dist/server/node_modules/ink/build/components/App.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/AppContext.d.ts +15 -0
- package/dist/server/node_modules/ink/build/components/AppContext.js +11 -0
- package/dist/server/node_modules/ink/build/components/AppContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/BackgroundContext.d.ts +4 -0
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js +3 -0
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Box.d.ts +117 -0
- package/dist/server/node_modules/ink/build/components/Box.js +34 -0
- package/dist/server/node_modules/ink/build/components/Box.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Color.js +62 -0
- package/dist/server/node_modules/ink/build/components/Cursor.d.ts +83 -0
- package/dist/server/node_modules/ink/build/components/Cursor.js +53 -0
- package/dist/server/node_modules/ink/build/components/Cursor.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/CursorContext.d.ts +11 -0
- package/dist/server/node_modules/ink/build/components/CursorContext.js +8 -0
- package/dist/server/node_modules/ink/build/components/CursorContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.d.ts +18 -0
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js +23 -0
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/ErrorOverview.d.ts +6 -0
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js +84 -0
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/FocusContext.d.ts +16 -0
- package/dist/server/node_modules/ink/build/components/FocusContext.js +17 -0
- package/dist/server/node_modules/ink/build/components/FocusContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Newline.d.ts +13 -0
- package/dist/server/node_modules/ink/build/components/Newline.js +8 -0
- package/dist/server/node_modules/ink/build/components/Newline.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Spacer.d.ts +7 -0
- package/dist/server/node_modules/ink/build/components/Spacer.js +11 -0
- package/dist/server/node_modules/ink/build/components/Spacer.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Static.d.ts +24 -0
- package/dist/server/node_modules/ink/build/components/Static.js +28 -0
- package/dist/server/node_modules/ink/build/components/Static.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/StderrContext.d.ts +15 -0
- package/dist/server/node_modules/ink/build/components/StderrContext.js +13 -0
- package/dist/server/node_modules/ink/build/components/StderrContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/StdinContext.d.ts +22 -0
- package/dist/server/node_modules/ink/build/components/StdinContext.js +19 -0
- package/dist/server/node_modules/ink/build/components/StdinContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/StdoutContext.d.ts +15 -0
- package/dist/server/node_modules/ink/build/components/StdoutContext.js +13 -0
- package/dist/server/node_modules/ink/build/components/StdoutContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Text.d.ts +55 -0
- package/dist/server/node_modules/ink/build/components/Text.js +50 -0
- package/dist/server/node_modules/ink/build/components/Text.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Transform.d.ts +16 -0
- package/dist/server/node_modules/ink/build/components/Transform.js +15 -0
- package/dist/server/node_modules/ink/build/components/Transform.js.map +1 -0
- package/dist/server/node_modules/ink/build/cursor-helpers.d.ts +38 -0
- package/dist/server/node_modules/ink/build/cursor-helpers.js +56 -0
- package/dist/server/node_modules/ink/build/cursor-helpers.js.map +1 -0
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.d.ts +1 -0
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js +65 -0
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js.map +1 -0
- package/dist/server/node_modules/ink/build/devtools.d.ts +1 -0
- package/dist/server/node_modules/ink/build/devtools.js +11 -0
- package/dist/server/node_modules/ink/build/devtools.js.map +1 -0
- package/dist/server/node_modules/ink/build/dom.d.ts +56 -0
- package/dist/server/node_modules/ink/build/dom.js +124 -0
- package/dist/server/node_modules/ink/build/dom.js.map +1 -0
- package/dist/server/node_modules/ink/build/experimental/apply-style.js +140 -0
- package/dist/server/node_modules/ink/build/experimental/dom.js +123 -0
- package/dist/server/node_modules/ink/build/experimental/output.js +91 -0
- package/dist/server/node_modules/ink/build/experimental/reconciler.js +141 -0
- package/dist/server/node_modules/ink/build/experimental/renderer.js +81 -0
- package/dist/server/node_modules/ink/build/get-max-width.d.ts +3 -0
- package/dist/server/node_modules/ink/build/get-max-width.js +10 -0
- package/dist/server/node_modules/ink/build/get-max-width.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-app.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-app.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-app.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-cursor.d.ts +12 -0
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js +29 -0
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.d.ts +28 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js +17 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus.d.ts +29 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus.js +42 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-input.d.ts +131 -0
- package/dist/server/node_modules/ink/build/hooks/use-input.js +124 -0
- package/dist/server/node_modules/ink/build/hooks/use-input.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +11 -0
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-stderr.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdin.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdout.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/useInput.js +38 -0
- package/dist/server/node_modules/ink/build/index.d.ts +34 -0
- package/dist/server/node_modules/ink/build/index.js +20 -0
- package/dist/server/node_modules/ink/build/index.js.map +1 -0
- package/dist/server/node_modules/ink/build/ink.d.ts +90 -0
- package/dist/server/node_modules/ink/build/ink.js +637 -0
- package/dist/server/node_modules/ink/build/ink.js.map +1 -0
- package/dist/server/node_modules/ink/build/input-parser.d.ts +7 -0
- package/dist/server/node_modules/ink/build/input-parser.js +154 -0
- package/dist/server/node_modules/ink/build/input-parser.js.map +1 -0
- package/dist/server/node_modules/ink/build/instance.js +205 -0
- package/dist/server/node_modules/ink/build/instances.d.ts +3 -0
- package/dist/server/node_modules/ink/build/instances.js +8 -0
- package/dist/server/node_modules/ink/build/instances.js.map +1 -0
- package/dist/server/node_modules/ink/build/kitty-keyboard.d.ts +23 -0
- package/dist/server/node_modules/ink/build/kitty-keyboard.js +32 -0
- package/dist/server/node_modules/ink/build/kitty-keyboard.js.map +1 -0
- package/dist/server/node_modules/ink/build/layout.d.ts +7 -0
- package/dist/server/node_modules/ink/build/layout.js +33 -0
- package/dist/server/node_modules/ink/build/layout.js.map +1 -0
- package/dist/server/node_modules/ink/build/log-update.d.ts +19 -0
- package/dist/server/node_modules/ink/build/log-update.js +242 -0
- package/dist/server/node_modules/ink/build/log-update.js.map +1 -0
- package/dist/server/node_modules/ink/build/measure-element.d.ts +16 -0
- package/dist/server/node_modules/ink/build/measure-element.js +9 -0
- package/dist/server/node_modules/ink/build/measure-element.js.map +1 -0
- package/dist/server/node_modules/ink/build/measure-text.d.ts +6 -0
- package/dist/server/node_modules/ink/build/measure-text.js +21 -0
- package/dist/server/node_modules/ink/build/measure-text.js.map +1 -0
- package/dist/server/node_modules/ink/build/options.d.ts +52 -0
- package/dist/server/node_modules/ink/build/options.js +2 -0
- package/dist/server/node_modules/ink/build/options.js.map +1 -0
- package/dist/server/node_modules/ink/build/output.d.ts +35 -0
- package/dist/server/node_modules/ink/build/output.js +183 -0
- package/dist/server/node_modules/ink/build/output.js.map +1 -0
- package/dist/server/node_modules/ink/build/parse-keypress.d.ts +22 -0
- package/dist/server/node_modules/ink/build/parse-keypress.js +493 -0
- package/dist/server/node_modules/ink/build/parse-keypress.js.map +1 -0
- package/dist/server/node_modules/ink/build/reconciler.d.ts +4 -0
- package/dist/server/node_modules/ink/build/reconciler.js +274 -0
- package/dist/server/node_modules/ink/build/reconciler.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-background.d.ts +4 -0
- package/dist/server/node_modules/ink/build/render-background.js +25 -0
- package/dist/server/node_modules/ink/build/render-background.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-border.d.ts +4 -0
- package/dist/server/node_modules/ink/build/render-border.js +73 -0
- package/dist/server/node_modules/ink/build/render-border.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-node-to-output.d.ts +14 -0
- package/dist/server/node_modules/ink/build/render-node-to-output.js +147 -0
- package/dist/server/node_modules/ink/build/render-node-to-output.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-to-string.d.ts +38 -0
- package/dist/server/node_modules/ink/build/render-to-string.js +115 -0
- package/dist/server/node_modules/ink/build/render-to-string.js.map +1 -0
- package/dist/server/node_modules/ink/build/render.d.ts +121 -0
- package/dist/server/node_modules/ink/build/render.js +55 -0
- package/dist/server/node_modules/ink/build/render.js.map +1 -0
- package/dist/server/node_modules/ink/build/renderer.d.ts +8 -0
- package/dist/server/node_modules/ink/build/renderer.js +55 -0
- package/dist/server/node_modules/ink/build/renderer.js.map +1 -0
- package/dist/server/node_modules/ink/build/sanitize-ansi.d.ts +2 -0
- package/dist/server/node_modules/ink/build/sanitize-ansi.js +27 -0
- package/dist/server/node_modules/ink/build/sanitize-ansi.js.map +1 -0
- package/dist/server/node_modules/ink/build/screen-reader-update.d.ts +13 -0
- package/dist/server/node_modules/ink/build/screen-reader-update.js +38 -0
- package/dist/server/node_modules/ink/build/screen-reader-update.js.map +1 -0
- package/dist/server/node_modules/ink/build/squash-text-nodes.d.ts +3 -0
- package/dist/server/node_modules/ink/build/squash-text-nodes.js +36 -0
- package/dist/server/node_modules/ink/build/squash-text-nodes.js.map +1 -0
- package/dist/server/node_modules/ink/build/styles.d.ts +240 -0
- package/dist/server/node_modules/ink/build/styles.js +232 -0
- package/dist/server/node_modules/ink/build/styles.js.map +1 -0
- package/dist/server/node_modules/ink/build/utils.d.ts +2 -0
- package/dist/server/node_modules/ink/build/utils.js +4 -0
- package/dist/server/node_modules/ink/build/utils.js.map +1 -0
- package/dist/server/node_modules/ink/build/wrap-text.d.ts +3 -0
- package/dist/server/node_modules/ink/build/wrap-text.js +31 -0
- package/dist/server/node_modules/ink/build/wrap-text.js.map +1 -0
- package/dist/server/node_modules/ink/build/write-synchronized.d.ts +4 -0
- package/dist/server/node_modules/ink/build/write-synchronized.js +7 -0
- package/dist/server/node_modules/ink/build/write-synchronized.js.map +1 -0
- package/dist/server/node_modules/ink/license +10 -0
- package/dist/server/node_modules/ink/package.json +201 -0
- package/dist/server/node_modules/ink/readme.md +2636 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/restore-cursor/index.d.ts +11 -0
- package/dist/server/node_modules/restore-cursor/index.js +11 -0
- package/dist/server/node_modules/restore-cursor/license +9 -0
- package/dist/server/node_modules/restore-cursor/package.json +55 -0
- package/dist/server/node_modules/restore-cursor/readme.md +31 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/dist/server/server.js +51 -36
- package/package.json +1 -1
- package/dist/client/assets/registry-CXcvF-uz.js +0 -2
- package/dist/client/assets/store-registry-BebL2rFu.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Dj_RSaBx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DJb5VXkS.js +0 -1
- package/dist/client/assets/workflow-detail-E-UgwIFZ.js +0 -1
- package/dist/server/node_modules/slice-ansi/index.d.ts +0 -19
- package/dist/server/node_modules/slice-ansi/index.js +0 -260
- package/dist/server/node_modules/slice-ansi/package.json +0 -59
- package/dist/server/node_modules/slice-ansi/readme.md +0 -54
- package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +0 -752
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-Bs3leeaa.js","assets/Check-Ccw422Wb.js","assets/ChevronDown-cpZNJlz9.js","assets/login-AnZ_hiQc.js","assets/input-t1YlgH6I.js","assets/reset-password-CmC0LepN.js","assets/shell-layout-C-KiCZAL.js","assets/dialog-C8PiJXDq.js","assets/X-C63lgCLS.js","assets/required-auth-layout-B7ZjdWLg.js","assets/use-tasks-BGvJcXek.js","assets/use-collections-Cqjc7P8G.js","assets/constants-CmcFrIt1.js","assets/use-organization-settings-CNcnwjVj.js","assets/use-org-sso-BFDAXwGH.js","assets/Lock01-D2YNxdLq.js","assets/Archive-Btl9BXLu.js","assets/onboarding-CSFkAYKn.js","assets/label-DqZ3xuXa.js","assets/Users03-y_ec4Rh1.js","assets/CheckCircle-C3sPsdSO.js","assets/Palette-By9pNqp1.js","assets/index-D5WZXYzH.js","assets/sidebar-DC8b4t6M.js","assets/LayoutLeft-BuJA8_jK.js","assets/tooltip-D_KYUaTY.js","assets/ZapSquare-Biue2YhF.js","assets/index-CdOnHCPx.js","assets/agent-icon-CGz6_qSV.js","assets/AlertCircle-CUtXIfwC.js","assets/Tool01-DmFqON6q.js","assets/XClose-DA8jbEWY.js","assets/RefreshCcw01-BESGm5a8.js","assets/ArrowNarrowLeft-CVkIxPAV.js","assets/XCircle-BkB1Kg5O.js","assets/ArrowUpRight-BrfnA0N_.js","assets/ChevronRight-CeUhrzuf.js","assets/ChevronUp-C-rBrlqd.js","assets/DotsVertical-BV7jVmIB.js","assets/Container-OQiFme-7.js","assets/Star01-nv1oI22I.js","assets/SearchMd-eCR8N7AG.js","assets/LinkExternal01-CRxfzQ_Z.js","assets/Sun-hmutQjwc.js","assets/Play-CcNC_puc.js","assets/Plus-D1tHeJo2.js","assets/Settings02-xGJb-3cc.js","assets/Shield01-CA7f1yxn.js","assets/Trash01-IeycYlZQ.js","assets/User01-CnizOinw.js","assets/Zap-N-AnbCTG.js","assets/pair-C3CCgNgt.js","assets/index-CQv-4_0B.js","assets/use-copy-C_1CDwM3.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-D5VFAtuD.js","assets/chat-context-CZtWWj-u.js","assets/use-virtual-mcp-fhETXyqA.js","assets/use-ai-providers-D1Gd_B23.js","assets/use-decopilot-events-C4C_kTbf.js","assets/create-sse-subscription-CxkOgzKf.js","assets/integration-icon-BtzcxrlN.js","assets/skeleton-DMpf-C3P.js","assets/popover-GjQldSsa.js","assets/drawer-SuAP4nw3.js","assets/avatar-Bb8VCoXQ.js","assets/alert-dialog-BTkTE2x9.js","assets/form-C_Vw9izm.js","assets/spinner-BN00SFRY.js","assets/index-B5tvQ-SE.js","assets/use-mcp-tools-CclZhRpl.js","assets/index-DaDKcZx1.js","assets/switch-XlpH18pA.js","assets/use-connection-BIHmIl4c.js","assets/lean-canvas-recruit-modal-Bjwqo_gw.js","assets/use-navigate-to-agent-Cz6wq5hE.js","assets/collection-search-DEySGVjR.js","assets/checkbox-B4-n2Voa.js","assets/extract-connection-data-CH0LUcT-.js","assets/constants-CjJyIjLn.js","assets/collections-D541sKCa.js","assets/tabs-O1R9U7Ur.js","assets/select-C6LJ-qZk.js","assets/toggle-group-BrCYmglG.js","assets/select-model-CTQ1Ef9H.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-BXgkeIdc.js","assets/card-Bl-Rmbpi.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/dropdown-menu-B6XbAhub.js","assets/index-CtJF4A1M.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-C9CMuiWA.js","assets/use-registry-connections-SMKAO0tY.js","assets/useInfiniteQuery-dYBf2D3j.js","assets/infiniteQueryObserver-CFUccQoY.js","assets/collection-tabs-CU9XDvba.js","assets/badge-DP5IQfr9.js","assets/textarea-BVeCELvS.js","assets/connection-form-helpers-1qctTRqV.js","assets/use-infinite-scroll-BHuVaefo.js","assets/useSuspenseInfiniteQuery-02EoyUEK.js","assets/collection-search-ByjHguQI.js","assets/use-create-virtual-mcp-CAXfmcVs.js","assets/empty-state-ChZyciKg.js","assets/task-status-DIXYIX6U.js","assets/index-Ccxjprlf.js","assets/command-MAfm8eaf.js","assets/index-DIhFNhBy.js","assets/use-status-sounds-CfCko9iv.js","assets/accordion-C4V_UW2A.js","assets/user-CgpKaSQi.js","assets/tools-list-BBH__HqN.js","assets/use-debounced-autosave-CHZpR2fH.js","assets/scroll-area-DGuVxP9B.js","assets/index-Bn0UKgPw.js","assets/view-mode-toggle-f23VJfhB.js","assets/automation-list-row-BY-_98AX.js","assets/search-input-DUMgPofa.js","assets/index-DDGTF8rc.css","assets/index-BtaMjmKz.js","assets/settings-layout-BORw4NbB.js","assets/connections-DYgmyz3C.js","assets/collection-display-button-BCIVtUBW.js","assets/use-delete-connection-s3Ve1Sl_.js","assets/use-list-state-BK9s1zn4.js","assets/use-view-mode-DQdopV9M.js","assets/connection-detail-Du5PjTQN.js","assets/index-4sYeFn0S.js","assets/index-MYhsZ8uD.js","assets/index-VVahlVGx.js","assets/use-members-CZYThJQZ.js","assets/use-org-auth-client-D-j4hyAV.js","assets/layout-CN45dcgI.js","assets/monitoring-stats-row-D2ikvjk9.js","assets/collection-detail-DjrRkSmH.js","assets/index-DBM1DnAx.js","assets/monaco-editor-B-GoBXtk.js","assets/empty-state-CG0ziTmf.js","assets/index-D07mVDo7.js","assets/table-0An9LWy-.js","assets/general-CLqSOIWH.js","assets/domain-settings-BqGEv34a.js","assets/features-BwQY7IjX.js","assets/brand-context-CPtzFC3q.js","assets/ai-providers-DGBj5bEk.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/members-iSwHLVLc.js","assets/collection-table-wrapper-BQ8LubEz.js","assets/use-organization-roles-NjEscIo4.js","assets/roles-BsRaXL8k.js","assets/sso-Df0_hBqL.js","assets/profile-D-pIBEjg.js","assets/store-B6hVgdLD.js","assets/workflow-CpYJf0EI.js","assets/workflow-detail-lNDVTwYf.js","assets/org-plugin-layout-v3On4cF4.js","assets/plugin-layout-BS79Aht2.js","assets/agents-list-TldZe4YF.js","assets/automations-CqPMUDuQ.js","assets/dynamic-plugin-layout-zW_YPWvS.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function F$(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const B$="modulepreload",V$=function(e){return"/"+e},J2={},At=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=l(n.map(f=>{if(f=V$(f),f in J2)return;J2[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":B$,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var tle=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var __={exports:{}},Bu={};var eO;function q$(){if(eO)return Bu;eO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Bu.Fragment=t,Bu.jsx=n,Bu.jsxs=n,Bu}var tO;function H$(){return tO||(tO=1,__.exports=q$()),__.exports}var T=H$(),y_={exports:{}},Vu={},b_={exports:{}},w_={};var nO;function G$(){return nO||(nO=1,(function(e){function t(q,W){var ee=q.length;q.push(W);e:for(;0<ee;){var ae=ee-1>>>1,Q=q[ae];if(0<i(Q,W))q[ae]=W,q[ee]=Q,ee=ae;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],ee=q.pop();if(ee!==W){q[0]=ee;e:for(var ae=0,Q=q.length,k=Q>>>1;ae<k;){var K=2*(ae+1)-1,V=q[K],D=K+1,F=q[D];if(0>i(V,ee))D<Q&&0>i(F,V)?(q[ae]=F,q[D]=ee,ae=D):(q[ae]=V,q[K]=ee,ae=K);else if(D<Q&&0>i(F,ee))q[ae]=F,q[D]=ee,ae=D;else break e}}return W}function i(q,W){var ee=q.sortIndex-W.sortIndex;return ee!==0?ee:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],m=1,p=null,g=3,v=!1,y=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,C(q),!y)if(n(d)!==null)y=!0,A||(A=!0,B());else{var W=n(f);W!==null&&re(O,W.startTime-q)}}var A=!1,M=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(M),M=-1),v=!0;var ee=g;try{t:{for(C(q),p=n(d);p!==null&&!(p.expirationTime>q&&H());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var Q=ae(p.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){p.callback=Q,C(q),W=!0;break t}p===n(d)&&r(d),C(q)}else r(d);p=n(d)}if(p!==null)W=!0;else{var k=n(f);k!==null&&re(O,k.startTime-q),W=!1}}break e}finally{p=null,g=ee,v=!1}W=void 0}}finally{W?B():A=!1}}}var B;if(typeof R=="function")B=function(){R(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=j,B=function(){Z.postMessage(null)}}else B=function(){S(j,0)};function re(q,W){M=S(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var ee=g;g=W;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return W()}finally{g=ee}},e.unstable_scheduleCallback=function(q,W,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,q={id:m++,callback:W,priorityLevel:q,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ae?(q.sortIndex=ee,t(f,q),n(d)===null&&q===n(f)&&(b?(E(M),M=-1):b=!0,re(O,ee-ae))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,B()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var ee=g;g=W;try{return q.apply(this,arguments)}finally{g=ee}}}})(w_)),w_}var rO;function K$(){return rO||(rO=1,b_.exports=G$()),b_.exports}var S_={exports:{}},rt={};var iO;function Z$(){if(iO)return rt;iO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,K,V){this.props=k,this.context=K,this.refs=x,this.updater=V||y}S.prototype.isReactComponent={},S.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,K,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function R(k,K,V){this.props=k,this.context=K,this.refs=x,this.updater=V||y}var C=R.prototype=new E;C.constructor=R,b(C,S.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,K,V){var D=V.ref;return{$$typeof:e,type:k,key:K,ref:D!==void 0?D:null,props:V}}function H(k,K){return L(k.type,K,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function B(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(V){return K[V]})}var U=/\/+/g;function Z(k,K){return typeof k=="object"&&k!==null&&k.key!=null?B(""+k.key):K.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,K,V,D,F){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case m:return fe=k._init,q(fe(k._payload),K,V,D,F)}}if(fe)return F=F(k),fe=D===""?"."+Z(k,0):D,O(F)?(V="",fe!=null&&(V=fe.replace(U,"$&/")+"/"),q(F,K,V,"",function(Ue){return Ue})):F!=null&&(j(F)&&(F=H(F,V+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(U,"$&/")+"/")+fe)),K.push(F)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,K,V,X,F);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,K,V,X,F);else if(X==="object"){if(typeof k.then=="function")return q(re(k),K,V,D,F);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,K,V){if(k==null)return k;var D=[],F=0;return q(k,D,"","",function(X){return K.call(V,X,F++)}),D}function ee(k){if(k._status===-1){var K=k._result;K=K(),K.then(function(V){(k._status===0||k._status===-1)&&(k._status=1,k._result=V)},function(V){(k._status===0||k._status===-1)&&(k._status=2,k._result=V)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,K,V){W(k,function(){K.apply(this,arguments)},V)},count:function(k){var K=0;return W(k,function(){K++}),K},toArray:function(k){return W(k,function(K){return K})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return rt.Activity=p,rt.Children=Q,rt.Component=S,rt.Fragment=n,rt.Profiler=i,rt.PureComponent=R,rt.StrictMode=r,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,rt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},rt.cache=function(k){return function(){return k.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(k,K,V){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),F=k.key;if(K!=null)for(X in K.key!==void 0&&(F=""+K.key),K)!P.call(K,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&K.ref===void 0||(D[X]=K[X]);var X=arguments.length-2;if(X===1)D.children=V;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,F,D)},rt.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},rt.createElement=function(k,K,V){var D,F={},X=null;if(K!=null)for(D in K.key!==void 0&&(X=""+K.key),K)P.call(K,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=K[D]);var fe=arguments.length-2;if(fe===1)F.children=V;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];F.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)F[D]===void 0&&(F[D]=fe[D]);return L(k,X,F)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(k){return{$$typeof:c,render:k}},rt.isValidElement=j,rt.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:ee}},rt.memo=function(k,K){return{$$typeof:f,type:k,compare:K===void 0?null:K}},rt.startTransition=function(k){var K=M.T,V={};M.T=V;try{var D=k(),F=M.S;F!==null&&F(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,ae)}catch(X){ae(X)}finally{K!==null&&V.types!==null&&(K.types=V.types),M.T=K}},rt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},rt.use=function(k){return M.H.use(k)},rt.useActionState=function(k,K,V){return M.H.useActionState(k,K,V)},rt.useCallback=function(k,K){return M.H.useCallback(k,K)},rt.useContext=function(k){return M.H.useContext(k)},rt.useDebugValue=function(){},rt.useDeferredValue=function(k,K){return M.H.useDeferredValue(k,K)},rt.useEffect=function(k,K){return M.H.useEffect(k,K)},rt.useEffectEvent=function(k){return M.H.useEffectEvent(k)},rt.useId=function(){return M.H.useId()},rt.useImperativeHandle=function(k,K,V){return M.H.useImperativeHandle(k,K,V)},rt.useInsertionEffect=function(k,K){return M.H.useInsertionEffect(k,K)},rt.useLayoutEffect=function(k,K){return M.H.useLayoutEffect(k,K)},rt.useMemo=function(k,K){return M.H.useMemo(k,K)},rt.useOptimistic=function(k,K){return M.H.useOptimistic(k,K)},rt.useReducer=function(k,K,V){return M.H.useReducer(k,K,V)},rt.useRef=function(k){return M.H.useRef(k)},rt.useState=function(k){return M.H.useState(k)},rt.useSyncExternalStore=function(k,K,V){return M.H.useSyncExternalStore(k,K,V)},rt.useTransition=function(){return M.H.useTransition()},rt.version="19.2.5",rt}var oO;function ca(){return oO||(oO=1,S_.exports=Z$()),S_.exports}var E_={exports:{}},yr={};var sO;function Y$(){if(sO)return yr;sO=1;var e=ca();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},yr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},yr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},yr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},yr.requestFormReset=function(d){r.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},yr.useFormStatus=function(){return l.H.useHostTransitionStatus()},yr.version="19.2.5",yr}var aO;function MM(){if(aO)return E_.exports;aO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),E_.exports=Y$(),E_.exports}var lO;function W$(){if(lO)return Vu;lO=1;var e=K$(),t=ca(),n=MM();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,u=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(u=a.return),o=a.return;while(o)}return a.tag===3?u:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function d(o){if(s(o)!==o)throw Error(r(188))}function f(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var u=o,h=a;;){var _=u.return;if(_===null)break;var w=_.alternate;if(w===null){if(h=_.return,h!==null){u=h;continue}break}if(_.child===w.child){for(w=_.child;w;){if(w===u)return d(_),o;if(w===h)return d(_),a;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=_,h=w;else{for(var N=!1,$=_.child;$;){if($===u){N=!0,u=_,h=w;break}if($===h){N=!0,h=_,u=w;break}$=$.sibling}if(!N){for($=w.child;$;){if($===u){N=!0,u=w,h=_;break}if($===h){N=!0,h=w,u=_;break}$=$.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:a}function m(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=m(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function B(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function Z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case R:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return a=o.displayName||null,a!==null?a:Z(o.type)||"Memo";case P:a=o._payload,o=o._init;try{return Z(o(a))}catch{}}return null}var re=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],Q=-1;function k(o){return{current:o}}function K(o){0>Q||(o.current=ae[Q],ae[Q]=null,Q--)}function V(o,a){Q++,ae[Q]=o.current,o.current=a}var D=k(null),F=k(null),X=k(null),fe=k(null);function pe(o,a){switch(V(X,a),V(F,o),V(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?S2(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=S2(a),o=E2(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(D),V(D,o)}function xe(){K(D),K(F),K(X)}function Ue(o){o.memoizedState!==null&&V(fe,o);var a=D.current,u=E2(a,o.type);a!==u&&(V(F,o),V(D,u))}function Y(o){F.current===o&&(K(D),K(F)),fe.current===o&&(K(fe),ju._currentValue=ee)}var te,ve;function se(o){if(te===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",ve=-1<u.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+te+o+ve}var we=!1;function Oe(o,a){if(!o||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var he=ge}Reflect.construct(o,[],Se)}else{try{Se.call()}catch(ge){he=ge}o.call(Se.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Se=o())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),N=w[0],$=w[1];if(N&&$){var J=N.split(`
|
|
@@ -168,4 +168,4 @@ ${r}
|
|
|
168
168
|
${r}
|
|
169
169
|
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
170
170
|
|
|
171
|
-
`),document.head.appendChild(r)}}function eae(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:KM.publicConfig(),queryFn:Xse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=GM(r),[s]=Wse();i.internalUrl&&zse(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Jse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const tae=new wj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function nae(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(pH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(UD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(Sj,{client:tae,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(eae,{children:T.jsx($j,{children:T.jsx(Bee,{children:T.jsx(Qne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function rae(...e){return VP(pw(e))}const iae=b4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function W1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?jw:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=rae(iae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const AM="__mesh_chunk_reload_ts";function IM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class oce extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),DD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class oae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=IM(t);if(DD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(AM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(AM,String(s)),window.location.reload())}render(){return this.state.hasError&&IM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(jD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(W1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const sae="MCP Workflows",aae="Create workflows using your MCP tools",lae=I.lazy(()=>At(()=>import("./plugin-header-D-036HBF.js"),__vite__mapDeps([0,1,2]))),cae=I.lazy(()=>At(()=>import("./plugin-empty-state-DNUBfOpk.js"),[])),uae={id:sae,description:aae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(lae,{...e}),renderEmptyState:()=>T.jsx(cae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(LD,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},dae=[uae],ma=n7({component:()=>T.jsx(oae,{children:T.jsx(nae,{children:T.jsx(I.Suspense,{fallback:T.jsx(UD,{}),children:T.jsx(gP,{})})})})}),fae=mt({getParentRoute:()=>ma,path:"/login",component:It(()=>At(()=>import("./login-Dva0Y2V_.js"),__vite__mapDeps([3,4]))),validateSearch:ul(()=>Ee({next:z().optional(),client_id:z().optional(),redirect_uri:z().optional(),response_type:z().optional(),state:z().optional(),scope:z().optional(),code_challenge:z().optional(),code_challenge_method:z().optional()}))}),hae=mt({getParentRoute:()=>ma,path:"/reset-password",component:It(()=>At(()=>import("./reset-password-CeQ244pS.js"),__vite__mapDeps([5,4]))),validateSearch:ul(()=>Ee({token:z().optional(),error:z().optional()}))}),pae=mt({getParentRoute:()=>ma,path:"/auth/$pathname",component:It(()=>At(()=>import("./auth-catchall-C__PbIds.js"),[]))}),mae=mt({getParentRoute:()=>ma,path:"/oauth/callback",component:It(()=>At(()=>import("./oauth-callback-Cz2eV7A_.js"),[]))}),gae=mt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:It(()=>At(()=>import("./oauth-callback-ai-provider-C9l8YAob.js"),[]))}),iE=mt({getParentRoute:()=>ma,id:"shell",component:It(()=>At(()=>import("./shell-layout-G1fWb3Wf.js").then(e=>e.s),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16])))}),vae=mt({getParentRoute:()=>iE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=e.filter(i=>!i.metadata?.archived),n=localStorage.getItem(Rg.lastOrgSlug());if(n){if(t.some(s=>s.slug===n))throw Oc({to:"/$org",params:{org:n}});localStorage.removeItem(Rg.lastOrgSlug())}const r=t[0];throw Oc(r?{to:"/$org",params:{org:r.slug}}:{to:"/onboarding"})}}),_ae=mt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list(),t=e?.filter(n=>!n.metadata?.archived);if(t&&t.length>0)throw Oc({to:"/"})},component:It(()=>At(()=>import("./onboarding-RgB912Pu.js"),__vite__mapDeps([17,9,4,18,19,20,21])))}),oE=mt({getParentRoute:()=>iE,path:"/$org",component:It(()=>At(()=>import("./org-layout-B68eO6KC.js"),[]))}),sE=mt({getParentRoute:()=>oE,id:"org-shell",component:It(()=>At(()=>import("./index-C-ZizHKt.js"),__vite__mapDeps([22,23,24,25,8,26,27,28,29,30,16,31,32,33,34,35,19,20,1,2,36,37,38,39,40,21,41,42,15,43,44,45,46,47,48,49,50,6,7,9,10,11,12,13,14,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,18,4,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107])))}),aE=mt({getParentRoute:()=>sE,id:"agent-shell",component:It(()=>At(()=>import("./index-Ea3ltYi1.js"),__vite__mapDeps([108,72,7,8,73,4,74,11,12,75,76,58,32,77,41,78,1,15,28,29,30,16,31,33,34,35,26,19,20,2,36,37,38,39,40,21,24,42,43,44,45,46,47,48,49,50,79,80,81,65,25,62,71,57,59,60,61,10,13,6,9,14,51,52,53,54,55,56,69,82,68,18,83,84,85,63,86,66,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,109,110,64,27,23,67,70,104,105,106,107,111,112,113,114,115,116,117,118,119,120,121])))}),yae=Ee({virtualmcpid:z().optional(),tab:z().optional(),main:z().optional(),id:z().optional(),toolName:z().optional(),tasks:St().optional(),mainOpen:St().optional(),chat:St().optional(),autosend:z().optional()}),T6=mt({getParentRoute:()=>aE,path:"/$taskId",validateSearch:yae,component:()=>null}),bae=mt({getParentRoute:()=>sE,path:"/",component:It(()=>At(()=>import("./index-DJVBUrUD.js"),__vite__mapDeps([122,25,62,39,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,40,21,41,24,42,15,43,44,45,46,47,48,49,8,50,63,12,58,11,13,75,76,7,77,78,74,79,80,81,65,71,72,73,4,57,59,60,61,10,6,9,14,51,52,53,54,55,56,69,82,68,18,83,84,85,86,66,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,105])))}),Pn=mt({getParentRoute:()=>oE,path:"/settings",component:It(()=>At(()=>import("./settings-layout-arVQNb4q.js"),__vite__mapDeps([123,23,24,25,8,117,33,26,19,36,15,47,49,50,111,92,60,61])))}),wae=mt({getParentRoute:()=>Pn,path:"/",beforeLoad:({params:e})=>{throw Oc({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),Sae=mt({getParentRoute:()=>Pn,path:"/connections",component:It(()=>At(()=>import("./connections-YpkySNNU.js"),__vite__mapDeps([124,80,81,125,90,1,36,38,31,25,118,99,120,41,98,94,93,95,74,11,12,13,96,97,79,88,62,39,28,29,30,16,32,33,34,35,26,19,20,2,37,40,21,24,42,15,43,44,45,46,47,48,49,8,50,106,117,23,126,67,102,127,128,78,7,65,68,18,4,83,100,58,101]))),validateSearch:ul(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),Eae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug",component:It(()=>At(()=>import("./connection-detail-Dy49P_Wb.js"),__vite__mapDeps([129,80,81,106,101,4,45,48,130,12,71,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,39,40,21,41,24,42,15,43,44,46,47,49,8,50,74,11,131,132,79,95,13,83,25,110,64,58,105,76,114,99,56,133,134,66,82,62,23,68,18,126,67,135,117,136,93,77,88,90]))),validateSearch:ul(()=>Ee({tab:z().optional()}))}),xae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug/$collectionName/$itemId",component:It(()=>At(()=>import("./collection-detail-w94sCgAJ.js"),__vite__mapDeps([137,106,11,12,68,18,4,100,135,117,23,24,25,8,138,131,81,132,58,139,69,112,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,39,40,21,41,42,15,43,44,45,46,47,48,49,50,52,99,83,118,74,71,7,91,90,62,116,70,140,61,56,130,79,80,95,13,110,64,105,76,93,114,55,57,59,60,10,6,9,14]))),validateSearch:ul(()=>Ee({replayId:z().optional()}))}),Rae=mt({getParentRoute:()=>Pn,path:"/monitor",component:It(()=>At(()=>import("./index-C0JHkPGv.js"),__vite__mapDeps([141,120,41,117,23,24,25,8,106,99,64,1,34,44,28,29,30,16,31,32,33,35,26,19,20,2,36,37,38,39,40,21,42,15,43,45,46,47,48,49,50,139,69,133,134,74,11,12,58,4,78,109,110,83,116,100,98,73,18,62,66,88,136,132,71,93,103,97,142,102,96,51,52,53,54,7,55,56,57,59,60,61,10,13,6,9,14,107]))),validateSearch:ul(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:z().default("now-30m"),to:z().default("now"),connectionId:Ie(z()).optional().default([]),virtualMcpId:Ie(z()).optional().default([]),tool:z().default(""),status:dn(["all","success","errors"]).default("all"),search:z().default(""),page:St().optional(),streaming:Pt().default(!0),propertyFilters:z().default(""),hideSystem:Pt().default(!1)}))}),Oae=mt({getParentRoute:()=>Pn,path:"/general",component:It(()=>At(()=>import("./general-DTam8mrI.js"),__vite__mapDeps([143,117,23,24,25,8,134,115,66,49,4,87,88,35,144,89,12,73,104,41,58,11,64,63,28,29,30,16,31,32,33,34,26,19,20,1,2,36,37,38,39,40,21,42,15,43,44,45,46,47,48,50,62,13,67])))}),Tae=mt({getParentRoute:()=>Pn,path:"/features",component:It(()=>At(()=>import("./features-Cfl0ad_g.js"),__vite__mapDeps([145,117,23,24,25,8,13,12,73,39,87,88,35])))}),Cae=mt({getParentRoute:()=>Pn,path:"/brand-context",component:It(()=>At(()=>import("./brand-context-CQ0dSgsx.js"),__vite__mapDeps([146,12,2,36,40,42,45,48,50,67,4,100,117,23,24,25,8,89,115])))}),Aae=mt({getParentRoute:()=>Pn,path:"/ai-providers",component:It(()=>At(()=>import("./ai-providers-BKQlREzu.js"),__vite__mapDeps([147,29,117,23,24,25,8,63,87,88,35,59,12,20,57,58,11,60,61,10,13,85,78,1,4,7,65,83,2,37,30,32,41,46,86,50,69,36,66,49,89,115,84,67,45,48,148,54])))}),Iae=mt({getParentRoute:()=>Pn,path:"/members",component:It(()=>At(()=>import("./members-Ou1keNAh.js"),__vite__mapDeps([149,125,90,1,36,38,31,25,118,99,120,41,117,23,24,8,150,142,106,7,68,18,83,2,37,100,134,151,133,12,67,66,49,88,47,48,78,109,110,64,45])))}),Mae=mt({getParentRoute:()=>Pn,path:"/roles",component:It(()=>At(()=>import("./roles-ClefMxwg.js"),__vite__mapDeps([152,151,134,99,67,90,1,36,38,15,45,48,150,142,31,117,23,24,25,8,106,120,41,86,62,39,28,29,30,16,32,33,34,35,26,19,20,2,37,40,21,42,43,44,46,47,49,50,102,78,103,97,12,77,133,74,11,59,66,73,87,88]))),validateSearch:ul(()=>Ee({role:z().optional()}))}),Pae=mt({getParentRoute:()=>Pn,path:"/sso",component:It(()=>At(()=>import("./sso-BP3gjZB7.js"),__vite__mapDeps([153,144,89,12,73,87,88,35,117,23,24,25,8,4,14,48])))}),Nae=mt({getParentRoute:()=>Pn,path:"/profile",component:It(()=>At(()=>import("./profile-CDeQH0Ne.js"),__vite__mapDeps([154,117,23,24,25,8,66,49,73,83,1,2,37,84,4,43,44,115,92,70,87,88,35])))}),kae=mt({getParentRoute:()=>Pn,path:"/store",component:It(()=>At(()=>import("./store-B88v1kcS.js"),__vite__mapDeps([155,29,36,45,48,4,73,63,66,49,64,74,11,12,117,23,24,25,8,95,13,87,88,35])))}),Dae=mt({getParentRoute:()=>Pn,path:"/registry",component:It(()=>At(()=>import("./registry-CXcvF-uz.js"),[]))}),Lae=mt({getParentRoute:()=>Pn,path:"/store/registry",component:It(()=>At(()=>import("./store-registry-BebL2rFu.js"),[]))}),$ae=mt({getParentRoute:()=>Pn,path:"/workflows",component:It(()=>At(()=>import("./workflow-CQNAZF1P.js"),__vite__mapDeps([156,12,80,81,125,90,1,36,38,31,25,118,99,77,41,88,62,39,28,29,30,16,32,33,34,35,26,19,20,2,37,40,21,24,42,15,43,44,45,46,47,48,49,8,50,150,142,140,113,66,106,127,128,93,67,11,74,135,117,23])))}),jae=mt({getParentRoute:()=>Pn,path:"/workflows/$itemId",component:It(()=>At(()=>import("./workflow-detail-E-UgwIFZ.js"),__vite__mapDeps([157,138,131,12,81,132,58,11,139,69,112,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,39,40,21,41,24,42,15,43,44,45,46,47,48,49,8,50,52,99,83,25,118,135,117,23,74,71,7,91,90,62,116,70,140,61,4])))}),Uae=mt({getParentRoute:()=>aE,path:"/plugins/$pluginId",component:It(()=>At(()=>import("./org-plugin-layout-Dy7mAYsZ.js"),__vite__mapDeps([158,159,74,11,12,46,117,23,24,25,8])))}),zae=mt({getParentRoute:()=>Pn,path:"/agents",component:It(()=>At(()=>import("./agents-list-DJEDnQKa.js"),__vite__mapDeps([160,90,1,36,38,19,75,12,76,58,11,7,8,32,77,41,78,74,15,28,29,30,16,31,33,34,35,26,20,2,37,39,40,21,24,42,43,44,45,46,47,48,49,50,79,80,81,65,25,62,71,117,23,88,148,54,106,105,67,120])))}),Fae=mt({getParentRoute:()=>Pn,path:"/automations",component:It(()=>At(()=>import("./automations-sFtOtWq7.js"),__vite__mapDeps([161,45,50,120,41,117,23,24,25,8,106,119,67,90,1,36,38,28,29,30,16,31,32,33,34,35,26,19,20,2,37,39,40,21,42,15,43,44,46,47,48,49,58,11,12,76])))}),C6=mt({getParentRoute:()=>T6,path:"/$pluginId",component:It(()=>At(()=>import("./dynamic-plugin-layout-BN4WTDcX.js"),__vite__mapDeps([162,159,74,11,12,46,117,23,24,25,8])))}),Bae=[],Vae=[],qae=[],A6=[];dae.forEach(e=>{if(!e.setup)return;const t={parentRoute:C6,routing:{createRoute:mt,lazyRouteComponent:It},registerRootSidebarItem:n=>Bae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Vae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>qae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{A6.push(...n)}};e.setup(t)});const Hae=C6.addChildren(A6),Gae=Pn.addChildren([wae,Sae,Eae,xae,zae,Fae,Rae,Oae,Tae,Cae,Aae,Iae,Mae,Pae,Nae,kae,Lae,Dae,$ae,jae]),Kae=T6.addChildren([Hae]),Zae=aE.addChildren([Kae,Uae]),Yae=sE.addChildren([bae,Zae]),Wae=oE.addChildren([Yae,Gae]),Qae=iE.addChildren([vae,Wae]),Xae=ma.addChildren([Qae,_ae,fae,hae,pae,mae,gae]),Jae=d7({routeTree:Xae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),ele=document.getElementById("root");X$.createRoot(ele).render(T.jsx(I.StrictMode,{children:T.jsx(p7,{router:Jae})}));export{ZM as $,Ple as A,W1 as B,nG as C,To as D,oce as E,tce as F,rce as G,Ee as H,St as I,z as J,KM as K,fw as L,jD as M,ule as N,gP as O,Wse as P,Kse as Q,Rg as R,UD as S,$J as T,Yr as U,ece as V,Bae as W,Vae as X,sae as Y,LD as Z,At as _,Dj as a,OV as a$,ale as a0,xo as a1,tee as a2,ht as a3,no as a4,uW as a5,dW as a6,yn as a7,lt as a8,fW as a9,n3 as aA,aY as aB,uY as aC,lY as aD,YZ as aE,qae as aF,nle as aG,Ut as aH,Xt as aI,Ie as aJ,eG as aK,Jle as aL,Xle as aM,HS as aN,vg as aO,LY as aP,R3 as aQ,J4 as aR,lf as aS,ta as aT,DY as aU,ds as aV,b4 as aW,jw as aX,Wr as aY,Pt as aZ,Ye as a_,hW as aa,gW as ab,wW as ac,M3 as ad,fl as ae,pW as af,mW as ag,vW as ah,_W as ai,yW as aj,bW as ak,SW as al,xW as am,RW as an,Ig as ao,dn as ap,hC as aq,Q1 as ar,oY as as,ro as at,Kd as au,Ww as av,jc as aw,aa as ax,fs as ay,io as az,Mg as b,iZ as b$,VP as b0,pw as b1,Ok as b2,Ck as b3,WW as b4,Wn as b5,SQ as b6,f3 as b7,X4 as b8,iae as b9,Rre as bA,Lre as bB,Yre as bC,Xre as bD,wre as bE,Ere as bF,Ore as bG,Tre as bH,$re as bI,Hre as bJ,Hle as bK,dae as bL,mV as bM,dle as bN,gle as bO,vq as bP,ul as bQ,qN as bR,KN as bS,hle as bT,ice as bU,iG as bV,rG as bW,d4 as bX,pf as bY,tZ as bZ,rZ as b_,la as ba,ne as bb,tle as bc,oZ as bd,$le as be,dP as bf,ca as bg,as as bh,Lle as bi,jle as bj,rn as bk,fle as bl,HN as bm,Fre as bn,Bre as bo,VS as bp,c6 as bq,qS as br,nv as bs,KD as bt,nie as bu,YD as bv,Qre as bw,uie as bx,bre as by,Sre as bz,rae as c,Kle as c$,af as c0,HM as c1,Ij as c2,E3 as c3,SY as c4,Fw as c5,p3 as c6,D4 as c7,Bw as c8,Gd as c9,toe as cA,pt as cB,Goe as cC,to as cD,JW as cE,hP as cF,Ile as cG,sZ as cH,aZ as cI,nZ as cJ,lZ as cK,Vz as cL,GD as cM,WD as cN,JD as cO,t6 as cP,n6 as cQ,i6 as cR,Vle as cS,qle as cT,Fle as cU,Ble as cV,ere as cW,zle as cX,QD as cY,e6 as cZ,r6 as c_,O4 as ca,zw as cb,Uw as cc,EY as cd,xY as ce,sQ as cf,aQ as cg,oQ as ch,Or as ci,cle as cj,XH as ck,WH as cl,GH as cm,r4 as cn,GV as co,Sw as cp,xV as cq,ple as cr,YV as cs,xw as ct,Ew as cu,JV as cv,mle as cw,Wle as cx,yse as cy,Qle as cz,dw as d,XD as d0,Yle as d1,kS as d2,hre as d3,Ule as d4,HD as d5,Lie as d6,qre as d7,Zle as d8,Cie as d9,Mie as da,fie as db,die as dc,Gle as dd,vle as de,VW as df,qW as dg,KW as dh,HW as di,GW as dj,ble as dk,wle as dl,Rle as dm,xle as dn,Tle as dp,Ole as dq,Cle as dr,Ele as ds,Sle as dt,yle as du,_le as dv,zM as dw,bO as dx,ile as dy,rle as dz,Ro as e,rf as f,uw as g,Nle as h,Mle as i,T as j,kle as k,$D as l,nce as m,kj as n,nw as o,NM as p,Zn as q,I as r,Jne as s,Dle as t,lle as u,sle as v,GM as w,OT as x,NS as y,Oo as z};
|
|
171
|
+
`),document.head.appendChild(r)}}function eae(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:KM.publicConfig(),queryFn:Xse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=GM(r),[s]=Wse();i.internalUrl&&zse(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Jse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const tae=new wj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function nae(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(pH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(UD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(Sj,{client:tae,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(eae,{children:T.jsx($j,{children:T.jsx(Bee,{children:T.jsx(Qne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function rae(...e){return VP(pw(e))}const iae=b4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function W1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?jw:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=rae(iae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const AM="__mesh_chunk_reload_ts";function IM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class oce extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),DD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class oae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=IM(t);if(DD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(AM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(AM,String(s)),window.location.reload())}render(){return this.state.hasError&&IM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(jD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(W1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const sae="MCP Workflows",aae="Create workflows using your MCP tools",lae=I.lazy(()=>At(()=>import("./plugin-header-Bs3leeaa.js"),__vite__mapDeps([0,1,2]))),cae=I.lazy(()=>At(()=>import("./plugin-empty-state-A7iG48Mg.js"),[])),uae={id:sae,description:aae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(lae,{...e}),renderEmptyState:()=>T.jsx(cae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(LD,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},dae=[uae],ma=n7({component:()=>T.jsx(oae,{children:T.jsx(nae,{children:T.jsx(I.Suspense,{fallback:T.jsx(UD,{}),children:T.jsx(gP,{})})})})}),fae=mt({getParentRoute:()=>ma,path:"/login",component:It(()=>At(()=>import("./login-AnZ_hiQc.js"),__vite__mapDeps([3,4]))),validateSearch:ul(()=>Ee({next:z().optional(),client_id:z().optional(),redirect_uri:z().optional(),response_type:z().optional(),state:z().optional(),scope:z().optional(),code_challenge:z().optional(),code_challenge_method:z().optional()}))}),hae=mt({getParentRoute:()=>ma,path:"/reset-password",component:It(()=>At(()=>import("./reset-password-CmC0LepN.js"),__vite__mapDeps([5,4]))),validateSearch:ul(()=>Ee({token:z().optional(),error:z().optional()}))}),pae=mt({getParentRoute:()=>ma,path:"/auth/$pathname",component:It(()=>At(()=>import("./auth-catchall-8PNCF3Wj.js"),[]))}),mae=mt({getParentRoute:()=>ma,path:"/oauth/callback",component:It(()=>At(()=>import("./oauth-callback-DZdNeSYS.js"),[]))}),gae=mt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:It(()=>At(()=>import("./oauth-callback-ai-provider-CmcHfY8z.js"),[]))}),iE=mt({getParentRoute:()=>ma,id:"shell",component:It(()=>At(()=>import("./shell-layout-C-KiCZAL.js").then(e=>e.s),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16])))}),vae=mt({getParentRoute:()=>iE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=e.filter(i=>!i.metadata?.archived),n=localStorage.getItem(Rg.lastOrgSlug());if(n){if(t.some(s=>s.slug===n))throw Oc({to:"/$org",params:{org:n}});localStorage.removeItem(Rg.lastOrgSlug())}const r=t[0];throw Oc(r?{to:"/$org",params:{org:r.slug}}:{to:"/onboarding"})}}),_ae=mt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list(),t=e?.filter(n=>!n.metadata?.archived);if(t&&t.length>0)throw Oc({to:"/"})},component:It(()=>At(()=>import("./onboarding-CSFkAYKn.js"),__vite__mapDeps([17,9,4,18,19,20,21])))}),oE=mt({getParentRoute:()=>iE,path:"/$org",component:It(()=>At(()=>import("./org-layout-MhC4Qi2j.js"),[]))}),sE=mt({getParentRoute:()=>oE,id:"org-shell",component:It(()=>At(()=>import("./index-D5WZXYzH.js"),__vite__mapDeps([22,23,24,25,8,26,27,28,29,30,16,31,32,33,34,35,19,20,1,2,36,37,38,39,40,21,41,42,15,43,44,45,46,47,48,49,50,6,7,9,10,11,12,13,14,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,18,4,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107])))}),aE=mt({getParentRoute:()=>sE,id:"agent-shell",component:It(()=>At(()=>import("./index-Ccxjprlf.js"),__vite__mapDeps([108,72,7,8,73,4,74,11,12,75,76,58,32,77,41,78,1,15,28,29,30,16,31,33,34,35,26,19,20,2,36,37,38,39,40,21,24,42,43,44,45,46,47,48,49,50,79,80,81,65,25,62,71,57,59,60,61,10,13,6,9,14,51,52,53,54,55,56,69,82,68,18,83,84,85,63,86,66,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,109,110,64,27,23,67,70,104,105,106,107,111,112,113,114,115,116,117,118,119,120,121])))}),yae=Ee({virtualmcpid:z().optional(),tab:z().optional(),main:z().optional(),id:z().optional(),toolName:z().optional(),tasks:St().optional(),mainOpen:St().optional(),chat:St().optional(),autosend:z().optional()}),T6=mt({getParentRoute:()=>aE,path:"/$taskId",validateSearch:yae,component:()=>null}),bae=mt({getParentRoute:()=>sE,path:"/",component:It(()=>At(()=>import("./index-BtaMjmKz.js"),__vite__mapDeps([122,25,62,39,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,40,21,41,24,42,15,43,44,45,46,47,48,49,8,50,63,12,58,11,13,75,76,7,77,78,74,79,80,81,65,71,72,73,4,57,59,60,61,10,6,9,14,51,52,53,54,55,56,69,82,68,18,83,84,85,86,66,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,105])))}),Pn=mt({getParentRoute:()=>oE,path:"/settings",component:It(()=>At(()=>import("./settings-layout-BORw4NbB.js"),__vite__mapDeps([123,23,24,25,8,117,33,26,19,36,15,47,49,50,111,92,60,61])))}),wae=mt({getParentRoute:()=>Pn,path:"/",beforeLoad:({params:e})=>{throw Oc({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),Sae=mt({getParentRoute:()=>Pn,path:"/connections",component:It(()=>At(()=>import("./connections-DYgmyz3C.js"),__vite__mapDeps([124,80,81,125,90,1,36,38,31,25,118,99,120,41,98,94,93,95,74,11,12,13,96,97,79,88,62,39,28,29,30,16,32,33,34,35,26,19,20,2,37,40,21,24,42,15,43,44,45,46,47,48,49,8,50,106,117,23,126,67,102,127,128,78,7,65,68,18,4,83,100,58,101]))),validateSearch:ul(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),Eae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug",component:It(()=>At(()=>import("./connection-detail-Du5PjTQN.js"),__vite__mapDeps([129,80,81,106,101,4,45,48,130,12,71,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,39,40,21,41,24,42,15,43,44,46,47,49,8,50,74,11,131,132,79,95,13,83,25,110,64,58,105,76,114,99,56,133,134,66,82,62,23,68,18,126,67,135,117,136,93,77,88,90]))),validateSearch:ul(()=>Ee({tab:z().optional()}))}),xae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug/$collectionName/$itemId",component:It(()=>At(()=>import("./collection-detail-DjrRkSmH.js"),__vite__mapDeps([137,106,11,12,68,18,4,100,135,117,23,24,25,8,138,131,81,132,58,139,69,112,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,39,40,21,41,42,15,43,44,45,46,47,48,49,50,52,99,83,118,74,71,7,91,90,62,116,70,140,61,56,130,79,80,95,13,110,64,105,76,93,114,55,57,59,60,10,6,9,14]))),validateSearch:ul(()=>Ee({replayId:z().optional()}))}),Rae=mt({getParentRoute:()=>Pn,path:"/monitor",component:It(()=>At(()=>import("./index-D07mVDo7.js"),__vite__mapDeps([141,120,41,117,23,24,25,8,106,99,64,1,34,44,28,29,30,16,31,32,33,35,26,19,20,2,36,37,38,39,40,21,42,15,43,45,46,47,48,49,50,139,69,133,134,74,11,12,58,4,78,109,110,83,116,100,98,73,18,62,66,88,136,132,71,93,103,97,142,102,96,51,52,53,54,7,55,56,57,59,60,61,10,13,6,9,14,107]))),validateSearch:ul(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:z().default("now-30m"),to:z().default("now"),connectionId:Ie(z()).optional().default([]),virtualMcpId:Ie(z()).optional().default([]),tool:z().default(""),status:dn(["all","success","errors"]).default("all"),search:z().default(""),page:St().optional(),streaming:Pt().default(!0),propertyFilters:z().default(""),hideSystem:Pt().default(!1)}))}),Oae=mt({getParentRoute:()=>Pn,path:"/general",component:It(()=>At(()=>import("./general-CLqSOIWH.js"),__vite__mapDeps([143,117,23,24,25,8,134,115,66,49,4,87,88,35,144,89,12,73,104,41,58,11,64,63,28,29,30,16,31,32,33,34,26,19,20,1,2,36,37,38,39,40,21,42,15,43,44,45,46,47,48,50,62,13,67])))}),Tae=mt({getParentRoute:()=>Pn,path:"/features",component:It(()=>At(()=>import("./features-BwQY7IjX.js"),__vite__mapDeps([145,117,23,24,25,8,13,12,73,39,87,88,35])))}),Cae=mt({getParentRoute:()=>Pn,path:"/brand-context",component:It(()=>At(()=>import("./brand-context-CPtzFC3q.js"),__vite__mapDeps([146,12,2,36,40,42,45,48,50,67,4,100,117,23,24,25,8,89,115])))}),Aae=mt({getParentRoute:()=>Pn,path:"/ai-providers",component:It(()=>At(()=>import("./ai-providers-DGBj5bEk.js"),__vite__mapDeps([147,29,117,23,24,25,8,63,87,88,35,59,12,20,57,58,11,60,61,10,13,85,78,1,4,7,65,83,2,37,30,32,41,46,86,50,69,36,66,49,89,115,84,67,45,48,148,54])))}),Iae=mt({getParentRoute:()=>Pn,path:"/members",component:It(()=>At(()=>import("./members-iSwHLVLc.js"),__vite__mapDeps([149,125,90,1,36,38,31,25,118,99,120,41,117,23,24,8,150,142,106,7,68,18,83,2,37,100,134,151,133,12,67,66,49,88,47,48,78,109,110,64,45])))}),Mae=mt({getParentRoute:()=>Pn,path:"/roles",component:It(()=>At(()=>import("./roles-BsRaXL8k.js"),__vite__mapDeps([152,151,134,99,67,90,1,36,38,15,45,48,150,142,31,117,23,24,25,8,106,120,41,86,62,39,28,29,30,16,32,33,34,35,26,19,20,2,37,40,21,42,43,44,46,47,49,50,102,78,103,97,12,77,133,74,11,59,66,73,87,88]))),validateSearch:ul(()=>Ee({role:z().optional()}))}),Pae=mt({getParentRoute:()=>Pn,path:"/sso",component:It(()=>At(()=>import("./sso-Df0_hBqL.js"),__vite__mapDeps([153,144,89,12,73,87,88,35,117,23,24,25,8,4,14,48])))}),Nae=mt({getParentRoute:()=>Pn,path:"/profile",component:It(()=>At(()=>import("./profile-D-pIBEjg.js"),__vite__mapDeps([154,117,23,24,25,8,66,49,73,83,1,2,37,84,4,43,44,115,92,70,87,88,35])))}),kae=mt({getParentRoute:()=>Pn,path:"/store",component:It(()=>At(()=>import("./store-B6hVgdLD.js"),__vite__mapDeps([155,29,36,45,48,4,73,63,66,49,64,74,11,12,117,23,24,25,8,95,13,87,88,35])))}),Dae=mt({getParentRoute:()=>Pn,path:"/registry",component:It(()=>At(()=>import("./registry-BzLfRgnp.js"),[]))}),Lae=mt({getParentRoute:()=>Pn,path:"/store/registry",component:It(()=>At(()=>import("./store-registry-BTMEZZNw.js"),[]))}),$ae=mt({getParentRoute:()=>Pn,path:"/workflows",component:It(()=>At(()=>import("./workflow-CpYJf0EI.js"),__vite__mapDeps([156,12,80,81,125,90,1,36,38,31,25,118,99,77,41,88,62,39,28,29,30,16,32,33,34,35,26,19,20,2,37,40,21,24,42,15,43,44,45,46,47,48,49,8,50,150,142,140,113,66,106,127,128,93,67,11,74,135,117,23])))}),jae=mt({getParentRoute:()=>Pn,path:"/workflows/$itemId",component:It(()=>At(()=>import("./workflow-detail-lNDVTwYf.js"),__vite__mapDeps([157,138,131,12,81,132,58,11,139,69,112,28,29,30,16,31,32,33,34,35,26,19,20,1,2,36,37,38,39,40,21,41,24,42,15,43,44,45,46,47,48,49,8,50,52,99,83,25,118,135,117,23,74,71,7,91,90,62,116,70,140,61,4])))}),Uae=mt({getParentRoute:()=>aE,path:"/plugins/$pluginId",component:It(()=>At(()=>import("./org-plugin-layout-v3On4cF4.js"),__vite__mapDeps([158,159,74,11,12,46,117,23,24,25,8])))}),zae=mt({getParentRoute:()=>Pn,path:"/agents",component:It(()=>At(()=>import("./agents-list-TldZe4YF.js"),__vite__mapDeps([160,90,1,36,38,19,75,12,76,58,11,7,8,32,77,41,78,74,15,28,29,30,16,31,33,34,35,26,20,2,37,39,40,21,24,42,43,44,45,46,47,48,49,50,79,80,81,65,25,62,71,117,23,88,148,54,106,105,67,120])))}),Fae=mt({getParentRoute:()=>Pn,path:"/automations",component:It(()=>At(()=>import("./automations-CqPMUDuQ.js"),__vite__mapDeps([161,45,50,120,41,117,23,24,25,8,106,119,67,90,1,36,38,28,29,30,16,31,32,33,34,35,26,19,20,2,37,39,40,21,42,15,43,44,46,47,48,49,58,11,12,76])))}),C6=mt({getParentRoute:()=>T6,path:"/$pluginId",component:It(()=>At(()=>import("./dynamic-plugin-layout-zW_YPWvS.js"),__vite__mapDeps([162,159,74,11,12,46,117,23,24,25,8])))}),Bae=[],Vae=[],qae=[],A6=[];dae.forEach(e=>{if(!e.setup)return;const t={parentRoute:C6,routing:{createRoute:mt,lazyRouteComponent:It},registerRootSidebarItem:n=>Bae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Vae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>qae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{A6.push(...n)}};e.setup(t)});const Hae=C6.addChildren(A6),Gae=Pn.addChildren([wae,Sae,Eae,xae,zae,Fae,Rae,Oae,Tae,Cae,Aae,Iae,Mae,Pae,Nae,kae,Lae,Dae,$ae,jae]),Kae=T6.addChildren([Hae]),Zae=aE.addChildren([Kae,Uae]),Yae=sE.addChildren([bae,Zae]),Wae=oE.addChildren([Yae,Gae]),Qae=iE.addChildren([vae,Wae]),Xae=ma.addChildren([Qae,_ae,fae,hae,pae,mae,gae]),Jae=d7({routeTree:Xae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),ele=document.getElementById("root");X$.createRoot(ele).render(T.jsx(I.StrictMode,{children:T.jsx(p7,{router:Jae})}));export{ZM as $,Ple as A,W1 as B,nG as C,To as D,oce as E,tce as F,rce as G,Ee as H,St as I,z as J,KM as K,fw as L,jD as M,ule as N,gP as O,Wse as P,Kse as Q,Rg as R,UD as S,$J as T,Yr as U,ece as V,Bae as W,Vae as X,sae as Y,LD as Z,At as _,Dj as a,OV as a$,ale as a0,xo as a1,tee as a2,ht as a3,no as a4,uW as a5,dW as a6,yn as a7,lt as a8,fW as a9,n3 as aA,aY as aB,uY as aC,lY as aD,YZ as aE,qae as aF,nle as aG,Ut as aH,Xt as aI,Ie as aJ,eG as aK,Jle as aL,Xle as aM,HS as aN,vg as aO,LY as aP,R3 as aQ,J4 as aR,lf as aS,ta as aT,DY as aU,ds as aV,b4 as aW,jw as aX,Wr as aY,Pt as aZ,Ye as a_,hW as aa,gW as ab,wW as ac,M3 as ad,fl as ae,pW as af,mW as ag,vW as ah,_W as ai,yW as aj,bW as ak,SW as al,xW as am,RW as an,Ig as ao,dn as ap,hC as aq,Q1 as ar,oY as as,ro as at,Kd as au,Ww as av,jc as aw,aa as ax,fs as ay,io as az,Mg as b,iZ as b$,VP as b0,pw as b1,Ok as b2,Ck as b3,WW as b4,Wn as b5,SQ as b6,f3 as b7,X4 as b8,iae as b9,Rre as bA,Lre as bB,Yre as bC,Xre as bD,wre as bE,Ere as bF,Ore as bG,Tre as bH,$re as bI,Hre as bJ,Hle as bK,dae as bL,mV as bM,dle as bN,gle as bO,vq as bP,ul as bQ,qN as bR,KN as bS,hle as bT,ice as bU,iG as bV,rG as bW,d4 as bX,pf as bY,tZ as bZ,rZ as b_,la as ba,ne as bb,tle as bc,oZ as bd,$le as be,dP as bf,ca as bg,as as bh,Lle as bi,jle as bj,rn as bk,fle as bl,HN as bm,Fre as bn,Bre as bo,VS as bp,c6 as bq,qS as br,nv as bs,KD as bt,nie as bu,YD as bv,Qre as bw,uie as bx,bre as by,Sre as bz,rae as c,Kle as c$,af as c0,HM as c1,Ij as c2,E3 as c3,SY as c4,Fw as c5,p3 as c6,D4 as c7,Bw as c8,Gd as c9,toe as cA,pt as cB,Goe as cC,to as cD,JW as cE,hP as cF,Ile as cG,sZ as cH,aZ as cI,nZ as cJ,lZ as cK,Vz as cL,GD as cM,WD as cN,JD as cO,t6 as cP,n6 as cQ,i6 as cR,Vle as cS,qle as cT,Fle as cU,Ble as cV,ere as cW,zle as cX,QD as cY,e6 as cZ,r6 as c_,O4 as ca,zw as cb,Uw as cc,EY as cd,xY as ce,sQ as cf,aQ as cg,oQ as ch,Or as ci,cle as cj,XH as ck,WH as cl,GH as cm,r4 as cn,GV as co,Sw as cp,xV as cq,ple as cr,YV as cs,xw as ct,Ew as cu,JV as cv,mle as cw,Wle as cx,yse as cy,Qle as cz,dw as d,XD as d0,Yle as d1,kS as d2,hre as d3,Ule as d4,HD as d5,Lie as d6,qre as d7,Zle as d8,Cie as d9,Mie as da,fie as db,die as dc,Gle as dd,vle as de,VW as df,qW as dg,KW as dh,HW as di,GW as dj,ble as dk,wle as dl,Rle as dm,xle as dn,Tle as dp,Ole as dq,Cle as dr,Ele as ds,Sle as dt,yle as du,_le as dv,zM as dw,bO as dx,ile as dy,rle as dz,Ro as e,rf as f,uw as g,Nle as h,Mle as i,T as j,kle as k,$D as l,nce as m,kj as n,nw as o,NM as p,Zn as q,I as r,Jne as s,Dle as t,lle as u,sle as v,GM as w,OT as x,NS as y,Oo as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-B3N0ijMe.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,c as d,r as p,j as r}from"./index-
|
|
1
|
+
import{e as f,c as d,r as p,j as r}from"./index-B3N0ijMe.js";import{r as w}from"./sidebar-DC8b4t6M.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as $,j as i,r as B,s as ae,P as Ce,f as je,c as ce,t as me,b as ke,K as Se,n as Ie}from"./index-Bq8MNgeV.js";import{u as _e}from"./tooltip-Cop6BWIB.js";import{I as ye}from"./integration-icon-C60b_d7I.js";import{S as ue}from"./skeleton-B2ZrUZa6.js";import{W as H,i as ve}from"./constants-ClujOLL0.js";import{b as Ae}from"./use-virtual-mcp-CD_T-y85.js";import{u as Oe}from"./use-organization-settings-4FSfpkha.js";import{i as De}from"./ChevronRight-E3ry5bv1.js";import{s as Ee}from"./Plus-Dld8jPbl.js";import{a as Me}from"./Users03-BvEJiMrD.js";import{I as oe,S as Pe,L as Re,b as Te}from"./lean-canvas-recruit-modal-cabC6cgI.js";import{b as $e,d as Le,e as ze,c as Be,u as Fe,C as G}from"./index-n7gxPtHW.js";import{u as He}from"./use-create-virtual-mcp-BobcuW0I.js";import{N as Ke}from"./select-model-A6plReXc.js";import{u as Ue}from"./use-ai-providers-BGcGBNhE.js";import{d as We}from"./XCircle-Xm8lpkAu.js";import"./Container-hpy3kvOB.js";import"./agent-icon-DIgcdFeV.js";import"./AlertCircle-BhKIfxeV.js";import"./Tool01-C_J_zDPh.js";import"./Archive-Dz0wtILE.js";import"./XClose-BpbAJCm9.js";import"./RefreshCcw01-DlZMdaR5.js";import"./ArrowNarrowLeft-D2IzKz0U.js";import"./ArrowUpRight-DQNhEvxd.js";import"./ZapSquare-D31ZX-yT.js";import"./CheckCircle-S5ffz95T.js";import"./Check-B3zx_U26.js";import"./ChevronDown-B2rzld2y.js";import"./ChevronUp-CR14Z0nx.js";import"./DotsVertical-DlBHJ9PJ.js";import"./Star01-D7-_AozX.js";import"./Palette-48b46GGh.js";import"./SearchMd-BzVtNNV8.js";import"./LayoutLeft-O15r8yaV.js";import"./LinkExternal01-CqYIOZ9A.js";import"./Lock01-BWTd97_q.js";import"./Sun-BRoJ4FPT.js";import"./Play-CWd0g6Ov.js";import"./Settings02-Yw9y8zcL.js";import"./Shield01-Bryrtn4R.js";import"./Trash01-CWiWK8tz.js";import"./User01-Cuf_FrNk.js";import"./X-DCaJ2DR_.js";import"./Zap-DkdmeY_3.js";import"./use-collections-8VzaVe93.js";import"./use-navigate-to-agent-C4qiakGR.js";import"./dialog-DlXEbbro.js";import"./collection-search-CkG6QTlc.js";import"./checkbox-B5i71aX9.js";import"./use-connection-Lr8heJ8D.js";import"./extract-connection-data-D2pRgNGp.js";import"./constants-hHr1XnHs.js";import"./collections-BbDNQEWM.js";import"./drawer-PL1KJG8h.js";import"./use-mcp-tools-DQxTqUp3.js";import"./switch-MKqFhI8u.js";import"./input-DTt32vul.js";import"./chat-context-CXqWCM0D.js";import"./use-decopilot-events-CiJL_0vR.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-C2q1pKyD.js";import"./shell-layout-G1fWb3Wf.js";import"./required-auth-layout-CanoKJcr.js";import"./use-org-sso-Dam1kDCD.js";import"./pair-mPsfY4Tl.js";import"./index-mhkzUFBK.js";import"./use-copy-Cu8-dSUz.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-B1bS009C.js";import"./spinner-M0_j9E66.js";import"./tabs-Jp4EeqTR.js";import"./form-lvEVsZiS.js";import"./label-BhsxXb5j.js";import"./select-Bmu7KX9g.js";import"./toggle-group-BDnmrZSN.js";import"./dropdown-menu-DX0TPN0k.js";import"./index-5QFk1v1j.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CtNK-usI.js";import"./use-registry-connections-Dr0EGoqa.js";import"./useInfiniteQuery-Dj_RSaBx.js";import"./infiniteQueryObserver-DKVQWAgx.js";import"./card-BsjNx5Cg.js";import"./collection-tabs-DZIZ-iDz.js";import"./badge-wVDQydbB.js";import"./textarea-D4e6a8Nz.js";import"./connection-form-helpers-Ck24jZcw.js";import"./use-infinite-scroll-BkIExLyi.js";import"./useSuspenseInfiniteQuery-DJb5VXkS.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-C31fe2qO.js";import"./settings-section-Bh35ipKE.js";import"./unwrap-tool-result-BYXdCQMg.js";function Ve(e){try{const t=localStorage.getItem(`mesh:chat:recent-agents:${e}`);return t?JSON.parse(t):[]}catch{return[]}}const qe=8;function xe(e){const t=$.c(21),{agent:s,onSpecialClick:r,tracking:n}=e,{org:o}=ae(),c=je();let a;t[0]!==s.id||t[1]!==s.title||t[2]!==c||t[3]!==r||t[4]!==o||t[5]!==n.action||t[6]!==n.template_id||t[7]!==n.tile_kind?(a=()=>{if(me("home_agent_tile_clicked",{template_id:n.template_id,agent_id:s.id,agent_title:s.title,tile_kind:n.tile_kind,action:n.action}),r)r();else{const S=crypto.randomUUID();c({to:"/$org/$taskId",params:{org:o.slug,taskId:S},search:{virtualmcpid:s.id}})}},t[0]=s.id,t[1]=s.title,t[2]=c,t[3]=r,t[4]=o,t[5]=n.action,t[6]=n.template_id,t[7]=n.tile_kind,t[8]=a):a=t[8];const m=a;let E;t[9]===Symbol.for("react.memo_cache_sentinel")?(E=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),t[9]=E):E=t[9];const h=`Select agent ${s.title}`;let M;t[10]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Me,{size:24}),t[10]=M):M=t[10];let b;t[11]!==s.icon||t[12]!==s.title?(b=i.jsx(ye,{icon:s.icon,name:s.title,size:"md",fallbackIcon:M,className:"transition-transform group-hover:scale-110"}),t[11]=s.icon,t[12]=s.title,t[13]=b):b=t[13];let p;t[14]!==s.title?(p=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2 break-words w-full",children:s.title}),t[14]=s.title,t[15]=p):p=t[15];let j;return t[16]!==m||t[17]!==h||t[18]!==b||t[19]!==p?(j=i.jsxs("button",{type:"button",onClick:m,className:E,"aria-label":h,children:[b,p]}),t[16]=m,t[17]=h,t[18]=b,t[19]=p,t[20]=j):j=t[20],j}function Ge(){const e=$.c(8),t=je(),{org:s}=ae();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),e[0]=r):r=e[0];let n;e[1]!==t||e[2]!==s.slug?(n=()=>{me("home_see_all_agents_clicked"),t({to:"/$org/settings/agents",params:{org:s.slug}})},e[1]=t,e[2]=s.slug,e[3]=n):n=e[3];let o,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(De,{size:20,className:"text-foreground"})}),c=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"}),e[4]=o,e[5]=c):(o=e[4],c=e[5]);let a;return e[6]!==n?(a=i.jsxs("button",{type:"button",className:r,"aria-label":"See all agents",onClick:n,children:[o,c]}),e[6]=n,e[7]=a):a=e[7],a}function Ye(){const e=$.c(9);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={navigateOnCreate:!0},e[0]=t):t=e[0];const{createVirtualMCP:s,isCreating:r}=He(t);let n;e[1]!==s?(n=()=>{me("home_create_agent_clicked"),s()},e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group","disabled:opacity-50 disabled:cursor-not-allowed"),e[3]=o):o=e[3];let c,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Ee,{size:20,className:"text-muted-foreground"})}),a=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),e[4]=c,e[5]=a):(c=e[4],a=e[5]);let m;return e[6]!==r||e[7]!==n?(m=i.jsxs("button",{type:"button",onClick:n,disabled:r,className:o,"aria-label":"Create agent",children:[c,a]}),e[6]=r,e[7]=n,e[8]=m):m=e[8],m}function ie(e,t,s){return e.find(r=>r.id!==null&&(r.metadata?.type===t||r.title===s))}function Je(){const e=$.c(52),t=Ae(),{locator:s,org:r}=ae(),n=Oe(),[o,c]=B.useState(!1),[a,m]=B.useState(!1),[E,h]=B.useState(!1),[M,b]=B.useState(!1),[p,j]=B.useState(!1),[S,L]=B.useState(!1),[P,z]=B.useState(!1),[R]=Ce(),T=$e(r.slug);let f,g,u,x,k,_,I,d;if(e[0]!==s||e[1]!==T||e[2]!==n||e[3]!==R||e[4]!==t){const se=H.find(at),Y=H.find(ot),J=H.find(lt),Q=H.find(rt),Z=H.find(nt),de=H.find(st),ne=H.find(it);u=ie(t,Y.id,Y.title),f=ie(t,J.id,J.title),g=ie(t,Q.id,Q.title),x=ie(t,Z.id,Z.title);const pe=l=>{if(l===se.id)return{key:l,kind:"template-recruit",templateId:"site-editor",agent:se,onClick:"import-deco"};if(l===Y.id)return u?{key:u.id,kind:"existing",templateId:"site-diagnostics",agent:u}:{key:l,kind:"template-recruit",templateId:"site-diagnostics",agent:Y,onClick:"diagnostics"};if(l===J.id)return f?{key:f.id,kind:"existing",templateId:"ai-image",agent:f}:{key:l,kind:"template-recruit",templateId:"ai-image",agent:J,onClick:"ai-image"};if(l===Z.id)return x?{key:x.id,kind:"existing",templateId:"lean-canvas",agent:x}:{key:l,kind:"template-recruit",templateId:"lean-canvas",agent:Z,onClick:"lean-canvas"};if(l===de.id)return{key:l,kind:"template-recruit",templateId:"studio-pack",agent:de,onClick:"studio-pack"};if(l===ne.id)return R.experimental_vibecode?{key:l,kind:"template-recruit",templateId:"self-healing-storefront",agent:ne,onClick:"self-healing"}:null;if(l===Q.id)return g?{key:g.id,kind:"existing",templateId:"ai-research",agent:g}:{key:l,kind:"template-recruit",templateId:"ai-research",agent:Q,onClick:"ai-research"};const F=t.find(V=>V.id!==null&&V.id===l&&!ve(V.id));return F?{key:F.id,kind:"existing",templateId:null,agent:F}:null};let ee;if(n?.ids)ee=n.ids.map(pe).filter(tt).slice(0,qe);else{const F=[se.id,ne.id,Y.id,J.id,Q.id].map(pe).filter(et),V=Ve(s),we=t.filter(Ze).filter(q=>q.id!==u?.id&&q.id!==f?.id&&q.id!==g?.id).sort((q,fe)=>{const re=V.indexOf(q.id),le=V.indexOf(fe.id);return re!==-1&&le!==-1?re-le:re!==-1?-1:le!==-1?1:new Date(fe.updated_at).getTime()-new Date(q.updated_at).getTime()}).slice(0,4).map(Xe);ee=[...F,...we]}k=ee.some(Qe);let te;e[13]!==T?(te=l=>{if(l.kind==="template-recruit"){const F={"import-deco":()=>c(!0),diagnostics:()=>m(!0),"ai-image":()=>h(!0),"ai-research":()=>b(!0),"lean-canvas":()=>j(!0),"studio-pack":()=>L(!0),"self-healing":()=>z(!0)}[l.onClick];return i.jsx(xe,{agent:l.agent,onSpecialClick:F,tracking:{template_id:l.templateId,tile_kind:"template",action:"open_modal"}},l.key)}return i.jsx(xe,{agent:l.agent,onSpecialClick:()=>T(l.agent.id),tracking:{template_id:l.templateId,tile_kind:l.templateId?"existing":"recent",action:"navigate"}},l.key)},e[13]=T,e[14]=te):te=e[14];const Ne=te;d="w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",_="flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",I=ee.map(Ne),e[0]=s,e[1]=T,e[2]=n,e[3]=R,e[4]=t,e[5]=f,e[6]=g,e[7]=u,e[8]=x,e[9]=k,e[10]=_,e[11]=I,e[12]=d}else f=e[5],g=e[6],u=e[7],x=e[8],k=e[9],_=e[10],I=e[11],d=e[12];let A;e[15]===Symbol.for("react.memo_cache_sentinel")?(A=i.jsx(Ye,{}),e[15]=A):A=e[15];let y;e[16]!==k?(y=k&&i.jsx(Ge,{}),e[16]=k,e[17]=y):y=e[17];let v;e[18]!==_||e[19]!==I||e[20]!==y?(v=i.jsxs("div",{className:_,children:[I,A,y]}),e[18]=_,e[19]=I,e[20]=y,e[21]=v):v=e[21];let O;e[22]!==d||e[23]!==v?(O=i.jsx("div",{className:d,children:v}),e[22]=d,e[23]=v,e[24]=O):O=e[24];let N;e[25]!==o?(N=i.jsx(oe,{open:o,onOpenChange:c}),e[25]=o,e[26]=N):N=e[26];let w;e[27]!==a||e[28]!==u?(w=i.jsx(Pe,{open:a,onOpenChange:m,existingAgent:u}),e[27]=a,e[28]=u,e[29]=w):w=e[29];let C;e[30]!==E||e[31]!==f?(C=i.jsx(Le,{open:E,onOpenChange:h,existingAgent:f}),e[30]=E,e[31]=f,e[32]=C):C=e[32];let D;e[33]!==M||e[34]!==g?(D=i.jsx(ze,{open:M,onOpenChange:b,existingAgent:g}),e[33]=M,e[34]=g,e[35]=D):D=e[35];let K;e[36]!==x||e[37]!==p?(K=i.jsx(Re,{open:p,onOpenChange:j,existingAgent:x}),e[36]=x,e[37]=p,e[38]=K):K=e[38];let U;e[39]!==S?(U=i.jsx(Te,{open:S,onOpenChange:L}),e[39]=S,e[40]=U):U=e[40];let W;e[41]!==P?(W=i.jsx(Be,{open:P,onOpenChange:z}),e[41]=P,e[42]=W):W=e[42];let X;return e[43]!==D||e[44]!==K||e[45]!==U||e[46]!==W||e[47]!==O||e[48]!==N||e[49]!==w||e[50]!==C?(X=i.jsxs(i.Fragment,{children:[O,N,w,C,D,K,U,W]}),e[43]=D,e[44]=K,e[45]=U,e[46]=W,e[47]=O,e[48]=N,e[49]=w,e[50]=C,e[51]=X):X=e[51],X}function Qe(e){return e.kind==="existing"&&e.templateId===null}function Xe(e){return{key:e.id,kind:"existing",templateId:null,agent:e}}function Ze(e){return e.id!==null&&!ve(e.id)}function et(e){return e!==null}function tt(e){return e!==null}function it(e){return e.id==="self-healing-storefront"}function st(e){return e.id==="studio-pack"}function nt(e){return e.id==="lean-canvas"}function rt(e){return e.id==="ai-research"}function lt(e){return e.id==="ai-image"}function ot(e){return e.id==="site-diagnostics"}function at(e){return e.id==="site-editor"}function ct(){const e=$.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",children:i.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",children:Array.from({length:7}).map(mt)})}),e[0]=t):t=e[0],t}function mt(e,t){return i.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[100px] shrink-0",children:[i.jsx(ue,{className:"size-12 rounded-xl shrink-0"}),i.jsx(ue,{className:"h-3 sm:h-4 w-full"})]},t)}function ge(){const e=$.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(B.Suspense,{fallback:i.jsx(ct,{}),children:i.jsx(Je,{})}),e[0]=t):t=e[0],t}const dt=["radial-gradient(ellipse 25% 220% at -5% 120%, rgba(165,149,255,0.35) 0%, transparent 100%)","radial-gradient(ellipse 25% 220% at 105% -20%, rgba(208,236,26,0.32) 0%, transparent 100%)"].join(", "),pt="/decotexture.svg";function he(e){const t=$.c(7),{onClick:s}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundImage:dt},t[0]=r):r=t[0];let n,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:i.jsx(ye,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none bg-transparent"})}),o=i.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),t[1]=n,t[2]=o):(n=t[1],o=t[2]);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("img",{src:pt,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:i.jsx(We,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),t[4]=a):a=t[4];let m;return t[5]!==s?(m=i.jsxs("button",{type:"button",onClick:s,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:r,children:[n,o,c,a]}),t[5]=s,t[6]=m):m=t[6],m}function ft(){const e=$.c(5),{data:t}=ke.useSession();let s;e[0]!==t?.user?.email?(s=Se.decoProfile(t?.user?.email),e[0]=t?.user?.email,e[1]=s):s=e[1];const r=!!t?.user?.email;let n;e[2]!==s||e[3]!==r?(n={queryKey:s,queryFn:ut,enabled:r,staleTime:3e5},e[2]=s,e[3]=r,e[4]=n):n=e[4];const{data:o}=Ie(n);return o?.isDecoUser??!1}async function ut(){const e=await fetch("/api/deco-sites/profile");return e.ok?e.json():{isDecoUser:!1}}function be(){const e=$.c(52),{data:t}=ke.useSession(),[s,r]=B.useState(!1),n=ft(),o=_e(),c=Ue(),{hasDecoKey:a,isZeroBalance:m,isInitialFreeCredit:E,balanceDollars:h,hasOnlyDecoProvider:M}=Fe();if(c.length===0){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("div",{className:"flex-1 flex items-center justify-center px-4 py-10",children:i.jsx(Ke,{})}),e[0]=d):d=e[0],d}let b;e[1]!==t?.user?.name?(b=t?.user?.name?.split(" ")[0]||"there",e[1]=t?.user?.name,e[2]=b):b=e[2];const p=b,j=a&&E&&h!=null,S=a&&m&&M;if(o){let d;e[3]!==h||e[4]!==j?(d=j&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:h})}),e[3]=h,e[4]=j,e[5]=d):d=e[5];let A;e[6]!==S?(A=S&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[6]=S,e[7]=A):A=e[7];let y;e[8]!==p?(y=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",p,"?"]}),e[8]=p,e[9]=y):y=e[9];let v;e[10]!==d||e[11]!==A||e[12]!==y?(v=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[d,A,y]}),e[10]=d,e[11]=A,e[12]=y,e[13]=v):v=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsxs("div",{className:"w-full flex flex-col gap-4 pb-4",children:[i.jsx(ge,{}),i.jsx(G.Input,{showConnectionsBanner:!0})]}),e[14]=O):O=e[14];let N;e[15]!==n?(N=n&&i.jsx("div",{className:"w-full",children:i.jsx(he,{onClick:()=>r(!0)})}),e[15]=n,e[16]=N):N=e[16];let w;e[17]!==v||e[18]!==N?(w=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-4",children:[v,O,N]}),e[17]=v,e[18]=N,e[19]=w):w=e[19];let C;e[20]!==s?(C=i.jsx(oe,{open:s,onOpenChange:r}),e[20]=s,e[21]=C):C=e[21];let D;return e[22]!==w||e[23]!==C?(D=i.jsxs(i.Fragment,{children:[w,C]}),e[22]=w,e[23]=C,e[24]=D):D=e[24],D}let L;e[25]!==h||e[26]!==j?(L=j&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:h})}),e[25]=h,e[26]=j,e[27]=L):L=e[27];let P;e[28]!==S?(P=S&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[28]=S,e[29]=P):P=e[29];let z;e[30]!==p?(z=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",p,"?"]}),e[30]=p,e[31]=z):z=e[31];let R;e[32]!==L||e[33]!==P||e[34]!==z?(R=i.jsxs("div",{className:"text-center mb-10",children:[L,P,z]}),e[32]=L,e[33]=P,e[34]=z,e[35]=R):R=e[35];let T;e[36]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx("div",{className:"w-full",children:i.jsx(G.Input,{showConnectionsBanner:!0})}),e[36]=T):T=e[36];let f;e[37]!==R?(f=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[R,T]}),e[37]=R,e[38]=f):f=e[38];let g;e[39]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx("div",{className:"w-full mt-10 mx-auto",children:i.jsx(ge,{})}),e[39]=g):g=e[39];let u;e[40]!==f?(u=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[f,g]}),e[40]=f,e[41]=u):u=e[41];let x;e[42]!==n?(x=n&&i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-10",children:i.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:i.jsx(he,{onClick:()=>r(!0)})})}),e[42]=n,e[43]=x):x=e[43];let k;e[44]!==u||e[45]!==x?(k=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-10",children:[u,x]}),e[44]=u,e[45]=x,e[46]=k):k=e[46];let _;e[47]!==s?(_=i.jsx(oe,{open:s,onOpenChange:r}),e[47]=s,e[48]=_):_=e[48];let I;return e[49]!==k||e[50]!==_?(I=i.jsxs(i.Fragment,{children:[k,_]}),e[49]=k,e[50]=_,e[51]=I):I=e[51],I}function ss(){const e=$.c(2);if(_e()){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:i.jsx(be,{})}),e[0]=r):r=e[0],r}let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"flex-1 min-h-0 p-1.5 overflow-hidden",children:i.jsx("div",{className:"flex h-full flex-col bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(be,{})})}),e[1]=s):s=e[1],s}export{ss as default};
|
|
1
|
+
import{e as $,j as i,r as B,s as ae,P as Ce,f as je,c as ce,t as me,b as ke,K as Se,n as Ie}from"./index-B3N0ijMe.js";import{u as _e}from"./tooltip-D_KYUaTY.js";import{I as ye}from"./integration-icon-BtzcxrlN.js";import{S as ue}from"./skeleton-DMpf-C3P.js";import{W as H,i as ve}from"./constants-CmcFrIt1.js";import{b as Ae}from"./use-virtual-mcp-fhETXyqA.js";import{u as Oe}from"./use-organization-settings-CNcnwjVj.js";import{i as De}from"./ChevronRight-CeUhrzuf.js";import{s as Ee}from"./Plus-D1tHeJo2.js";import{a as Me}from"./Users03-y_ec4Rh1.js";import{I as oe,S as Pe,L as Re,b as Te}from"./lean-canvas-recruit-modal-Bjwqo_gw.js";import{b as $e,d as Le,e as ze,c as Be,u as Fe,C as G}from"./index-DaDKcZx1.js";import{u as He}from"./use-create-virtual-mcp-CAXfmcVs.js";import{N as Ke}from"./select-model-CTQ1Ef9H.js";import{u as Ue}from"./use-ai-providers-D1Gd_B23.js";import{d as We}from"./XCircle-BkB1Kg5O.js";import"./Container-OQiFme-7.js";import"./agent-icon-CGz6_qSV.js";import"./AlertCircle-CUtXIfwC.js";import"./Tool01-DmFqON6q.js";import"./Archive-Btl9BXLu.js";import"./XClose-DA8jbEWY.js";import"./RefreshCcw01-BESGm5a8.js";import"./ArrowNarrowLeft-CVkIxPAV.js";import"./ArrowUpRight-BrfnA0N_.js";import"./ZapSquare-Biue2YhF.js";import"./CheckCircle-C3sPsdSO.js";import"./Check-Ccw422Wb.js";import"./ChevronDown-cpZNJlz9.js";import"./ChevronUp-C-rBrlqd.js";import"./DotsVertical-BV7jVmIB.js";import"./Star01-nv1oI22I.js";import"./Palette-By9pNqp1.js";import"./SearchMd-eCR8N7AG.js";import"./LayoutLeft-BuJA8_jK.js";import"./LinkExternal01-CRxfzQ_Z.js";import"./Lock01-D2YNxdLq.js";import"./Sun-hmutQjwc.js";import"./Play-CcNC_puc.js";import"./Settings02-xGJb-3cc.js";import"./Shield01-CA7f1yxn.js";import"./Trash01-IeycYlZQ.js";import"./User01-CnizOinw.js";import"./X-C63lgCLS.js";import"./Zap-N-AnbCTG.js";import"./use-collections-Cqjc7P8G.js";import"./use-navigate-to-agent-Cz6wq5hE.js";import"./dialog-C8PiJXDq.js";import"./collection-search-DEySGVjR.js";import"./checkbox-B4-n2Voa.js";import"./use-connection-BIHmIl4c.js";import"./extract-connection-data-CH0LUcT-.js";import"./constants-CjJyIjLn.js";import"./collections-D541sKCa.js";import"./drawer-SuAP4nw3.js";import"./use-mcp-tools-CclZhRpl.js";import"./switch-XlpH18pA.js";import"./input-t1YlgH6I.js";import"./chat-context-CZtWWj-u.js";import"./use-decopilot-events-C4C_kTbf.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-BGvJcXek.js";import"./shell-layout-C-KiCZAL.js";import"./required-auth-layout-B7ZjdWLg.js";import"./use-org-sso-BFDAXwGH.js";import"./pair-C3CCgNgt.js";import"./index-CQv-4_0B.js";import"./use-copy-C_1CDwM3.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-D5VFAtuD.js";import"./spinner-BN00SFRY.js";import"./tabs-O1R9U7Ur.js";import"./form-C_Vw9izm.js";import"./label-DqZ3xuXa.js";import"./select-C6LJ-qZk.js";import"./toggle-group-BrCYmglG.js";import"./dropdown-menu-B6XbAhub.js";import"./index-CtJF4A1M.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C9CMuiWA.js";import"./use-registry-connections-SMKAO0tY.js";import"./useInfiniteQuery-dYBf2D3j.js";import"./infiniteQueryObserver-CFUccQoY.js";import"./card-Bl-Rmbpi.js";import"./collection-tabs-CU9XDvba.js";import"./badge-DP5IQfr9.js";import"./textarea-BVeCELvS.js";import"./connection-form-helpers-1qctTRqV.js";import"./use-infinite-scroll-BHuVaefo.js";import"./useSuspenseInfiniteQuery-02EoyUEK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Bb8VCoXQ.js";import"./settings-section-BXgkeIdc.js";import"./unwrap-tool-result-BYXdCQMg.js";function Ve(e){try{const t=localStorage.getItem(`mesh:chat:recent-agents:${e}`);return t?JSON.parse(t):[]}catch{return[]}}const qe=8;function xe(e){const t=$.c(21),{agent:s,onSpecialClick:r,tracking:n}=e,{org:o}=ae(),c=je();let a;t[0]!==s.id||t[1]!==s.title||t[2]!==c||t[3]!==r||t[4]!==o||t[5]!==n.action||t[6]!==n.template_id||t[7]!==n.tile_kind?(a=()=>{if(me("home_agent_tile_clicked",{template_id:n.template_id,agent_id:s.id,agent_title:s.title,tile_kind:n.tile_kind,action:n.action}),r)r();else{const S=crypto.randomUUID();c({to:"/$org/$taskId",params:{org:o.slug,taskId:S},search:{virtualmcpid:s.id}})}},t[0]=s.id,t[1]=s.title,t[2]=c,t[3]=r,t[4]=o,t[5]=n.action,t[6]=n.template_id,t[7]=n.tile_kind,t[8]=a):a=t[8];const m=a;let E;t[9]===Symbol.for("react.memo_cache_sentinel")?(E=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),t[9]=E):E=t[9];const h=`Select agent ${s.title}`;let M;t[10]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Me,{size:24}),t[10]=M):M=t[10];let b;t[11]!==s.icon||t[12]!==s.title?(b=i.jsx(ye,{icon:s.icon,name:s.title,size:"md",fallbackIcon:M,className:"transition-transform group-hover:scale-110"}),t[11]=s.icon,t[12]=s.title,t[13]=b):b=t[13];let p;t[14]!==s.title?(p=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2 break-words w-full",children:s.title}),t[14]=s.title,t[15]=p):p=t[15];let j;return t[16]!==m||t[17]!==h||t[18]!==b||t[19]!==p?(j=i.jsxs("button",{type:"button",onClick:m,className:E,"aria-label":h,children:[b,p]}),t[16]=m,t[17]=h,t[18]=b,t[19]=p,t[20]=j):j=t[20],j}function Ge(){const e=$.c(8),t=je(),{org:s}=ae();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),e[0]=r):r=e[0];let n;e[1]!==t||e[2]!==s.slug?(n=()=>{me("home_see_all_agents_clicked"),t({to:"/$org/settings/agents",params:{org:s.slug}})},e[1]=t,e[2]=s.slug,e[3]=n):n=e[3];let o,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(De,{size:20,className:"text-foreground"})}),c=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"}),e[4]=o,e[5]=c):(o=e[4],c=e[5]);let a;return e[6]!==n?(a=i.jsxs("button",{type:"button",className:r,"aria-label":"See all agents",onClick:n,children:[o,c]}),e[6]=n,e[7]=a):a=e[7],a}function Ye(){const e=$.c(9);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={navigateOnCreate:!0},e[0]=t):t=e[0];const{createVirtualMCP:s,isCreating:r}=He(t);let n;e[1]!==s?(n=()=>{me("home_create_agent_clicked"),s()},e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group","disabled:opacity-50 disabled:cursor-not-allowed"),e[3]=o):o=e[3];let c,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Ee,{size:20,className:"text-muted-foreground"})}),a=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),e[4]=c,e[5]=a):(c=e[4],a=e[5]);let m;return e[6]!==r||e[7]!==n?(m=i.jsxs("button",{type:"button",onClick:n,disabled:r,className:o,"aria-label":"Create agent",children:[c,a]}),e[6]=r,e[7]=n,e[8]=m):m=e[8],m}function ie(e,t,s){return e.find(r=>r.id!==null&&(r.metadata?.type===t||r.title===s))}function Je(){const e=$.c(52),t=Ae(),{locator:s,org:r}=ae(),n=Oe(),[o,c]=B.useState(!1),[a,m]=B.useState(!1),[E,h]=B.useState(!1),[M,b]=B.useState(!1),[p,j]=B.useState(!1),[S,L]=B.useState(!1),[P,z]=B.useState(!1),[R]=Ce(),T=$e(r.slug);let f,g,u,x,k,_,I,d;if(e[0]!==s||e[1]!==T||e[2]!==n||e[3]!==R||e[4]!==t){const se=H.find(at),Y=H.find(ot),J=H.find(lt),Q=H.find(rt),Z=H.find(nt),de=H.find(st),ne=H.find(it);u=ie(t,Y.id,Y.title),f=ie(t,J.id,J.title),g=ie(t,Q.id,Q.title),x=ie(t,Z.id,Z.title);const pe=l=>{if(l===se.id)return{key:l,kind:"template-recruit",templateId:"site-editor",agent:se,onClick:"import-deco"};if(l===Y.id)return u?{key:u.id,kind:"existing",templateId:"site-diagnostics",agent:u}:{key:l,kind:"template-recruit",templateId:"site-diagnostics",agent:Y,onClick:"diagnostics"};if(l===J.id)return f?{key:f.id,kind:"existing",templateId:"ai-image",agent:f}:{key:l,kind:"template-recruit",templateId:"ai-image",agent:J,onClick:"ai-image"};if(l===Z.id)return x?{key:x.id,kind:"existing",templateId:"lean-canvas",agent:x}:{key:l,kind:"template-recruit",templateId:"lean-canvas",agent:Z,onClick:"lean-canvas"};if(l===de.id)return{key:l,kind:"template-recruit",templateId:"studio-pack",agent:de,onClick:"studio-pack"};if(l===ne.id)return R.experimental_vibecode?{key:l,kind:"template-recruit",templateId:"self-healing-storefront",agent:ne,onClick:"self-healing"}:null;if(l===Q.id)return g?{key:g.id,kind:"existing",templateId:"ai-research",agent:g}:{key:l,kind:"template-recruit",templateId:"ai-research",agent:Q,onClick:"ai-research"};const F=t.find(V=>V.id!==null&&V.id===l&&!ve(V.id));return F?{key:F.id,kind:"existing",templateId:null,agent:F}:null};let ee;if(n?.ids)ee=n.ids.map(pe).filter(tt).slice(0,qe);else{const F=[se.id,ne.id,Y.id,J.id,Q.id].map(pe).filter(et),V=Ve(s),we=t.filter(Ze).filter(q=>q.id!==u?.id&&q.id!==f?.id&&q.id!==g?.id).sort((q,fe)=>{const re=V.indexOf(q.id),le=V.indexOf(fe.id);return re!==-1&&le!==-1?re-le:re!==-1?-1:le!==-1?1:new Date(fe.updated_at).getTime()-new Date(q.updated_at).getTime()}).slice(0,4).map(Xe);ee=[...F,...we]}k=ee.some(Qe);let te;e[13]!==T?(te=l=>{if(l.kind==="template-recruit"){const F={"import-deco":()=>c(!0),diagnostics:()=>m(!0),"ai-image":()=>h(!0),"ai-research":()=>b(!0),"lean-canvas":()=>j(!0),"studio-pack":()=>L(!0),"self-healing":()=>z(!0)}[l.onClick];return i.jsx(xe,{agent:l.agent,onSpecialClick:F,tracking:{template_id:l.templateId,tile_kind:"template",action:"open_modal"}},l.key)}return i.jsx(xe,{agent:l.agent,onSpecialClick:()=>T(l.agent.id),tracking:{template_id:l.templateId,tile_kind:l.templateId?"existing":"recent",action:"navigate"}},l.key)},e[13]=T,e[14]=te):te=e[14];const Ne=te;d="w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",_="flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",I=ee.map(Ne),e[0]=s,e[1]=T,e[2]=n,e[3]=R,e[4]=t,e[5]=f,e[6]=g,e[7]=u,e[8]=x,e[9]=k,e[10]=_,e[11]=I,e[12]=d}else f=e[5],g=e[6],u=e[7],x=e[8],k=e[9],_=e[10],I=e[11],d=e[12];let A;e[15]===Symbol.for("react.memo_cache_sentinel")?(A=i.jsx(Ye,{}),e[15]=A):A=e[15];let y;e[16]!==k?(y=k&&i.jsx(Ge,{}),e[16]=k,e[17]=y):y=e[17];let v;e[18]!==_||e[19]!==I||e[20]!==y?(v=i.jsxs("div",{className:_,children:[I,A,y]}),e[18]=_,e[19]=I,e[20]=y,e[21]=v):v=e[21];let O;e[22]!==d||e[23]!==v?(O=i.jsx("div",{className:d,children:v}),e[22]=d,e[23]=v,e[24]=O):O=e[24];let N;e[25]!==o?(N=i.jsx(oe,{open:o,onOpenChange:c}),e[25]=o,e[26]=N):N=e[26];let w;e[27]!==a||e[28]!==u?(w=i.jsx(Pe,{open:a,onOpenChange:m,existingAgent:u}),e[27]=a,e[28]=u,e[29]=w):w=e[29];let C;e[30]!==E||e[31]!==f?(C=i.jsx(Le,{open:E,onOpenChange:h,existingAgent:f}),e[30]=E,e[31]=f,e[32]=C):C=e[32];let D;e[33]!==M||e[34]!==g?(D=i.jsx(ze,{open:M,onOpenChange:b,existingAgent:g}),e[33]=M,e[34]=g,e[35]=D):D=e[35];let K;e[36]!==x||e[37]!==p?(K=i.jsx(Re,{open:p,onOpenChange:j,existingAgent:x}),e[36]=x,e[37]=p,e[38]=K):K=e[38];let U;e[39]!==S?(U=i.jsx(Te,{open:S,onOpenChange:L}),e[39]=S,e[40]=U):U=e[40];let W;e[41]!==P?(W=i.jsx(Be,{open:P,onOpenChange:z}),e[41]=P,e[42]=W):W=e[42];let X;return e[43]!==D||e[44]!==K||e[45]!==U||e[46]!==W||e[47]!==O||e[48]!==N||e[49]!==w||e[50]!==C?(X=i.jsxs(i.Fragment,{children:[O,N,w,C,D,K,U,W]}),e[43]=D,e[44]=K,e[45]=U,e[46]=W,e[47]=O,e[48]=N,e[49]=w,e[50]=C,e[51]=X):X=e[51],X}function Qe(e){return e.kind==="existing"&&e.templateId===null}function Xe(e){return{key:e.id,kind:"existing",templateId:null,agent:e}}function Ze(e){return e.id!==null&&!ve(e.id)}function et(e){return e!==null}function tt(e){return e!==null}function it(e){return e.id==="self-healing-storefront"}function st(e){return e.id==="studio-pack"}function nt(e){return e.id==="lean-canvas"}function rt(e){return e.id==="ai-research"}function lt(e){return e.id==="ai-image"}function ot(e){return e.id==="site-diagnostics"}function at(e){return e.id==="site-editor"}function ct(){const e=$.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",children:i.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",children:Array.from({length:7}).map(mt)})}),e[0]=t):t=e[0],t}function mt(e,t){return i.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[100px] shrink-0",children:[i.jsx(ue,{className:"size-12 rounded-xl shrink-0"}),i.jsx(ue,{className:"h-3 sm:h-4 w-full"})]},t)}function ge(){const e=$.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(B.Suspense,{fallback:i.jsx(ct,{}),children:i.jsx(Je,{})}),e[0]=t):t=e[0],t}const dt=["radial-gradient(ellipse 25% 220% at -5% 120%, rgba(165,149,255,0.35) 0%, transparent 100%)","radial-gradient(ellipse 25% 220% at 105% -20%, rgba(208,236,26,0.32) 0%, transparent 100%)"].join(", "),pt="/decotexture.svg";function he(e){const t=$.c(7),{onClick:s}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundImage:dt},t[0]=r):r=t[0];let n,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:i.jsx(ye,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none bg-transparent"})}),o=i.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),t[1]=n,t[2]=o):(n=t[1],o=t[2]);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("img",{src:pt,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:i.jsx(We,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),t[4]=a):a=t[4];let m;return t[5]!==s?(m=i.jsxs("button",{type:"button",onClick:s,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:r,children:[n,o,c,a]}),t[5]=s,t[6]=m):m=t[6],m}function ft(){const e=$.c(5),{data:t}=ke.useSession();let s;e[0]!==t?.user?.email?(s=Se.decoProfile(t?.user?.email),e[0]=t?.user?.email,e[1]=s):s=e[1];const r=!!t?.user?.email;let n;e[2]!==s||e[3]!==r?(n={queryKey:s,queryFn:ut,enabled:r,staleTime:3e5},e[2]=s,e[3]=r,e[4]=n):n=e[4];const{data:o}=Ie(n);return o?.isDecoUser??!1}async function ut(){const e=await fetch("/api/deco-sites/profile");return e.ok?e.json():{isDecoUser:!1}}function be(){const e=$.c(52),{data:t}=ke.useSession(),[s,r]=B.useState(!1),n=ft(),o=_e(),c=Ue(),{hasDecoKey:a,isZeroBalance:m,isInitialFreeCredit:E,balanceDollars:h,hasOnlyDecoProvider:M}=Fe();if(c.length===0){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("div",{className:"flex-1 flex items-center justify-center px-4 py-10",children:i.jsx(Ke,{})}),e[0]=d):d=e[0],d}let b;e[1]!==t?.user?.name?(b=t?.user?.name?.split(" ")[0]||"there",e[1]=t?.user?.name,e[2]=b):b=e[2];const p=b,j=a&&E&&h!=null,S=a&&m&&M;if(o){let d;e[3]!==h||e[4]!==j?(d=j&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:h})}),e[3]=h,e[4]=j,e[5]=d):d=e[5];let A;e[6]!==S?(A=S&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[6]=S,e[7]=A):A=e[7];let y;e[8]!==p?(y=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",p,"?"]}),e[8]=p,e[9]=y):y=e[9];let v;e[10]!==d||e[11]!==A||e[12]!==y?(v=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[d,A,y]}),e[10]=d,e[11]=A,e[12]=y,e[13]=v):v=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsxs("div",{className:"w-full flex flex-col gap-4 pb-4",children:[i.jsx(ge,{}),i.jsx(G.Input,{showConnectionsBanner:!0})]}),e[14]=O):O=e[14];let N;e[15]!==n?(N=n&&i.jsx("div",{className:"w-full",children:i.jsx(he,{onClick:()=>r(!0)})}),e[15]=n,e[16]=N):N=e[16];let w;e[17]!==v||e[18]!==N?(w=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-4",children:[v,O,N]}),e[17]=v,e[18]=N,e[19]=w):w=e[19];let C;e[20]!==s?(C=i.jsx(oe,{open:s,onOpenChange:r}),e[20]=s,e[21]=C):C=e[21];let D;return e[22]!==w||e[23]!==C?(D=i.jsxs(i.Fragment,{children:[w,C]}),e[22]=w,e[23]=C,e[24]=D):D=e[24],D}let L;e[25]!==h||e[26]!==j?(L=j&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:h})}),e[25]=h,e[26]=j,e[27]=L):L=e[27];let P;e[28]!==S?(P=S&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[28]=S,e[29]=P):P=e[29];let z;e[30]!==p?(z=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",p,"?"]}),e[30]=p,e[31]=z):z=e[31];let R;e[32]!==L||e[33]!==P||e[34]!==z?(R=i.jsxs("div",{className:"text-center mb-10",children:[L,P,z]}),e[32]=L,e[33]=P,e[34]=z,e[35]=R):R=e[35];let T;e[36]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx("div",{className:"w-full",children:i.jsx(G.Input,{showConnectionsBanner:!0})}),e[36]=T):T=e[36];let f;e[37]!==R?(f=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[R,T]}),e[37]=R,e[38]=f):f=e[38];let g;e[39]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx("div",{className:"w-full mt-10 mx-auto",children:i.jsx(ge,{})}),e[39]=g):g=e[39];let u;e[40]!==f?(u=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[f,g]}),e[40]=f,e[41]=u):u=e[41];let x;e[42]!==n?(x=n&&i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-10",children:i.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:i.jsx(he,{onClick:()=>r(!0)})})}),e[42]=n,e[43]=x):x=e[43];let k;e[44]!==u||e[45]!==x?(k=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-10",children:[u,x]}),e[44]=u,e[45]=x,e[46]=k):k=e[46];let _;e[47]!==s?(_=i.jsx(oe,{open:s,onOpenChange:r}),e[47]=s,e[48]=_):_=e[48];let I;return e[49]!==k||e[50]!==_?(I=i.jsxs(i.Fragment,{children:[k,_]}),e[49]=k,e[50]=_,e[51]=I):I=e[51],I}function ss(){const e=$.c(2);if(_e()){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:i.jsx(be,{})}),e[0]=r):r=e[0],r}let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"flex-1 min-h-0 p-1.5 overflow-hidden",children:i.jsx("div",{className:"flex h-full flex-col bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(be,{})})}),e[1]=s):s=e[1],s}export{ss as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as R,cE as wl,bf as uu,j as J,ao as du,bb as mt,cF as fu,a7 as Zs,a8 as hu,aV as pu,aS as mu,aT as gu,b5 as yu,cD as bu,ae as ku}from"./index-Bq8MNgeV.js";function X(n){this.content=n}X.prototype={constructor:X,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new X(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new X(t)},addToStart:function(n,e){return new X([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new X(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new X(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=X.from(n),n.size?new X(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=X.from(n),n.size?new X(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=X.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};X.from=function(n){if(n instanceof X)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new X(e)};function Ml(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ml(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function El(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=El(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ml(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return El(this,e,t,r)}findIndex(e){if(e==0)return vn(0,e);if(e==this.size)return vn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?vn(t+1,i):vn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Jr={index:0,offset:0};function vn(n,e){return Jr.index=n,Jr.offset=e,Jr}function Wn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Wn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Wn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let B=class Cs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Wn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Cs.none;if(e instanceof Cs)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};B.none=[];class qn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vl(this.content,e+this.openStart,t);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(Tl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new w(e,r,s)}}w.empty=new w(k.empty,0,0);function Tl(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Tl(i.content,e-s-1,t-s-1)))}function vl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=vl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function xu(n,e,t){if(t.openStart>n.depth)throw new qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new qn("Inconsistent open depths");return Al(n,e,t,0)}function Al(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Al(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Su(t,n);return dt(i,Ol(n,o,l,e,r))}else return dt(i,Un(n,e,r))}function Nl(n,e){if(!e.type.compatibleContent(n.type))throw new qn("Cannot join "+e.type.name+" onto "+n.type.name)}function ws(n,e,t){let r=n.node(t);return Nl(r,e.node(t)),r}function ut(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ut(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ut(s.child(l),r);e&&e.depth==t&&e.textOffset&&ut(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function Ol(n,e,t,r,s){let i=n.depth>s&&ws(n,e,s+1),o=r.depth>s&&ws(t,r,s+1),l=[];return en(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Nl(i,o),ut(dt(i,Ol(n,e,t,r,s+1)),l)):(i&&ut(dt(i,Un(n,e,s+1)),l),en(e,t,s,l),o&&ut(dt(o,Un(t,r,s+1)),l)),en(r,null,s,l),new k(l)}function Un(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let s=ws(n,e,t+1);ut(dt(s,Un(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function Su(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class fn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Kn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new fn(t,r,i)}static resolveCached(e,t){let r=Wi.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Wi.set(e,r=new Cu);let s=r.elts[r.i]=fn.resolve(e,t);return r.i=(r.i+1)%wu,s}}class Cu{constructor(){this.elts=[],this.i=0}}const wu=12,Wi=new WeakMap;class Kn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Mu=Object.create(null);class we{constructor(e,t,r,s=B.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Wn(this.attrs,t||e.defaultAttrs||Mu)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new we(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new we(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return w.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new w(c,s.depth-o,i.depth-o)}replace(e,t,r){return xu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return fn.resolveCached(this,e)}resolveNoCache(e){return fn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Dl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=B.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}we.prototype.text=void 0;class Jn extends we{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Jn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class gt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Eu(e,t);if(r.next==null)return gt.empty;let s=Il(r);r.next&&r.err("Unexpected trailing text");let i=Iu(Du(s));return Ru(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
1
|
+
import{r as R,cE as wl,bf as uu,j as J,ao as du,bb as mt,cF as fu,a7 as Zs,a8 as hu,aV as pu,aS as mu,aT as gu,b5 as yu,cD as bu,ae as ku}from"./index-B3N0ijMe.js";function X(n){this.content=n}X.prototype={constructor:X,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new X(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new X(t)},addToStart:function(n,e){return new X([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new X(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new X(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=X.from(n),n.size?new X(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=X.from(n),n.size?new X(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=X.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};X.from=function(n){if(n instanceof X)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new X(e)};function Ml(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ml(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function El(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=El(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ml(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return El(this,e,t,r)}findIndex(e){if(e==0)return vn(0,e);if(e==this.size)return vn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?vn(t+1,i):vn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Jr={index:0,offset:0};function vn(n,e){return Jr.index=n,Jr.offset=e,Jr}function Wn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Wn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Wn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let B=class Cs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Wn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Cs.none;if(e instanceof Cs)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};B.none=[];class qn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vl(this.content,e+this.openStart,t);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(Tl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new w(e,r,s)}}w.empty=new w(k.empty,0,0);function Tl(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Tl(i.content,e-s-1,t-s-1)))}function vl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=vl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function xu(n,e,t){if(t.openStart>n.depth)throw new qn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new qn("Inconsistent open depths");return Al(n,e,t,0)}function Al(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Al(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Su(t,n);return dt(i,Ol(n,o,l,e,r))}else return dt(i,Un(n,e,r))}function Nl(n,e){if(!e.type.compatibleContent(n.type))throw new qn("Cannot join "+e.type.name+" onto "+n.type.name)}function ws(n,e,t){let r=n.node(t);return Nl(r,e.node(t)),r}function ut(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ut(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ut(s.child(l),r);e&&e.depth==t&&e.textOffset&&ut(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function Ol(n,e,t,r,s){let i=n.depth>s&&ws(n,e,s+1),o=r.depth>s&&ws(t,r,s+1),l=[];return en(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Nl(i,o),ut(dt(i,Ol(n,e,t,r,s+1)),l)):(i&&ut(dt(i,Un(n,e,s+1)),l),en(e,t,s,l),o&&ut(dt(o,Un(t,r,s+1)),l)),en(r,null,s,l),new k(l)}function Un(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let s=ws(n,e,t+1);ut(dt(s,Un(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function Su(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class fn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Kn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new fn(t,r,i)}static resolveCached(e,t){let r=Wi.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Wi.set(e,r=new Cu);let s=r.elts[r.i]=fn.resolve(e,t);return r.i=(r.i+1)%wu,s}}class Cu{constructor(){this.elts=[],this.i=0}}const wu=12,Wi=new WeakMap;class Kn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Mu=Object.create(null);class we{constructor(e,t,r,s=B.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Wn(this.attrs,t||e.defaultAttrs||Mu)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new we(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new we(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return w.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new w(c,s.depth-o,i.depth-o)}replace(e,t,r){return xu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return fn.resolveCached(this,e)}resolveNoCache(e){return fn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Dl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=B.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}we.prototype.text=void 0;class Jn extends we{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Jn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Jn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class gt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Eu(e,t);if(r.next==null)return gt.empty;let s=Il(r);r.next&&r.err("Unexpected trailing text");let i=Iu(Du(s));return Ru(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
2
2
|
`)}}gt.empty=new gt(!0);class Eu{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Il(n){let e=[];do e.push(Tu(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Tu(n){let e=[];do e.push(vu(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function vu(n){let e=Ou(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Au(n,e);else break;return e}function qi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Au(n,e){let t=qi(n),r=t;return n.eat(",")&&(n.next!="}"?r=qi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Nu(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function Ou(n){if(n.eat("(")){let e=Il(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Nu(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Du(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Rl(n,e){return e-n}function Ui(n,e){let t=[];return r(e),t.sort(Rl);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function Iu(n){let e=Object.create(null);return t(Ui(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Ui(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new gt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Rl);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Ru(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pl(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Ll(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function Bl(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function zl(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Lu(n,r,e[r]);return t}let Ki=class $l{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zl(e,r.attrs),this.defaultAttrs=Pl(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==gt.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:Ll(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new we(this,this.computeAttrs(e),k.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new we(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(k.empty,!0);return i?new we(this,e,t.append(i),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Bl(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:B.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new $l(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Pu(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Lu{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Pu(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ir{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=zl(e,s.attrs),this.excluded=null;let i=Pl(this.attrs);this.instance=i?new B(this,i):null}create(e=null){return!e&&this.instance?this.instance:new B(this,Ll(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Ir(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Bl(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Fl{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=X.from(e.nodes),t.marks=X.from(e.marks||{}),this.nodes=Ki.compile(this.spec.nodes,this),this.marks=Ir.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=gt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?Ji(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Ji(this,o.split(" "))}this.nodeFromJSON=s=>we.fromJSON(this,s),this.markFromJSON=s=>B.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ki){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Jn(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Ji(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Bu(n){return n.tag!=null}function zu(n){return n.style!=null}class Ge{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Bu(s))this.tags.push(s);else if(zu(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Yi(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Yi(this,t,!0);return r.addAll(e,B.none,t.from,t.to),w.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Vu(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Xi(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Xi(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ge(e,Ge.schemaRules(e)))}}const Vl={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},$u={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_l={ol:!0,ul:!0},hn=1,Ms=2,tn=4;function Gi(n,e,t){return e!=null?(e?hn:0)|(e==="full"?Ms:0):n&&n.whitespace=="pre"?hn|Ms:t&~tn}class An{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=B.none,this.match=i||(o&tn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&hn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Vl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Yi{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Gi(null,t.preserveWhitespace,0)|(r?tn:0);s?i=new An(s.type,s.attrs,B.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new An(null,null,B.none,!0,null,o):i=new An(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Ms?"full":this.localPreserveWS||(s.options&hn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;_l.hasOwnProperty(o)&&this.parser.normalizeLists&&Fu(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:$u.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Vl.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=B.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Qi(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Gi(e,i,o.options);o.options&tn&&o.content.length==0&&(l|=tn);let a=B.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Qi(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new An(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=hn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Fu(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&_l.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Vu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Xi(n){let e={};for(let t in n)e[t]=n[t];return e}function Qi(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class St{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Gr(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Fn(Gr(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Fn(Gr(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Fn(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new St(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Zi(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Zi(e.marks)}}function Zi(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Gr(n){return n.document||window.document}const eo=new WeakMap;function _u(n){let e=eo.get(n);return e===void 0&&eo.set(n,e=Hu(n)),e}function Hu(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Fn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=_u(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Fn(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Hl=65535,jl=Math.pow(2,16);function ju(n,e){return n+e*jl}function to(n){return n&Hl}function Wu(n){return(n-(n&Hl))/jl}const Wl=1,ql=2,Vn=4,Ul=8;class Es{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ul)>0}get deletedBefore(){return(this.delInfo&(Wl|Vn))>0}get deletedAfter(){return(this.delInfo&(ql|Vn))>0}get deletedAcross(){return(this.delInfo&Vn)>0}}class de{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&de.empty)return de.empty}recover(e){let t=0,r=to(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Wu(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:ju(l/3,e-a),m=e==a?ql:e==d?Wl:Vn;return(t<0?e!=a:e!=d)&&(m|=Ul),new Es(h,m,p)}s+=u-c}return r?e+s:new Es(e+s,0,null)}touches(e,t){let r=0,s=to(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new de(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?de.empty:new de(e<0?[0,-e,0]:[0,0,e])}}de.empty=new de([]);class pn{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new pn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new pn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new Es(e,s,null)}}const Yr=Object.create(null);class re{getMap(){return de.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Yr[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Yr)throw new RangeError("Duplicate use of step JSON ID "+e);return Yr[e]=t,t.prototype.jsonID=e,t}}class W{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new W(e,null)}static fail(e){return new W(null,e)}static fromReplace(e,t,r,s){try{return W.ok(e.replace(t,r,s))}catch(i){if(i instanceof qn)return W.fail(i.message);throw i}}}function ei(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(ei(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return k.fromArray(r)}class Ue extends re{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new w(ei(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return W.fromReplace(e,this.from,this.to,i)}invert(){return new Ce(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ue(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ue&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ue(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ue(t.from,t.to,e.markFromJSON(t.mark))}}re.jsonID("addMark",Ue);class Ce extends re{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new w(ei(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return W.fromReplace(e,this.from,this.to,r)}invert(){return new Ue(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ce(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ce&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ce(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ce(t.from,t.to,e.markFromJSON(t.mark))}}re.jsonID("removeMark",Ce);class Ke extends re{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return W.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return W.fromReplace(e,this.pos,this.pos+1,new w(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new Ke(this.pos,t.marks[s]);return new Ke(this.pos,this.mark)}}return new yt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ke(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ke(t.pos,e.markFromJSON(t.mark))}}re.jsonID("addNodeMark",Ke);class yt extends re{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return W.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return W.fromReplace(e,this.pos,this.pos+1,new w(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ke(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new yt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new yt(t.pos,e.markFromJSON(t.mark))}}re.jsonID("removeNodeMark",yt);class j extends re{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&Ts(e,this.from,this.to)?W.fail("Structure replace would overwrite content"):W.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new de([this.from,this.to-this.from,this.slice.size])}invert(e){return new j(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&j.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new j(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof j)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?w.empty:new w(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new j(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?w.empty:new w(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new j(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new j(t.from,t.to,w.fromJSON(e,t.slice),!!t.structure)}}j.MAP_BIAS=1;re.jsonID("replace",j);class G extends re{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Ts(e,this.from,this.gapFrom)||Ts(e,this.gapTo,this.to)))return W.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return W.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?W.fromReplace(e,this.from,this.to,r):W.fail("Content does not fit in gap")}getMap(){return new de([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new G(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new G(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new G(t.from,t.to,t.gapFrom,t.gapTo,w.fromJSON(e,t.slice),t.insert,!!t.structure)}}re.jsonID("replaceAround",G);function Ts(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function qu(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:s.push(o=new Ce(f,h,d[m])));l&&l.to==f?l.to=h:i.push(l=new Ue(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Uu(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof Ir){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Ce(o.from,o.to,o.style)))}function ti(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new j(l,u,w.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Ce(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new w(k.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new j(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);n.replace(l,l,new w(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function Ku(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function jt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!Ku(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Ju(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=k.empty,d=0;for(let p=i,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=i,m=!1;p>t;p--)m||s.after(p+1)<s.end(p)?(m=!0,f=k.from(s.node(p).copy(f)),h++):c++;n.step(new G(a,c,o,l,new w(u.append(f),d,h),u.size-d,!0))}function ni(n,e,t=null,r=n){let s=Gu(n,e),i=s&&Yu(r,e);return i?s.map(no).concat({type:e,attrs:t}).concat(i.map(no)):null}function no(n){return{type:n,attrs:null}}function Gu(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Yu(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Xu(n,e,t){let r=k.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new G(s,i,s,i,new w(r,0,0),t.length,!0))}function Qu(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&Zu(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Jl(n,o,l,i),ti(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new G(d,f,d+1,f-1,new w(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Kl(n,o,l,i),!1}})}function Kl(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Jl(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
|