decocms 4.150.21 → 4.150.22
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-BaA3X0Vc.js → AlertCircle-BHNP9rUU.js} +1 -1
- package/dist/client/assets/{AreaChart-B4pcuH23.js → AreaChart-Dix8LhoJ.js} +1 -1
- package/dist/client/assets/{ArrowUp-Df4rbgne.js → ArrowUp-CYmWic6A.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-fq20wgvL.js → ArrowUpRight-BQZOilTG.js} +1 -1
- package/dist/client/assets/{Check-DdyKCl8O.js → Check-D3kjZMFv.js} +1 -1
- package/dist/client/assets/{CheckCircle-IiUO6eKZ.js → CheckCircle-myRIyunA.js} +1 -1
- package/dist/client/assets/{ChevronDown-BSVV4L9A.js → ChevronDown-Dn2piZ2G.js} +1 -1
- package/dist/client/assets/{ChevronRight-CSgj0z6i.js → ChevronRight-CwImj32A.js} +1 -1
- package/dist/client/assets/{ChevronUp-GR0-Yt4d.js → ChevronUp-N9Uneycs.js} +1 -1
- package/dist/client/assets/{Copy01-Cv0Vuqbe.js → Copy01-CFdaASyO.js} +1 -1
- package/dist/client/assets/{CpuChip01-UMJdnf1a.js → CpuChip01-W_PpJOQC.js} +1 -1
- package/dist/client/assets/{DotsVertical-OBlENp_a.js → DotsVertical-CrKPB-rb.js} +1 -1
- package/dist/client/assets/{Eye-CkjEvMwH.js → Eye-DJcOc9Zw.js} +1 -1
- package/dist/client/assets/{FilterLines-Ca7W3tHb.js → FilterLines-BFYjIaR9.js} +1 -1
- package/dist/client/assets/{HardDrive-B91rzidb.js → HardDrive-B2_Ula85.js} +1 -1
- package/dist/client/assets/{Key01-DVGzNfoY.js → Key01-BU6DEShZ.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Ciug-ep8.js → LayoutLeft-YSlG5Bjd.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CbfqV87q.js → LinkExternal01-C6Bmw0m6.js} +1 -1
- package/dist/client/assets/{LogOut01-B0JVxGo4.js → LogOut01-Cc5p345m.js} +1 -1
- package/dist/client/assets/{Monitor01-CEdUOtdj.js → Monitor01-Car-ubqN.js} +1 -1
- package/dist/client/assets/{Palette-DgmLnO_l.js → Palette-iwM8hSr_.js} +1 -1
- package/dist/client/assets/{Play-DcSuTxiG.js → Play-BOQvMkTV.js} +1 -1
- package/dist/client/assets/{Plus-DUvbS-Yy.js → Plus-CPMXdWiF.js} +1 -1
- package/dist/client/assets/{SearchLg-CSWY8viA.js → SearchLg-Ccga3kHp.js} +1 -1
- package/dist/client/assets/{SearchMd-D0poZQV_.js → SearchMd-kaVQ2swy.js} +1 -1
- package/dist/client/assets/{Settings02-Sy5kNpSu.js → Settings02-D2WBE2j5.js} +1 -1
- package/dist/client/assets/{Shield01-Bcql6hT4.js → Shield01-BrHF2Qbg.js} +1 -1
- package/dist/client/assets/{Star01-2mO5G0Xw.js → Star01-CduFPScO.js} +1 -1
- package/dist/client/assets/{Stars01-DqIThrOc.js → Stars01-BpwKVOpQ.js} +1 -1
- package/dist/client/assets/{Stars02-cKtwD-F2.js → Stars02-C-JOVi71.js} +1 -1
- package/dist/client/assets/{Sun-DsnsEGXF.js → Sun-C2hxlxHa.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BwAs_KcG.js → SwitchHorizontal01-Cm3MVkwA.js} +1 -1
- package/dist/client/assets/{Tool01-D2fd-Mg5.js → Tool01-pHGWkh_u.js} +1 -1
- package/dist/client/assets/{Tool02-C17Y4pBP.js → Tool02-C5toOJ2s.js} +1 -1
- package/dist/client/assets/{Trash01-BiVOd2DS.js → Trash01-BT5A-gEY.js} +1 -1
- package/dist/client/assets/{TrendUp01-D1GkdBOV.js → TrendUp01-ByibXYAc.js} +1 -1
- package/dist/client/assets/{Upload01-k2Sn0RXQ.js → Upload01-wyU_c8og.js} +1 -1
- package/dist/client/assets/{User01-cC3unvvx.js → User01-BgOg9cVa.js} +1 -1
- package/dist/client/assets/{Users01-BdNSg6CC.js → Users01-CXIce8sr.js} +1 -1
- package/dist/client/assets/{Users03-CqyDxwt6.js → Users03-TIXCT7Lp.js} +1 -1
- package/dist/client/assets/{X-Baqkpp1k.js → X-CbfkAYzJ.js} +1 -1
- package/dist/client/assets/{XCircle-8Wd2-AR5.js → XCircle-DsHpzoj1.js} +1 -1
- package/dist/client/assets/{XClose-CBFLmbVP.js → XClose-Dg24hRTQ.js} +1 -1
- package/dist/client/assets/{Zap-C4qF8Cn-.js → Zap-CRace4eX.js} +1 -1
- package/dist/client/assets/{ZapSquare-BH7ie7zg.js → ZapSquare-Bz1NVv_t.js} +1 -1
- package/dist/client/assets/{access-gate-CxXZPkIw.js → access-gate-B8ke5V9B.js} +1 -1
- package/dist/client/assets/{add-section-modal-C7ktQCug.js → add-section-modal-R6NgXhJA.js} +1 -1
- package/dist/client/assets/{agent-icon-q4cV7U67.js → agent-icon-OqQTNFsC.js} +1 -1
- package/dist/client/assets/{agents-list-UZwnNOjT.js → agents-list-_5s5JeHd.js} +1 -1
- package/dist/client/assets/{ai-providers-Cput0kVL.js → ai-providers-D5nYmfZB.js} +1 -1
- package/dist/client/assets/{alert-DjeIAXMV.js → alert-BsZRUEM2.js} +1 -1
- package/dist/client/assets/{alert-dialog-DIwINRgW.js → alert-dialog-iPj1kFsb.js} +1 -1
- package/dist/client/assets/{app-editor-DdSH3pAD.js → app-editor-Cqg3A1oU.js} +1 -1
- package/dist/client/assets/{auth-FouChJbb.js → auth-CU9nh5v5.js} +1 -1
- package/dist/client/assets/{auth-catchall-6cph4qce.js → auth-catchall-BkoM7GHE.js} +1 -1
- package/dist/client/assets/{auth-entry-i0rNcujn.js → auth-entry-Cnd5Yyo4.js} +1 -1
- package/dist/client/assets/{auth-split-layout-3qPwGE8Z.js → auth-split-layout-DEObuTt5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dx2DT3YD.js → authenticate-and-persist-oauth-Y0eAm4-d.js} +1 -1
- package/dist/client/assets/{automation-list-row-Brn7k31U.js → automation-list-row-Bs0wFLr_.js} +1 -1
- package/dist/client/assets/{automation-runs-CP1cxXFo.js → automation-runs-D7N1vsav.js} +1 -1
- package/dist/client/assets/{automations-BlJndOBe.js → automations-CfIG5b76.js} +1 -1
- package/dist/client/assets/{avatar-Du8HEobV.js → avatar-npAOJTNv.js} +1 -1
- package/dist/client/assets/{badge-swCoKQnC.js → badge-B7QGFlT2.js} +1 -1
- package/dist/client/assets/{block-document-DiB0SOp5.js → block-document-Sh0V11uT.js} +1 -1
- package/dist/client/assets/{brand-context-C8l7XNKr.js → brand-context-OfFgyNNa.js} +1 -1
- package/dist/client/assets/{buckets-Bs0sTGAu.js → buckets-sL5kUY2t.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DE5pUVzi.js → bulk-category-panel-DejEHEKu.js} +1 -1
- package/dist/client/assets/{calendar-BZcldUNV.js → calendar-BKP3pISc.js} +1 -1
- package/dist/client/assets/{capability-load-error-CqwI-nav.js → capability-load-error-sN01EV-h.js} +1 -1
- package/dist/client/assets/{card-9OUE6Bzl.js → card-C6G1ZbAT.js} +1 -1
- package/dist/client/assets/{category-editor-JK7DojfI.js → category-editor-Co38yZEY.js} +1 -1
- package/dist/client/assets/{chat-context-DYO1ODPB.js → chat-context-Bkf3Y_YW.js} +1 -1
- package/dist/client/assets/{checkbox-Dd_rqLvT.js → checkbox-B9JLC7kz.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CFsjKhGa.js → cli-auth-success-CsEIMeSH.js} +1 -1
- package/dist/client/assets/{collection-detail-D0rtc2gf.js → collection-detail-zqQkeNgt.js} +1 -1
- package/dist/client/assets/{collection-display-button-iD10GGdW.js → collection-display-button-CUXNxY_5.js} +1 -1
- package/dist/client/assets/{collection-search-5SFjfCC8.js → collection-search-Oul6UFfq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-fW-dsmLE.js → collection-table-wrapper-CDNw08E3.js} +1 -1
- package/dist/client/assets/{collection-tabs-DnykrgWW.js → collection-tabs-DfUm6FcP.js} +1 -1
- package/dist/client/assets/{command-CDVbjOi5.js → command-CFi_nxAL.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CAOuADZ6.js → commerce-onboarding-D4pJOG7X.js} +1 -1
- package/dist/client/assets/{companions-core-6m5dy3es.js → companions-core-DBaOS2yz.js} +1 -1
- package/dist/client/assets/{connect-B_K53Vaa.js → connect-qY6nUUFn.js} +1 -1
- package/dist/client/assets/{connection-DhlrJlFw.js → connection-_j4DuEiI.js} +1 -1
- package/dist/client/assets/{connection-card-CzF-xjYn.js → connection-card-CuJ2QFEt.js} +1 -1
- package/dist/client/assets/{connection-detail-DmWTCewb.js → connection-detail-C52r4r_5.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DRviH-Au.js → connection-form-helpers-Bmw91fnM.js} +1 -1
- package/dist/client/assets/{connections-DGvaZBx3.js → connections-CMPdUO57.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BXMXu1gQ.js → decopilot-sse-pool-CmuV2kHg.js} +1 -1
- package/dist/client/assets/{dialog-C82H2S70.js → dialog-K6gwa7A3.js} +1 -1
- package/dist/client/assets/{domain-settings-DPn_9rd3.js → domain-settings-BPhwVIl_.js} +1 -1
- package/dist/client/assets/{drawer-lnIGl-vb.js → drawer-B_XFR2lX.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CRGAwBji.js → dropdown-menu-DUU_gv0n.js} +1 -1
- package/dist/client/assets/{empty-state-BKzUesA7.js → empty-state-Cp0ZI-r6.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B9TIJ0UC.js → extract-connection-data-2A6KAT-f.js} +1 -1
- package/dist/client/assets/{file-explorer-tNI79jXo.js → file-explorer-Ua7ytqbC.js} +1 -1
- package/dist/client/assets/{form-DAiRK0vx.js → form-CGaw2YpJ.js} +1 -1
- package/dist/client/assets/{general-CXtIEOrf.js → general-DUtn268r.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DUNQ1oJW.js → github-repo-picker-DtakWI4J.js} +1 -1
- package/dist/client/assets/{hooks-Bom1QoTc.js → hooks-D6e52Y4T.js} +1 -1
- package/dist/client/assets/{index-Dv8k1EHh.js → index-BMkqNEv8.js} +1 -1
- package/dist/client/assets/{index-Df7LGqDK.js → index-BcaeODv9.js} +1 -1
- package/dist/client/assets/{index-Z4CG7jJp.js → index-BvRZaTt9.js} +1 -1
- package/dist/client/assets/{index-BDQ6Ogmu.js → index-CpUxmDng.js} +5 -5
- package/dist/client/assets/{index-oBYlsJ_o.js → index-DBLw6mkp.js} +1 -1
- package/dist/client/assets/{index-D7cNsGmf.js → index-DDsGzWAW.js} +3 -3
- package/dist/client/assets/{index-DK8HHLRp.js → index-DI6Brofo.js} +1 -1
- package/dist/client/assets/{index-2KxPRjw5.js → index-DqXmpRSX.js} +3 -3
- package/dist/client/assets/{index-C_5SQGG6.js → index-Dqep-uNC.js} +1 -1
- package/dist/client/assets/{index-B_kqSbsO.js → index-Dy8kFJxu.js} +1 -1
- package/dist/client/assets/{index-C-JAJ-o5.js → index-rTnRAZMH.js} +1 -1
- package/dist/client/assets/{index-redirect-Cj-NIgvU.js → index-redirect-6k6UhjHL.js} +1 -1
- package/dist/client/assets/{input-BAuCATqg.js → input-Bp56QPzT.js} +1 -1
- package/dist/client/assets/{integration-icon-DKBuU8Fr.js → integration-icon-MouDA4V6.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BiHY2r7m.js → invite-member-dialog-CiJy3P9w.js} +1 -1
- package/dist/client/assets/{label-onkw7wrh.js → label-CXwRlswr.js} +1 -1
- package/dist/client/assets/{layout-D8O9_Poo.js → layout-B3j_gVFj.js} +1 -1
- package/dist/client/assets/{login-B0j1yr6w.js → login-Hjf4Zeii.js} +1 -1
- package/dist/client/assets/{mcp-oauth-95IH3VKT.js → mcp-oauth-BHDSTwSV.js} +1 -1
- package/dist/client/assets/{members-Y7A-UiF5.js → members-D2Ea76Rg.js} +1 -1
- package/dist/client/assets/{monaco-editor-CSUtCvVX.js → monaco-editor-C9o8bufU.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Dcug_wR7.js → monitoring-stats-row-C9gp4i2P.js} +1 -1
- package/dist/client/assets/{multi-select-C68tqs9V.js → multi-select-Ch6zaVsE.js} +1 -1
- package/dist/client/assets/{oauth-callback-CqH1tIve.js → oauth-callback-PpJTQQhm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C0UAY-58.js → oauth-callback-ai-provider-BCj-mtF9.js} +1 -1
- package/dist/client/assets/{onboarding-2ZJYmqTH.js → onboarding-CLYVE1a0.js} +1 -1
- package/dist/client/assets/{org-layout-qZcaYBLo.js → org-layout-CYEy29Ts.js} +1 -1
- package/dist/client/assets/{organization-choice-CduZOMP9.js → organization-choice-CWdxGykt.js} +1 -1
- package/dist/client/assets/{orgs-DU0BEJAc.js → orgs-B_4i8FPt.js} +1 -1
- package/dist/client/assets/{page-seo-form-nxKDUI-6.js → page-seo-form-DpY_sul3.js} +1 -1
- package/dist/client/assets/{popover-x1qHvmwD.js → popover-CVg35MYX.js} +1 -1
- package/dist/client/assets/{post-editor-BhfI7Odx.js → post-editor-Bpp2OmpX.js} +1 -1
- package/dist/client/assets/{primitives-DITXbj-2.js → primitives-Br2UT5Vf.js} +1 -1
- package/dist/client/assets/{profile-Dl3k4wub.js → profile-6ivG90Z_.js} +1 -1
- package/dist/client/assets/project-app-view-B3f5qhaT.js +1 -0
- package/dist/client/assets/record-editor-B0thyxFw.js +1 -0
- package/dist/client/assets/{redirect-editor-BamLe0Vb.js → redirect-editor-BOSsbfNh.js} +1 -1
- package/dist/client/assets/{registry-layout-Cfgh3Q9S.js → registry-layout-48QA7RsV.js} +1 -1
- package/dist/client/assets/registry-wAhFzL5P.js +2 -0
- package/dist/client/assets/{reports-2omVoMUm.js → reports-gCTgU_9n.js} +1 -1
- package/dist/client/assets/{require-capability-B1pg4EtO.js → require-capability-CCuG3VBt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-wB2bMMGI.js → required-auth-layout-BU1eh7Wn.js} +1 -1
- package/dist/client/assets/{reset-password-BmxFRY37.js → reset-password-b8TsB2X9.js} +1 -1
- package/dist/client/assets/{roles-ClU1umGx.js → roles-bUKS9vRr.js} +1 -1
- package/dist/client/assets/{search-input-DtCL1YcZ.js → search-input-B0jSz39p.js} +1 -1
- package/dist/client/assets/{secrets-B-dmTgLw.js → secrets-DBVJEtoI.js} +1 -1
- package/dist/client/assets/{sections-editor-DqY5dzLX.js → sections-editor-WmcIIpkR.js} +1 -1
- package/dist/client/assets/{select-DfQiZ-4J.js → select-Cb3tiSDw.js} +1 -1
- package/dist/client/assets/{select-model-Clf7Hlwn.js → select-model-Bl2KSVsJ.js} +1 -1
- package/dist/client/assets/{self-tool-result-BCgUr0ik.js → self-tool-result-qixGUHHp.js} +1 -1
- package/dist/client/assets/{seo-editor-CEUCMyKF.js → seo-editor-CUQXJ1Cd.js} +1 -1
- package/dist/client/assets/{settings-layout-DJLSOlbv.js → settings-layout-D-dv9Bvf.js} +1 -1
- package/dist/client/assets/{settings-section-BaFcIjo5.js → settings-section-awXbfRFI.js} +1 -1
- package/dist/client/assets/{shell-controls-DIMDYHkk.js → shell-controls-wrDqoZ9L.js} +1 -1
- package/dist/client/assets/{shell-layout-B56j-p5N.js → shell-layout-BX0EOEmo.js} +1 -1
- package/dist/client/assets/{sidebar-DpVJgBAa.js → sidebar-BiPc8cWL.js} +1 -1
- package/dist/client/assets/{skeleton-BtiEyhAl.js → skeleton-CT6LmWQk.js} +1 -1
- package/dist/client/assets/{spinner-DPfrt4Tp.js → spinner-5nEupkU1.js} +1 -1
- package/dist/client/assets/{sso-CICOFYfX.js → sso-BH0Yk1RU.js} +1 -1
- package/dist/client/assets/{store-BJgQ6scG.js → store-DwUNbOmZ.js} +1 -1
- package/dist/client/assets/store-registry-Ci03spyl.js +2 -0
- package/dist/client/assets/{studio-tools-CTJuN7Yy.js → studio-tools-DvotCHSX.js} +1 -1
- package/dist/client/assets/{switch-DIwoxI1y.js → switch-C4EXURzI.js} +1 -1
- package/dist/client/assets/{tab-id-DJIms9m1.js → tab-id-CCUuJuHg.js} +1 -1
- package/dist/client/assets/{table-BbRTH9fF.js → table-BrY2fIko.js} +1 -1
- package/dist/client/assets/{tabs-DKyQ4Qe1.js → tabs-o5z4F4nX.js} +1 -1
- package/dist/client/assets/{textarea-Y242n44c.js → textarea-KF0bc7ey.js} +1 -1
- package/dist/client/assets/{toggle-group-BBsmjOfV.js → toggle-group-ImSBP57j.js} +1 -1
- package/dist/client/assets/{toolbar-BaZp82JP.js → toolbar-HbcGIVfO.js} +1 -1
- package/dist/client/assets/{tooltip-CEu_we5y.js → tooltip-DJ0CJ4nu.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B2nAOoUO.js → use-ai-providers-BlXZ8OS9.js} +1 -1
- package/dist/client/assets/{use-automations-irLGHKpI.js → use-automations-D97aWna-.js} +1 -1
- package/dist/client/assets/{use-autosave-BAjK3u8R.js → use-autosave-BuWdMqxb.js} +1 -1
- package/dist/client/assets/{use-capability-Y4a4cK2y.js → use-capability-DjWP4c_V.js} +1 -1
- package/dist/client/assets/{use-clock-tick-kQx_nmDK.js → use-clock-tick-D08rNiex.js} +1 -1
- package/dist/client/assets/{use-connection-CvBcj0iA.js → use-connection-CV5pilpz.js} +1 -1
- package/dist/client/assets/{use-copy-POYUhIaM.js → use-copy-D8Z2epUY.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Df8fpCi4.js → use-create-virtual-mcp-DYyiqJWf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-EvVOUA6S.js → use-debounced-autosave-BYO2w-tQ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-IOz7dnNR.js → use-debounced-value-Pwi9o0RN.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CBOWsaT-.js → use-deco-credits-DwGKxBj1.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dc8-pFMU.js → use-decopilot-events-cGJArGLt.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CxX7cCR_.js → use-delete-connection-Cnp4lOk4.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-ucDRDdNR.js → use-deployment-admin-BGRYyg5T.js} +1 -1
- package/dist/client/assets/{use-file-configs-BsCj6gUu.js → use-file-configs-mdE9JcAP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ccrh4_KW.js → use-infinite-scroll-C92EJ-_j.js} +1 -1
- package/dist/client/assets/{use-join-requests-DjYbXyL8.js → use-join-requests-Da6i-it5.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-vzmxIRHi.js → use-mcp-auth-status-DJKtOtTD.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DRwUSZdO.js → use-mcp-client-DwJl6WIN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-PCSBjtNq.js → use-mcp-tools-BDghoqz7.js} +1 -1
- package/dist/client/assets/{use-members-DjRi0Onl.js → use-members-Evj2zR-F.js} +1 -1
- package/dist/client/assets/{use-mobile-CLE626Yq.js → use-mobile-lAVE_tNN.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CXMG3HNZ.js → use-navigate-to-agent-CvMJ7nhQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BxtVWNiI.js → use-org-auth-client-DXsqXIB3.js} +1 -1
- package/dist/client/assets/{use-org-sso-DBExuOVV.js → use-org-sso-BWke9nQX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DFLLP3Qo.js → use-organization-roles-C3KJEjHx.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DKSNQ1_z.js → use-organization-settings-D9dl8fjV.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BRZCHKHD.js → use-registry-connections-DyTDBh31.js} +1 -1
- package/dist/client/assets/{use-secrets-DfGoccAw.js → use-secrets-DxzABMbU.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DcgHuUFX.js → use-status-sounds-Nup_Tqx4.js} +1 -1
- package/dist/client/assets/{use-tags-DRM6xsgU.js → use-tags-CghR51-0.js} +1 -1
- package/dist/client/assets/{use-view-mode-DvgBYhz6.js → use-view-mode-C9K2zt6M.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D7SVi-2E.js → use-virtual-mcp-Co2Gxa_g.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-W7NcHma4.js +1 -0
- package/dist/client/assets/{useQueries-DVb_HjzV.js → useQueries-DQT-5ztu.js} +1 -1
- package/dist/client/assets/{useRouterState-CJ97gzOK.js → useRouterState-CfpQuL30.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-r5q75ddS.js +1 -0
- package/dist/client/assets/{users-CX6W_kiO.js → users-B34XbaLL.js} +1 -1
- package/dist/client/assets/{variant-calendar-BSUlgs-W.js → variant-calendar-DtyO8s_C.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DULJqLEB.js → view-mode-toggle-Be9Tyce0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +178 -177
- package/dist/server/migrate.js +7 -7
- package/dist/server/server.js +145 -145
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-CrBgtatz.js +0 -1
- package/dist/client/assets/record-editor-DUGdKTe8.js +0 -1
- package/dist/client/assets/registry-B4ci0gM-.js +0 -2
- package/dist/client/assets/store-registry-Di0pCo7I.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BWd6o-wh.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DPyRMURT.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as A,bH as ds,bI as jl,j as b,af as Vl,ax as ut,bJ as Wl,c as fs,b as $l,m as nt,bK as Fi}from"./index-2KxPRjw5.js";import{x as ql}from"./agent-icon-q4cV7U67.js";import{i as Hl}from"./ChevronRight-CSgj0z6i.js";function zi(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function rb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function ib(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function U(n){this.content=n}U.prototype={constructor:U,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,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new U(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new U(t)},addToStart:function(n,e){return new U([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new U(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new U(i)},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=U.from(n),n.size?new U(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=U.from(n),n.size?new U(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=U.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}};U.from=function(n){if(n instanceof U)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new U(e)};function hs(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=hs(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function ps(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=ps(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{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,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(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 i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return hs(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return ps(this,e,t,r)}findIndex(e){if(e==0)return mn(0,e);if(e==this.size)return mn(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 i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?mn(t+1,o):mn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const ir={index:0,offset:0};function mn(n,e){return ir.index=n,ir.offset=e,ir}function Dn(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(!Dn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Dn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Tr{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}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&&Dn(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 i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}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 Tr.none;if(e instanceof Tr)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class En extends Error{}class S{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=gs(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(ms(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 S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function ms(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(ms(o.content,e-i-1,t-i-1)))}function gs(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=gs(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function Jl(n,e,t){if(t.openStart>n.depth)throw new En("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new En("Inconsistent open depths");return ys(n,e,t,0)}function ys(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ys(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return at(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Yl(t,n);return at(o,xs(n,s,a,e,r))}else return at(o,Tn(n,e,r))}function bs(n,e){if(!e.type.compatibleContent(n.type))throw new En("Cannot join "+e.type.name+" onto "+n.type.name)}function Or(n,e,t){let r=n.node(t);return bs(r,e.node(t)),r}function st(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 Ht(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(st(n.nodeAfter,r),o++));for(let a=o;a<s;a++)st(i.child(a),r);e&&e.depth==t&&e.textOffset&&st(e.nodeBefore,r)}function at(n,e){return n.type.checkContent(e),n.copy(e)}function xs(n,e,t,r,i){let o=n.depth>i&&Or(n,e,i+1),s=r.depth>i&&Or(t,r,i+1),a=[];return Ht(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(bs(o,s),st(at(o,xs(n,e,t,r,i+1)),a)):(o&&st(at(o,Tn(n,e,i+1)),a),Ht(e,t,i,a),s&&st(at(s,Tn(t,r,i+1)),a)),Ht(r,null,i,a),new v(a)}function Tn(n,e,t){let r=[];if(Ht(null,n,t,r),n.depth>t){let i=Or(n,e,t+1);st(at(i,Tn(n,e,t+1)),r)}return Ht(e,null,t,r),new v(r)}function Yl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Gt{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],i=e.child(t);return r?e.child(t).cut(r):i}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],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 On(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=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Gt(t,r,o)}static resolveCached(e,t){let r=Li.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Li.set(e,r=new Ul);let i=r.elts[r.i]=Gt.resolve(e,t);return r.i=(r.i+1)%Kl,i}}class Ul{constructor(){this.elts=[],this.i=0}}const Kl=12,Li=new WeakMap;class On{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 Gl=Object.create(null);class be{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.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,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Dn(this.attrs,t||e.defaultAttrs||Gl)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new be(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new be(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 S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return Jl(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+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 i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Gt.resolveCached(this,e)}resolveNoCache(e){return Gt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),vs(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=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=j.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(!j.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 i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}be.prototype.text=void 0;class An extends be{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):vs(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 An(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new An(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 vs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class dt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xl(e,t);if(r.next==null)return dt.empty;let i=ks(r);r.next&&r.err("Unexpected trailing text");let o=ic(rc(i));return oc(o,r),o}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 i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type: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 i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=o(d,a.concat(u));if(f)return f}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let 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 i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
1
|
+
import{r as A,bH as ds,bI as jl,j as b,af as Vl,ax as ut,bJ as Wl,c as fs,b as $l,m as nt,bK as Fi}from"./index-DqXmpRSX.js";import{x as ql}from"./agent-icon-OqQTNFsC.js";import{i as Hl}from"./ChevronRight-CwImj32A.js";function zi(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function rb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function ib(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function U(n){this.content=n}U.prototype={constructor:U,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,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new U(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new U(t)},addToStart:function(n,e){return new U([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new U(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new U(i)},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=U.from(n),n.size?new U(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=U.from(n),n.size?new U(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=U.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}};U.from=function(n){if(n instanceof U)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new U(e)};function hs(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=hs(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function ps(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=ps(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{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,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(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 i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return hs(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return ps(this,e,t,r)}findIndex(e){if(e==0)return mn(0,e);if(e==this.size)return mn(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 i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?mn(t+1,o):mn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const ir={index:0,offset:0};function mn(n,e){return ir.index=n,ir.offset=e,ir}function Dn(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(!Dn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Dn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Tr{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}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&&Dn(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 i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}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 Tr.none;if(e instanceof Tr)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class En extends Error{}class S{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=gs(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(ms(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 S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function ms(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(ms(o.content,e-i-1,t-i-1)))}function gs(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=gs(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function Jl(n,e,t){if(t.openStart>n.depth)throw new En("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new En("Inconsistent open depths");return ys(n,e,t,0)}function ys(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ys(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return at(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Yl(t,n);return at(o,xs(n,s,a,e,r))}else return at(o,Tn(n,e,r))}function bs(n,e){if(!e.type.compatibleContent(n.type))throw new En("Cannot join "+e.type.name+" onto "+n.type.name)}function Or(n,e,t){let r=n.node(t);return bs(r,e.node(t)),r}function st(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 Ht(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(st(n.nodeAfter,r),o++));for(let a=o;a<s;a++)st(i.child(a),r);e&&e.depth==t&&e.textOffset&&st(e.nodeBefore,r)}function at(n,e){return n.type.checkContent(e),n.copy(e)}function xs(n,e,t,r,i){let o=n.depth>i&&Or(n,e,i+1),s=r.depth>i&&Or(t,r,i+1),a=[];return Ht(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(bs(o,s),st(at(o,xs(n,e,t,r,i+1)),a)):(o&&st(at(o,Tn(n,e,i+1)),a),Ht(e,t,i,a),s&&st(at(s,Tn(t,r,i+1)),a)),Ht(r,null,i,a),new v(a)}function Tn(n,e,t){let r=[];if(Ht(null,n,t,r),n.depth>t){let i=Or(n,e,t+1);st(at(i,Tn(n,e,t+1)),r)}return Ht(e,null,t,r),new v(r)}function Yl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Gt{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],i=e.child(t);return r?e.child(t).cut(r):i}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],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 On(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=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Gt(t,r,o)}static resolveCached(e,t){let r=Li.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Li.set(e,r=new Ul);let i=r.elts[r.i]=Gt.resolve(e,t);return r.i=(r.i+1)%Kl,i}}class Ul{constructor(){this.elts=[],this.i=0}}const Kl=12,Li=new WeakMap;class On{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 Gl=Object.create(null);class be{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.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,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Dn(this.attrs,t||e.defaultAttrs||Gl)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new be(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new be(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 S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return Jl(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+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 i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Gt.resolveCached(this,e)}resolveNoCache(e){return Gt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),vs(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=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=j.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(!j.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 i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}be.prototype.text=void 0;class An extends be{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):vs(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 An(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new An(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 vs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class dt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xl(e,t);if(r.next==null)return dt.empty;let i=ks(r);r.next&&r.err("Unexpected trailing text");let o=ic(rc(i));return oc(o,r),o}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 i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type: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 i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=o(d,a.concat(u));if(f)return f}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let 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 i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
2
2
|
`)}}dt.empty=new dt(!0);class Xl{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 ks(n){let e=[];do e.push(Ql(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ql(n){let e=[];do e.push(Zl(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Zl(n){let e=nc(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=ec(n,e);else break;return e}function ji(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function ec(n,e){let t=ji(n),r=t;return n.eat(",")&&(n.next!="}"?r=ji(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function tc(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function nc(n){if(n.eat("(")){let e=ks(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=tc(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 rc(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=t())}else if(s.type=="star"){let l=t();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=t();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=t();i(o(s.expr,l),u),l=u}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=t();r(l,u),i(o(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function ws(n,e){return e-n}function Vi(n,e){let t=[];return r(e),t.sort(ws);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&t.indexOf(l)==-1&&r(l)}}}function ic(n){let e=Object.create(null);return t(Vi(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);Vi(n,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new dt(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(ws);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function oc(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ss(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 Ms(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Cs(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function Ns(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new ac(n,r,e[r]);return t}let Wi=class Ds{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=Ns(e,r.attrs),this.defaultAttrs=Ss(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==dt.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:Ms(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new be(this,this.computeAttrs(e),v.from(t),j.setFrom(r))}createChecked(e=null,t,r){return t=v.from(t),this.checkContent(t),new be(this,this.computeAttrs(e),t,j.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=v.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(v.empty,!0);return o?new be(this,e,t.append(o),j.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){Cs(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:j.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Ds(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function sc(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class ac{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?sc(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class $n{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Ns(e,i.attrs),this.excluded=null;let o=Ss(this.attrs);this.instance=o?new j(this,o):null}create(e=null){return!e&&this.instance?this.instance:new j(this,Ms(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new $n(o,i++,t,s)),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){Cs(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Es{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=U.from(e.nodes),t.marks=U.from(e.marks||{}),this.nodes=Wi.compile(this.spec.nodes,this),this.marks=$n.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=dt.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?$i(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:$i(this,s.split(" "))}this.nodeFromJSON=i=>be.fromJSON(this,i),this.markFromJSON=i=>j.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Wi){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,i)}text(e,t){let r=this.nodes.text;return new An(r,r.defaultAttrs,e,j.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 $i(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function lc(n){return n.tag!=null}function cc(n){return n.style!=null}class He{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(lc(i))this.tags.push(i);else if(cc(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new Hi(this,t,!1);return r.addAll(e,j.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Hi(this,t,!0);return r.addAll(e,j.none,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(fc(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ji(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ji(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const Ts={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},uc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Os={ol:!0,ul:!0},Xt=1,Ar=2,Jt=4;function qi(n,e,t){return e!=null?(e?Xt:0)|(e==="full"?Ar:0):n&&n.whitespace=="pre"?Xt|Ar:t&~Jt}class gn{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=j.none,this.match=o||(s&Jt?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(v.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Xt)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=v.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(v.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&&!Ts.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Hi{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=qi(null,t.preserveWhitespace,0)|(r?Jt:0);i?o=new gn(i.type,i.attrs,j.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new gn(null,null,j.none,!0,null,s):o=new gn(e.schema.topNodeType,null,j.none,!0,null,s),this.nodes=[o],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,i=this.top,o=i.options&Ar?"full":this.localPreserveWS||(i.options&Xt)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),t,!0),a[l]&&this.insertNode(s.text(a[l]),t,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Os.hasOwnProperty(s)&&this.parser.normalizeLists&&dc(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:uc.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(Ts.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=l&&l.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}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 i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,t.attrs||null,r,t.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)t=this.enterInner(i[s],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(t=this.enterInner(o,null,t))}let i=this.findPlace(e,t,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=j.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Yi(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=qi(e,o,s.options);s.options&Jt&&s.content.length==0&&(a|=Jt);let l=j.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Yi(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new gn(e,t,l,i,null,a)),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|=Xt)}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 i=r.length-1;i>=0;i--)e+=r[i].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 i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].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,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(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 dc(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Os.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function fc(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Ji(n){let e={};for(let t in n)e[t]=n[t];return e}function Yi(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class gt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=or(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,t);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=Sn(or(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Sn(or(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Sn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new gt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ui(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ui(e.marks)}}function Ui(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function or(n){return n.document||window.document}const Ki=new WeakMap;function hc(n){let e=Ki.get(n);return e===void 0&&Ki.set(n,e=pc(n)),e}function pc(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 i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function Sn(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 i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=hc(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let a,l=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Sn(n,f,t,r);if(l.appendChild(h),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const As=65535,Ps=Math.pow(2,16);function mc(n,e){return n+e*Ps}function Gi(n){return n&As}function gc(n){return(n-(n&As))/Ps}const Rs=1,Is=2,Mn=4,_s=8;class Pr{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&_s)>0}get deletedBefore(){return(this.delInfo&(Rs|Mn))>0}get deletedAfter(){return(this.delInfo&(Is|Mn))>0}get deletedAcross(){return(this.delInfo&Mn)>0}}class ce{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ce.empty)return ce.empty}recover(e){let t=0,r=Gi(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+gc(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 i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:t:t,h=l+i+(f<0?0:u);if(r)return h;let p=e==(t<0?l:d)?null:mc(a/3,e-l),g=e==l?Is:e==d?Rs:Mn;return(t<0?e!=l:e!=d)&&(g|=_s),new Pr(h,g,p)}i+=u-c}return r?e+i:new Pr(e+i,0,null)}touches(e,t){let r=0,i=Gi(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+t],u=this.ranges[i+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new ce(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ce.empty:new ce(e<0?[0,-e,0]:[0,0,e])}}ce.empty=new ce([]);class Pn{constructor(e,t,r=0,i=e?e.length:0){this.mirror=t,this.from=r,this.to=i,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 i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?r+i: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 i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-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 i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,t);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Pr(e,i,null)}}const sr=Object.create(null);class ee{getMap(){return ce.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=sr[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 sr)throw new RangeError("Duplicate use of step JSON ID "+e);return sr[e]=t,t.prototype.jsonID=e,t}}class ${constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new $(e,null)}static fail(e){return new $(null,e)}static fromReplace(e,t,r,i){try{return $.ok(e.replace(t,r,i))}catch(o){if(o instanceof En)return $.fail(o.message);throw o}}}function Gr(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Gr(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return v.fromArray(r)}class We extends ee{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),i=r.node(r.sharedDepth(this.to)),o=new S(Gr(t.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,o)}invert(){return new ge(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 We(t.pos,r.pos,this.mark)}merge(e){return e instanceof We&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new We(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 We(t.from,t.to,e.markFromJSON(t.mark))}}ee.jsonID("addMark",We);class ge extends ee{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 S(Gr(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,r)}invert(){return new We(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 ge(t.pos,r.pos,this.mark)}merge(e){return e instanceof ge&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ge(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 ge(t.from,t.to,e.markFromJSON(t.mark))}}ee.jsonID("removeMark",ge);class $e extends ee{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.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 i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new $e(this.pos,t.marks[i]);return new $e(this.pos,this.mark)}}return new ft(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $e(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 $e(t.pos,e.markFromJSON(t.mark))}}ee.jsonID("addNodeMark",$e);class ft extends ee{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new $e(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ft(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 ft(t.pos,e.markFromJSON(t.mark))}}ee.jsonID("removeNodeMark",ft);class W extends ee{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Rr(e,this.from,this.to)?$.fail("Structure replace would overwrite content"):$.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ce([this.from,this.to-this.from,this.slice.size])}invert(e){return new W(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&&W.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new W(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof W)||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?S.empty:new S(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new W(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?S.empty:new S(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new W(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 W(t.from,t.to,S.fromJSON(e,t.slice),!!t.structure)}}W.MAP_BIAS=1;ee.jsonID("replace",W);class J extends ee{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Rr(e,this.from,this.gapFrom)||Rr(e,this.gapTo,this.to)))return $.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?$.fromReplace(e,this.from,this.to,r):$.fail("Content does not fit in gap")}getMap(){return new ce([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 J(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),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new J(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,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 J(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}ee.jsonID("replaceAround",J);function Rr(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function yc(n,e,t,r){let i=[],o=[],s,a;n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+l.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=h:i.push(s=new ge(f,h,d[g])));a&&a.to==f?a.to=h:o.push(a=new We(f,h,r))}}),i.forEach(l=>n.step(l)),o.forEach(l=>n.step(l))}function bc(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof $n){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;u<l.length;u++){let d=l[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==o-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>n.step(new ge(s.from,s.to,s.style)))}function Xr(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)s.push(new W(a,u,S.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new ge(a,u,c.marks[f]));if(i&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new S(v.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),s.push(new W(a+f.index,a+f.index+f[0].length,p))}}a=u}if(!r.validEnd){let l=r.fillBefore(v.empty,!0);n.replace(a,a,new S(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function xc(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function _t(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,o=0;;--r){let s=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-o;if(r<n.depth&&s.canReplace(a,l,t))return r;if(r==0||s.type.spec.isolating||!xc(s,a,l))break;a&&(i=1),l<s.childCount&&(o=1)}return null}function vc(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=v.empty,d=0;for(let p=o,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=v.from(r.node(p).copy(u)),d++):l--;let f=v.empty,h=0;for(let p=o,g=!1;p>t;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=v.from(i.node(p).copy(f)),h++):c++;n.step(new J(l,c,s,a,new S(u.append(f),d,h),u.size-d,!0))}function Qr(n,e,t=null,r=n){let i=kc(n,e),o=i&&wc(r,e);return o?i.map(Xi).concat({type:e,attrs:t}).concat(o.map(Xi)):null}function Xi(n){return{type:n,attrs:null}}function kc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function wc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:s}function Sc(n,e,t){let r=v.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let a=t[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=v.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new J(i,o,i,o,new S(r,0,0),t.length,!0))}function Mc(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&Cc(n.doc,n.mapping.slice(o).map(a),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&&Fs(n,s,a,o),Xr(n,n.mapping.slice(o).map(a,1),r,void 0,c===null);let u=n.mapping.slice(o),d=u.map(a,1),f=u.map(a+s.nodeSize,1);return n.step(new J(d,f,d+1,f-1,new S(v.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Bs(n,s,a,o),!1}})}function Bs(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Fs(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`
|
package/dist/client/assets/{capability-load-error-CqwI-nav.js → capability-load-error-sN01EV-h.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,b as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-
|
|
1
|
+
import{c as p,b as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-DqXmpRSX.js";function v(){const e=p.c(23),t=y(),d=h(),{locator:x}=j();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(b,{size:28})}),e[0]=u):u=e[0];let i;e[1]!==t?(i=t("common.capabilityLoadError.title"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("h3",{className:"text-lg font-medium",children:i}),e[3]=i,e[4]=l):l=e[4];let r;e[5]!==t?(r=t("common.capabilityLoadError.description"),e[5]=t,e[6]=r):r=e[6];let a;e[7]!==r?(a=s.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=a):a=e[8];let o;e[9]!==l||e[10]!==a?(o=s.jsxs("div",{className:"space-y-1",children:[l,a]}),e[9]=l,e[10]=a,e[11]=o):o=e[11];let n;e[12]!==x||e[13]!==d?(n=()=>d.invalidateQueries({queryKey:C.myCapabilities(x)}),e[12]=x,e[13]=d,e[14]=n):n=e[14];let c;e[15]!==t?(c=t("common.capabilityLoadError.tryAgain"),e[15]=t,e[16]=c):c=e[16];let m;e[17]!==n||e[18]!==c?(m=s.jsx(E,{variant:"outline",size:"sm",onClick:n,children:c}),e[17]=n,e[18]=c,e[19]=m):m=e[19];let f;return e[20]!==o||e[21]!==m?(f=s.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[u,o,m]}),e[20]=o,e[21]=m,e[22]=f):f=e[22],f}export{v as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as n,j as c}from"./index-
|
|
1
|
+
import{c as l,m as n,j as c}from"./index-DqXmpRSX.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,r as k,m as V,j as t,b as X,B as I,k as Y,t as $}from"./index-2KxPRjw5.js";import{i as Z}from"./XCircle-8Wd2-AR5.js";import{b0 as _,C as U}from"./agent-icon-q4cV7U67.js";import{n as K}from"./LinkExternal01-CbfqV87q.js";import{A as tt,a as ot,b as et,c as rt,d as it,e as st,f as at,g as nt}from"./alert-dialog-DIwINRgW.js";import{I as W}from"./input-BAuCATqg.js";import{L as H}from"./label-onkw7wrh.js";import{P as mt,O as lt,Q as pt,a5 as ct,I as dt,T as B,W as gt,a6 as ut,U as xt}from"./index-BDQ6Ogmu.js";import{c as ft,B as ht,a as yt}from"./block-document-DiB0SOp5.js";import{u as bt}from"./use-autosave-BAjK3u8R.js";import{t as jt}from"./ChevronDown-BSVV4L9A.js";import{t as vt,v as Et,r as Ct}from"./automation-runs-CP1cxXFo.js";import{s as b,E as Nt}from"./primitives-DITXbj-2.js";import"./AlertCircle-BaA3X0Vc.js";import"./Tool01-D2fd-Mg5.js";import"./ArrowUp-Df4rbgne.js";import"./Settings02-Sy5kNpSu.js";import"./Tool02-C17Y4pBP.js";import"./ArrowUpRight-fq20wgvL.js";import"./TrendUp01-D1GkdBOV.js";import"./ZapSquare-BH7ie7zg.js";import"./Users03-CqyDxwt6.js";import"./CheckCircle-IiUO6eKZ.js";import"./Check-DdyKCl8O.js";import"./ChevronRight-CSgj0z6i.js";import"./ChevronUp-GR0-Yt4d.js";import"./DotsVertical-OBlENp_a.js";import"./Stars02-cKtwD-F2.js";import"./Copy01-Cv0Vuqbe.js";import"./CpuChip01-UMJdnf1a.js";import"./Eye-CkjEvMwH.js";import"./FilterLines-Ca7W3tHb.js";import"./Star01-2mO5G0Xw.js";import"./Palette-DgmLnO_l.js";import"./SwitchHorizontal01-BwAs_KcG.js";import"./HardDrive-B91rzidb.js";import"./Key01-DVGzNfoY.js";import"./LayoutLeft-Ciug-ep8.js";import"./LogOut01-B0JVxGo4.js";import"./Monitor01-CEdUOtdj.js";import"./Sun-DsnsEGXF.js";import"./Play-DcSuTxiG.js";import"./Plus-DUvbS-Yy.js";import"./SearchLg-CSWY8viA.js";import"./SearchMd-D0poZQV_.js";import"./Shield01-Bcql6hT4.js";import"./Stars01-DqIThrOc.js";import"./Trash01-BiVOd2DS.js";import"./Upload01-k2Sn0RXQ.js";import"./User01-cC3unvvx.js";import"./Users01-BdNSg6CC.js";import"./XClose-CBFLmbVP.js";import"./X-Baqkpp1k.js";import"./Zap-C4qF8Cn-.js";import"./chat-context-DYO1ODPB.js";import"./tab-id-DJIms9m1.js";import"./dialog-C82H2S70.js";import"./hooks-Bom1QoTc.js";import"./use-mcp-client-DRwUSZdO.js";import"./auth-FouChJbb.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BXMXu1gQ.js";import"./studio-tools-CTJuN7Yy.js";import"./use-virtual-mcp-D7SVi-2E.js";import"./use-ai-providers-B2nAOoUO.js";import"./use-decopilot-events-Dc8-pFMU.js";import"./use-organization-settings-DKSNQ1_z.js";import"./spinner-DPfrt4Tp.js";import"./tooltip-CEu_we5y.js";import"./drawer-lnIGl-vb.js";import"./collection-search-5SFjfCC8.js";import"./use-mobile-CLE626Yq.js";import"./AreaChart-B4pcuH23.js";import"./index-Dv8k1EHh.js";import"./calendar-BZcldUNV.js";import"./shell-layout-B56j-p5N.js";import"./avatar-Du8HEobV.js";import"./required-auth-layout-wB2bMMGI.js";import"./use-org-sso-DBExuOVV.js";import"./index-D7cNsGmf.js";import"./get-initials-D-f_fDFw.js";import"./popover-x1qHvmwD.js";import"./dropdown-menu-CRGAwBji.js";import"./github-repo-picker-DUNQ1oJW.js";import"./use-debounced-value-IOz7dnNR.js";import"./use-connection-CvBcj0iA.js";import"./authenticate-and-persist-oauth-Dx2DT3YD.js";import"./mcp-oauth-95IH3VKT.js";import"./use-mcp-tools-PCSBjtNq.js";import"./extract-connection-data-B9TIJ0UC.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-CXMG3HNZ.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-C2RHf8fG.js";import"./use-members-DjRi0Onl.js";import"./use-org-auth-client-BxtVWNiI.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-tags-DRM6xsgU.js";import"./use-copy-POYUhIaM.js";import"./command-CDVbjOi5.js";import"./index-Z4CG7jJp.js";import"./companions-core-6m5dy3es.js";import"./form-DAiRK0vx.js";import"./select-DfQiZ-4J.js";import"./tabs-DKyQ4Qe1.js";import"./toggle-group-BBsmjOfV.js";import"./use-deco-credits-CBOWsaT-.js";import"./sidebar-DpVJgBAa.js";import"./toolbar-BaZp82JP.js";import"./skeleton-BtiEyhAl.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CzF-xjYn.js";import"./use-registry-connections-BRZCHKHD.js";import"./useInfiniteQuery-BWd6o-wh.js";import"./use-infinite-scroll-ccrh4_KW.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-9OUE6Bzl.js";import"./integration-icon-DKBuU8Fr.js";import"./textarea-Y242n44c.js";import"./connection-form-helpers-DRviH-Au.js";import"./collection-tabs-DnykrgWW.js";import"./badge-swCoKQnC.js";import"./useSuspenseInfiniteQuery-DPyRMURT.js";import"./select-model-Clf7Hlwn.js";import"./checkbox-Dd_rqLvT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BaFcIjo5.js";import"./use-is-desktop-app-BNujXJc_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DcgHuUFX.js";import"./empty-state-BKzUesA7.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-Y4a4cK2y.js";import"./monaco-editor-CSUtCvVX.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-vzmxIRHi.js";import"./use-debounced-autosave-EvVOUA6S.js";import"./index-oBYlsJ_o.js";import"./search-input-DtCL1YcZ.js";import"./switch-DIwoxI1y.js";import"./use-secrets-DfGoccAw.js";import"./useQueries-DVb_HjzV.js";import"./use-file-configs-BsCj6gUu.js";import"./use-automations-irLGHKpI.js";import"./automation-list-row-Brn7k31U.js";import"./table-BbRTH9fF.js";import"./use-clock-tick-kQx_nmDK.js";function St(j){const o=J.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,w=v===void 0?!1:v,[f,P]=k.useState(w);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function xr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:w,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=k.useState(s),[g,E]=k.useState(null),[C,T]=k.useState(!1),z=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=z.length,M=e=>n("slug",e),Q=async(e,S)=>{const G=b(i.name);T(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:G,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),$.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),$.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{T(!1)}},q=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){M(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(K,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:q,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:_,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:w,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&Q(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{xr as CategoryEditor};
|
|
1
|
+
import{c as J,r as k,m as V,j as t,b as X,B as I,k as Y,t as $}from"./index-DqXmpRSX.js";import{i as Z}from"./XCircle-DsHpzoj1.js";import{b0 as _,C as U}from"./agent-icon-OqQTNFsC.js";import{n as K}from"./LinkExternal01-C6Bmw0m6.js";import{A as tt,a as ot,b as et,c as rt,d as it,e as st,f as at,g as nt}from"./alert-dialog-iPj1kFsb.js";import{I as W}from"./input-Bp56QPzT.js";import{L as H}from"./label-CXwRlswr.js";import{P as mt,O as lt,Q as pt,a5 as ct,I as dt,T as B,W as gt,a6 as ut,U as xt}from"./index-CpUxmDng.js";import{c as ft,B as ht,a as yt}from"./block-document-Sh0V11uT.js";import{u as bt}from"./use-autosave-BuWdMqxb.js";import{t as jt}from"./ChevronDown-Dn2piZ2G.js";import{t as vt,v as Et,r as Ct}from"./automation-runs-D7N1vsav.js";import{s as b,E as Nt}from"./primitives-Br2UT5Vf.js";import"./AlertCircle-BHNP9rUU.js";import"./Tool01-pHGWkh_u.js";import"./ArrowUp-CYmWic6A.js";import"./Settings02-D2WBE2j5.js";import"./Tool02-C5toOJ2s.js";import"./ArrowUpRight-BQZOilTG.js";import"./TrendUp01-ByibXYAc.js";import"./ZapSquare-Bz1NVv_t.js";import"./Users03-TIXCT7Lp.js";import"./CheckCircle-myRIyunA.js";import"./Check-D3kjZMFv.js";import"./ChevronRight-CwImj32A.js";import"./ChevronUp-N9Uneycs.js";import"./DotsVertical-CrKPB-rb.js";import"./Stars02-C-JOVi71.js";import"./Copy01-CFdaASyO.js";import"./CpuChip01-W_PpJOQC.js";import"./Eye-DJcOc9Zw.js";import"./FilterLines-BFYjIaR9.js";import"./Star01-CduFPScO.js";import"./Palette-iwM8hSr_.js";import"./SwitchHorizontal01-Cm3MVkwA.js";import"./HardDrive-B2_Ula85.js";import"./Key01-BU6DEShZ.js";import"./LayoutLeft-YSlG5Bjd.js";import"./LogOut01-Cc5p345m.js";import"./Monitor01-Car-ubqN.js";import"./Sun-C2hxlxHa.js";import"./Play-BOQvMkTV.js";import"./Plus-CPMXdWiF.js";import"./SearchLg-Ccga3kHp.js";import"./SearchMd-kaVQ2swy.js";import"./Shield01-BrHF2Qbg.js";import"./Stars01-BpwKVOpQ.js";import"./Trash01-BT5A-gEY.js";import"./Upload01-wyU_c8og.js";import"./User01-BgOg9cVa.js";import"./Users01-CXIce8sr.js";import"./XClose-Dg24hRTQ.js";import"./X-CbfkAYzJ.js";import"./Zap-CRace4eX.js";import"./chat-context-Bkf3Y_YW.js";import"./tab-id-CCUuJuHg.js";import"./dialog-K6gwa7A3.js";import"./hooks-D6e52Y4T.js";import"./use-mcp-client-DwJl6WIN.js";import"./auth-CU9nh5v5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CmuV2kHg.js";import"./studio-tools-DvotCHSX.js";import"./use-virtual-mcp-Co2Gxa_g.js";import"./use-ai-providers-BlXZ8OS9.js";import"./use-decopilot-events-cGJArGLt.js";import"./use-organization-settings-D9dl8fjV.js";import"./spinner-5nEupkU1.js";import"./tooltip-DJ0CJ4nu.js";import"./drawer-B_XFR2lX.js";import"./collection-search-Oul6UFfq.js";import"./use-mobile-lAVE_tNN.js";import"./AreaChart-Dix8LhoJ.js";import"./index-BMkqNEv8.js";import"./calendar-BKP3pISc.js";import"./shell-layout-BX0EOEmo.js";import"./avatar-npAOJTNv.js";import"./required-auth-layout-BU1eh7Wn.js";import"./use-org-sso-BWke9nQX.js";import"./index-DDsGzWAW.js";import"./get-initials-D-f_fDFw.js";import"./popover-CVg35MYX.js";import"./dropdown-menu-DUU_gv0n.js";import"./github-repo-picker-DtakWI4J.js";import"./use-debounced-value-Pwi9o0RN.js";import"./use-connection-CV5pilpz.js";import"./authenticate-and-persist-oauth-Y0eAm4-d.js";import"./mcp-oauth-BHDSTwSV.js";import"./use-mcp-tools-BDghoqz7.js";import"./extract-connection-data-2A6KAT-f.js";import"./metadata-dUsYcpuu.js";import"./use-navigate-to-agent-CvMJ7nhQ.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-C2RHf8fG.js";import"./use-members-Evj2zR-F.js";import"./use-org-auth-client-DXsqXIB3.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-tags-CghR51-0.js";import"./use-copy-D8Z2epUY.js";import"./command-CFi_nxAL.js";import"./index-BvRZaTt9.js";import"./companions-core-DBaOS2yz.js";import"./form-CGaw2YpJ.js";import"./select-Cb3tiSDw.js";import"./tabs-o5z4F4nX.js";import"./toggle-group-ImSBP57j.js";import"./use-deco-credits-DwGKxBj1.js";import"./sidebar-BiPc8cWL.js";import"./toolbar-HbcGIVfO.js";import"./skeleton-CT6LmWQk.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CuJ2QFEt.js";import"./use-registry-connections-DyTDBh31.js";import"./useInfiniteQuery-W7NcHma4.js";import"./use-infinite-scroll-C92EJ-_j.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-C6G1ZbAT.js";import"./integration-icon-MouDA4V6.js";import"./textarea-KF0bc7ey.js";import"./connection-form-helpers-Bmw91fnM.js";import"./collection-tabs-DfUm6FcP.js";import"./badge-B7QGFlT2.js";import"./useSuspenseInfiniteQuery-r5q75ddS.js";import"./select-model-Bl2KSVsJ.js";import"./checkbox-B9JLC7kz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-awXbfRFI.js";import"./use-is-desktop-app-BNujXJc_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Nup_Tqx4.js";import"./empty-state-Cp0ZI-r6.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DjWP4c_V.js";import"./monaco-editor-C9o8bufU.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DJKtOtTD.js";import"./use-debounced-autosave-BYO2w-tQ.js";import"./index-DBLw6mkp.js";import"./search-input-B0jSz39p.js";import"./switch-C4EXURzI.js";import"./use-secrets-DxzABMbU.js";import"./useQueries-DQT-5ztu.js";import"./use-file-configs-mdE9JcAP.js";import"./use-automations-D97aWna-.js";import"./automation-list-row-Bs0wFLr_.js";import"./table-BrY2fIko.js";import"./use-clock-tick-D08rNiex.js";function St(j){const o=J.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,w=v===void 0?!1:v,[f,P]=k.useState(w);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function xr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:w,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=k.useState(s),[g,E]=k.useState(null),[C,T]=k.useState(!1),z=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=z.length,M=e=>n("slug",e),Q=async(e,S)=>{const G=b(i.name);T(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:G,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),$.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),$.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{T(!1)}},q=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){M(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(K,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:q,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(H,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:_,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:w,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&Q(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{xr as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as x,a2 as M,Y as i,a5 as Ie,a3 as de,a4 as Se,aH as we,cn as kt,b9 as Ue,a_ as it,c as Y,F as Z,K as oe,n as rt,aI as It,J as lt,u as Ne,o as Fe,t as ce,I as he,G as me,d as ct,f as wt,r as S,e as Mt,j as xe,b as $e,a as Ct,v as Tt,a9 as At,p as Pt}from"./index-2KxPRjw5.js";import{d as _t,q as Rt,A as dt,t as Et,u as $t,n as Dt,w as Ot}from"./tab-id-DJIms9m1.js";import{S as Ut,u as Lt,e as Nt,b as Ft}from"./hooks-Bom1QoTc.js";import{u as ut,c as qt}from"./studio-tools-CTJuN7Yy.js";import{a as jt,u as Kt,S as Vt}from"./use-mcp-client-DRwUSZdO.js";import{u as Qt}from"./use-virtual-mcp-D7SVi-2E.js";import{p as Bt,u as Ht,b as ye,i as Wt,c as Gt}from"./use-ai-providers-B2nAOoUO.js";import{u as Xt}from"./use-decopilot-events-Dc8-pFMU.js";import{b as zt}from"./use-organization-settings-DKSNQ1_z.js";const ve=x({connection_id:i().describe("Connection ID"),selected_tools:M(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:M(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:M(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),pt=ve.extend({selected_tools:ve.shape.selected_tools.optional(),selected_resources:ve.shape.selected_resources.optional(),selected_prompts:ve.shape.selected_prompts.optional()}),Yt=x({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),Zt=x({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:x({type:Ue("ext-app"),appId:i(),args:Se(i(),it()).optional()})}),Jt=x({defaultMainView:x({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:Ie().nullable().optional(),cmsDefaultOpen:Ie().nullable().optional(),tabs:M(Zt).optional()}),Ze=x({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Se(i(),it()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:we().int().positive().optional(),maxHeight:we().int().positive().optional()}),qe=x({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:M(Yt).nullable().optional(),layout:Jt.nullable().optional(),homeTile:Ze.nullable().optional(),homeTiles:M(Ze).nullable().optional(),homePrompts:M(i()).nullable().optional()});function as(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const s=t?.homeTile;return s?[s]:[]}const en=/^[A-Za-z_][A-Za-z0-9_]*$/,Je=i().min(1).regex(en,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),tn=kt("kind",[x({key:Je,kind:Ue("literal"),value:i()}),x({key:Je,kind:Ue("secret"),secretId:i().min(1)})]),nn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,sn=x({host:i().min(1).regex(nn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),je=x({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:M(tn).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:M(sn).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),Ke=x({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:we().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),on=de(["agent-sandbox","user-desktop"]),an=de(["agent-sandbox","user-desktop","cluster"]);function Ve(t){return t==="cluster"?"agent-sandbox":t}const ht={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:on.optional(),createdAt:we().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:x({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},mt=x(ht),rn=x({...ht,sandboxProviderKind:an.optional()});function ln(t){const e=rn.parse(t);return mt.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Ve(e.sandboxProviderKind):void 0})}function is(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,s={};for(const[n,o]of Object.entries(e)){if(!o||typeof o!="object"||n!=="cluster"&&n!=="agent-sandbox"&&n!=="user-desktop")continue;const a=Ve(n);try{if(n==="cluster"&&s[a])continue;s[a]=ln(o)}catch{}}return s}const Qe=Se(i().describe("userId"),Se(i().describe("branch"),Se(i().describe("sandboxProviderKind"),mt))),cn=x({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:de(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:we().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Be=M(cn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),dn=de(["smart","code-review","open"]),He=dn.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),rs=x({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:de(["active","inactive"]).describe("Current status"),pinned:Ie().describe("Whether this space is pinned to the sidebar"),metadata:x({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:M(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:M(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:qe.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:je.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Qe.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Be,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:He,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().describe("Metadata"),connections:M(ve).describe("Connections with their selected tools, resources, and prompts")}),bt=x({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});x({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:de(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:Ie().optional().default(!1).describe("Pin to sidebar"),metadata:x({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:M(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:M(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:qe.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:je.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Qe.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Be,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:He,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:M(pt).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:M(bt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});x({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:de(["active","inactive"]).optional().describe("New status"),pinned:Ie().optional().describe("Pin/unpin from sidebar"),metadata:x({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:M(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:M(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:qe.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:je.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Qe.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Be,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:He,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:M(pt).optional().describe("New connections (replaces existing)"),prompts:M(bt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function un(t,e=[]){return t==="stop"?e.filter(o=>o.type==="text"&&o.text).map(o=>o.text).join(`
|
|
1
|
+
import{X as x,a2 as M,Y as i,a5 as Ie,a3 as de,a4 as Se,aH as we,cn as kt,b9 as Ue,a_ as it,c as Y,F as Z,K as oe,n as rt,aI as It,J as lt,u as Ne,o as Fe,t as ce,I as he,G as me,d as ct,f as wt,r as S,e as Mt,j as xe,b as $e,a as Ct,v as Tt,a9 as At,p as Pt}from"./index-DqXmpRSX.js";import{d as _t,q as Rt,A as dt,t as Et,u as $t,n as Dt,w as Ot}from"./tab-id-CCUuJuHg.js";import{S as Ut,u as Lt,e as Nt,b as Ft}from"./hooks-D6e52Y4T.js";import{u as ut,c as qt}from"./studio-tools-DvotCHSX.js";import{a as jt,u as Kt,S as Vt}from"./use-mcp-client-DwJl6WIN.js";import{u as Qt}from"./use-virtual-mcp-Co2Gxa_g.js";import{p as Bt,u as Ht,b as ye,i as Wt,c as Gt}from"./use-ai-providers-BlXZ8OS9.js";import{u as Xt}from"./use-decopilot-events-cGJArGLt.js";import{b as zt}from"./use-organization-settings-D9dl8fjV.js";const ve=x({connection_id:i().describe("Connection ID"),selected_tools:M(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:M(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:M(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),pt=ve.extend({selected_tools:ve.shape.selected_tools.optional(),selected_resources:ve.shape.selected_resources.optional(),selected_prompts:ve.shape.selected_prompts.optional()}),Yt=x({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),Zt=x({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:x({type:Ue("ext-app"),appId:i(),args:Se(i(),it()).optional()})}),Jt=x({defaultMainView:x({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:Ie().nullable().optional(),cmsDefaultOpen:Ie().nullable().optional(),tabs:M(Zt).optional()}),Ze=x({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Se(i(),it()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:we().int().positive().optional(),maxHeight:we().int().positive().optional()}),qe=x({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:M(Yt).nullable().optional(),layout:Jt.nullable().optional(),homeTile:Ze.nullable().optional(),homeTiles:M(Ze).nullable().optional(),homePrompts:M(i()).nullable().optional()});function as(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const s=t?.homeTile;return s?[s]:[]}const en=/^[A-Za-z_][A-Za-z0-9_]*$/,Je=i().min(1).regex(en,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),tn=kt("kind",[x({key:Je,kind:Ue("literal"),value:i()}),x({key:Je,kind:Ue("secret"),secretId:i().min(1)})]),nn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,sn=x({host:i().min(1).regex(nn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),je=x({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:M(tn).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:M(sn).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),Ke=x({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:we().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),on=de(["agent-sandbox","user-desktop"]),an=de(["agent-sandbox","user-desktop","cluster"]);function Ve(t){return t==="cluster"?"agent-sandbox":t}const ht={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:on.optional(),createdAt:we().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:x({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},mt=x(ht),rn=x({...ht,sandboxProviderKind:an.optional()});function ln(t){const e=rn.parse(t);return mt.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Ve(e.sandboxProviderKind):void 0})}function is(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,s={};for(const[n,o]of Object.entries(e)){if(!o||typeof o!="object"||n!=="cluster"&&n!=="agent-sandbox"&&n!=="user-desktop")continue;const a=Ve(n);try{if(n==="cluster"&&s[a])continue;s[a]=ln(o)}catch{}}return s}const Qe=Se(i().describe("userId"),Se(i().describe("branch"),Se(i().describe("sandboxProviderKind"),mt))),cn=x({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:de(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:we().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Be=M(cn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),dn=de(["smart","code-review","open"]),He=dn.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),rs=x({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:de(["active","inactive"]).describe("Current status"),pinned:Ie().describe("Whether this space is pinned to the sidebar"),metadata:x({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:M(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:M(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:qe.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:je.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Qe.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Be,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:He,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().describe("Metadata"),connections:M(ve).describe("Connections with their selected tools, resources, and prompts")}),bt=x({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});x({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:de(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:Ie().optional().default(!1).describe("Pin to sidebar"),metadata:x({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:M(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:M(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:qe.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:je.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Qe.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Be,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:He,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:M(pt).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:M(bt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});x({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:de(["active","inactive"]).optional().describe("New status"),pinned:Ie().optional().describe("Pin/unpin from sidebar"),metadata:x({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:M(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:M(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:qe.nullable().optional().describe("UI customization settings"),githubRepo:Ke.nullable().optional().describe("Linked GitHub repository"),runtime:je.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:Qe.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Be,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:He,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking.")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:M(pt).optional().describe("New connections (replaces existing)"),prompts:M(bt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function un(t,e=[]){return t==="stop"?e.filter(o=>o.type==="text"&&o.text).map(o=>o.text).join(`
|
|
2
2
|
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}const Re={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function pn(t,e){if(!t)return null;const s=e?Ve(e):null;if(t==="decopilot"&&s===null)return"decopilot";for(const[n,o]of Object.entries(Re))if(o.harness===t&&o.sandbox===s)return n;return null}function hn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function mn({pendingOption:t,lockedHarness:e,availability:s}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":t==="claude-code-desktop"||t==="codex-desktop"?t:hn(s)}function bn(t,e){return e&&t&&Re[t].sandbox==="user-desktop"?"decopilot":t}const et={online:!1,capabilities:[],ready:!1};function ft(t){const e=Y.c(9),{org:s}=Z(),n=ut(),o=t?.fast??!1;let a;e[0]!==s.id?(a=oe.currentLink(s.id),e[0]=s.id,e[1]=a):a=e[1];let r;e[2]!==n?(r=async()=>{const y=await n.call("LINK_CURRENT_GET",{});return y?{...y,ready:!0}:{...et,ready:!0}},e[2]=n,e[3]=r):r=e[3];const l=o?1e3:1e4,p=o?2e3:15e3;let u;e[4]!==a||e[5]!==r||e[6]!==l||e[7]!==p?(u={queryKey:a,queryFn:r,staleTime:l,refetchInterval:p,refetchOnWindowFocus:!0},e[4]=a,e[5]=r,e[6]=l,e[7]=p,e[8]=u):u=e[8];const{data:m}=rt(u);return m??et}function fn(){const t=Y.c(11),e=ft(),s=It();let n;t[0]!==e.capabilities||t[1]!==e.online?(n=e.online&&e.capabilities.includes("claude-code"),t[0]=e.capabilities,t[1]=e.online,t[2]=n):n=t[2];let o;t[3]!==e.capabilities||t[4]!==e.online?(o=e.online&&e.capabilities.includes("codex"),t[3]=e.capabilities,t[4]=e.online,t[5]=o):o=t[5];let a;return t[6]!==e.online||t[7]!==s.runtime.agentSandbox||t[8]!==n||t[9]!==o?(a={agentSandbox:s.runtime.agentSandbox,userDesktop:e.online,claudeCode:n,codex:o},t[6]=e.online,t[7]=s.runtime.agentSandbox,t[8]=n,t[9]=o,t[10]=a):a=t[10],a}function gn(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function yn(t){const e=t?t.split("/").filter(Boolean):[],s=e[0]==="public",n=s?e[1]??null:null,o=s?n?`public-${n}`:null:e[0]??null,a=(s?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:s,publicSet:n,readOnly:s}}function ls(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const tt="public-";function gt(t){return t.startsWith(tt)?t.slice(tt.length):null}function cs(t,e){const s=gt(t);return s?`public/${s}/${e}`:`${t}/${e}`}function vn(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Sn(t){const{volume:e,dirPath:s}=yn(t);if(!e)return null;let n;if(e==="home")n="org/home";else if(e==="outputs")n="org/.outputs";else if(e==="uploads")n="org/.uploads";else{const o=gt(e);n=o?`org/public/${o}`:`org/${e}`}return s?`${n}/${s}`:n}function xn(t){const e=Y.c(21);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const n=lt(s);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=Ne(o);let r;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(r=(typeof a.main=="string"?_t(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=r):r=e[6];const l=r;let p;if(e[7]!==n?.params.appSlug||e[8]!==n?.params.collectionName||e[9]!==n?.params.itemId||e[10]!==l||e[11]!==t){if(p=[],t&&p.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`),l){let m;e[13]!==l?(m=Sn(l),e[13]=l,e[14]=m):m=e[14];const y=m;let I;e[15]!==l?(I=vn(l),e[15]=l,e[16]=I):I=e[16],p.push(`### Currently Open File
|
|
4
4
|
The user has this file open in the Library and is most likely referring to it:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,m as d,j as c,bu as l,bv as m}from"./index-
|
|
1
|
+
import{c as n,m as d,j as c,bu as l,bv as m}from"./index-DqXmpRSX.js";import{i as b}from"./Check-D3kjZMFv.js";function x(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{x as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-DqXmpRSX.js";import{A as u}from"./auth-split-layout-DEObuTt5.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|