decocms 4.371.2 → 4.371.3
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-B6wwVpE_.js → AlertCircle-VdsUyDsL.js} +1 -1
- package/dist/client/assets/{AreaChart-DxZFwWge.js → AreaChart-DIlQ1K_d.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CTfWEOn_.js → ArrowLeft-C1Jxz-38.js} +1 -1
- package/dist/client/assets/{ArrowRight-BSx8IDKt.js → ArrowRight-B7Hvi15P.js} +1 -1
- package/dist/client/assets/{ArrowUp-D9wCXP2E.js → ArrowUp-BFEFFMY1.js} +1 -1
- package/dist/client/assets/{CartesianChart-Cd50pbhw.js → CartesianChart-DNNied0N.js} +1 -1
- package/dist/client/assets/{Check-CV5wE14s.js → Check-CCHtN2JL.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cm7e50OB.js → CheckCircle-62tE7hh5.js} +1 -1
- package/dist/client/assets/{ChevronRight-DF00Hxze.js → ChevronRight-CFHS6mGR.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-a1L8nkl_.js → ChevronSelectorVertical-C0AfY4BX.js} +1 -1
- package/dist/client/assets/{ChevronUp-BIJ33mq-.js → ChevronUp-58_Y92Dn.js} +1 -1
- package/dist/client/assets/{Copy01-Djqdozj7.js → Copy01-DUI0S5po.js} +1 -1
- package/dist/client/assets/{CreditCard01-B-FZXFU_.js → CreditCard01-BCIcmSsj.js} +1 -1
- package/dist/client/assets/{Database01-D2F-33im.js → Database01-CgMLXTB0.js} +1 -1
- package/dist/client/assets/{DotsVertical-W2TFUW8Q.js → DotsVertical-CllTTtzx.js} +1 -1
- package/dist/client/assets/{Download01-DHvQwHCH.js → Download01-D1unS475.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Dpp0jtVr.js → ErrorBarContext-BOFaiRT7.js} +1 -1
- package/dist/client/assets/{Eye-Cdgfzyki.js → Eye-DJsJHMdz.js} +1 -1
- package/dist/client/assets/{File02-9BP6PQyf.js → File02-C6lTNDur.js} +1 -1
- package/dist/client/assets/{GitBranch01-0XUwaJ1e.js → GitBranch01-DuVUhLIs.js} +1 -1
- package/dist/client/assets/{Globe01-B4Ox45iT.js → Globe01-BxiM5hiu.js} +1 -1
- package/dist/client/assets/{HardDrive-Bltl0EZP.js → HardDrive-DYoYQlgK.js} +1 -1
- package/dist/client/assets/{Image01-BKXjYImN.js → Image01-BG5OCK-e.js} +1 -1
- package/dist/client/assets/{Key01-Bn3b2-E-.js → Key01-BVFF75nH.js} +1 -1
- package/dist/client/assets/{Line-BaEgZjON.js → Line-pQ4sdY-j.js} +1 -1
- package/dist/client/assets/{Link01-tgfA2O1O.js → Link01-DqK8epHf.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BeEySOGR.js → LinkExternal01-2jYkMKWf.js} +1 -1
- package/dist/client/assets/{MessageCircle01-BUZyBws-.js → MessageCircle01-BleWTCg5.js} +1 -1
- package/dist/client/assets/{Monitor01-DiNkCarU.js → Monitor01-C3zWsNr6.js} +1 -1
- package/dist/client/assets/{Package-OGz-YQyF.js → Package-XpklebG8.js} +1 -1
- package/dist/client/assets/{Palette-zweuRfuf.js → Palette-Cj-GyLY8.js} +1 -1
- package/dist/client/assets/{Play-CyJUaITh.js → Play-B7qVZhEj.js} +1 -1
- package/dist/client/assets/{Plus-BHzo7JpN.js → Plus-B3s19fbp.js} +1 -1
- package/dist/client/assets/{Printer-BCdINSRW.js → Printer-hmMbghuH.js} +1 -1
- package/dist/client/assets/{SearchLg-BEUzmm7J.js → SearchLg-B9ADJIQh.js} +1 -1
- package/dist/client/assets/{SearchMd-BZxbKw5D.js → SearchMd-Cte0Flmz.js} +1 -1
- package/dist/client/assets/{Sector-BcG--B_v.js → Sector-B1R50REh.js} +1 -1
- package/dist/client/assets/{Settings02-DT6SgAR5.js → Settings02-BG6PEEFh.js} +1 -1
- package/dist/client/assets/{Share07-B18DW4IB.js → Share07-XK-81nC3.js} +1 -1
- package/dist/client/assets/{Shield01-CobmTjIR.js → Shield01-BiMmptW_.js} +1 -1
- package/dist/client/assets/{Stars01-Bumlbnyx.js → Stars01-BbGiUZr8.js} +1 -1
- package/dist/client/assets/{Sun-DSmRhca0.js → Sun-DPlu9nq0.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BBsMhIe7.js → SwitchHorizontal01-D4Xp6795.js} +1 -1
- package/dist/client/assets/{Tool01-Cdrnwb5w.js → Tool01-C-Av9hw4.js} +1 -1
- package/dist/client/assets/{Tool02-DQ3gW2fr.js → Tool02-BWLvpTJ3.js} +1 -1
- package/dist/client/assets/{Trash01-DUXtn-7w.js → Trash01-DBG5z7yc.js} +1 -1
- package/dist/client/assets/{TrendUp01-NLayJLL7.js → TrendUp01-CVQkVUqd.js} +1 -1
- package/dist/client/assets/{Upload01-BtQp1axP.js → Upload01-C3vxmuR3.js} +1 -1
- package/dist/client/assets/{User01-CKqNomg0.js → User01-D61cOv44.js} +1 -1
- package/dist/client/assets/{UserSquare-8e1dRiH3.js → UserSquare-v3UhY-wJ.js} +1 -1
- package/dist/client/assets/{Users01-57sXIUc1.js → Users01-D6vUv3VA.js} +1 -1
- package/dist/client/assets/{Users03-BgcZr7a4.js → Users03-CvWlZOBQ.js} +1 -1
- package/dist/client/assets/{X-Bb2W3Osa.js → X-Bl6p2PHk.js} +1 -1
- package/dist/client/assets/{XCircle-DY948r_f.js → XCircle-CVRXuYKn.js} +1 -1
- package/dist/client/assets/{XClose-DZSiMxAy.js → XClose-DlSEqtvq.js} +1 -1
- package/dist/client/assets/{Zap-CgzyzKhX.js → Zap-CPc5P9In.js} +1 -1
- package/dist/client/assets/{ZoomOut-D2tsmZom.js → ZoomOut-hBrRCaxr.js} +1 -1
- package/dist/client/assets/{access-gate-DvdkRhsp.js → access-gate-CMGFwr69.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-D5tuJQCZ.js → add-connection-dialog-CP5Mmevx.js} +1 -1
- package/dist/client/assets/{agent-analytics-DBHFYrDv.js → agent-analytics-DCS3uSsr.js} +1 -1
- package/dist/client/assets/agent-app-Oc3NFHyv.js +1 -0
- package/dist/client/assets/{agent-assets-BZdHKM5s.js → agent-assets-DdglfWnk.js} +1 -1
- package/dist/client/assets/{agent-automation-BVb3Gxiv.js → agent-automation-CxX1vxsE.js} +1 -1
- package/dist/client/assets/{agent-automations-DrdTF_QF.js → agent-automations-B3u2ZCWn.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DgyTqo8E.js → agent-connect-sources-CfWPAAvA.js} +1 -1
- package/dist/client/assets/agent-deck-C0ZMDlgi.js +1 -0
- package/dist/client/assets/{agent-e2e-C5dxsLW1.js → agent-e2e-C5hBbr4z.js} +1 -1
- package/dist/client/assets/{agent-experiments-Dvha9zfY.js → agent-experiments-D0YmjUod.js} +1 -1
- package/dist/client/assets/agent-file-CGQaQeAZ.js +1 -0
- package/dist/client/assets/{agent-git-DXUQUk2o.js → agent-git-DEYO9KtF.js} +1 -1
- package/dist/client/assets/{agent-hosting-RNHPEFX0.js → agent-hosting-Cr3IQ-v1.js} +1 -1
- package/dist/client/assets/{agent-icon-N33S3RAD.js → agent-icon-8_uoIw9T.js} +1 -1
- package/dist/client/assets/agent-library-file-KT4Hio_6.js +1 -0
- package/dist/client/assets/{agent-monitor-CUV7DsFY.js → agent-monitor-0aQD9bjQ.js} +1 -1
- package/dist/client/assets/{agent-overview-Bnvq7c9I.js → agent-overview-COVktEcD.js} +1 -1
- package/dist/client/assets/agent-settings-C4VbiDnu.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CC5pYwiP.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-DxPTZb5h.js → agent-site-editor-content-Cl3K8_0X.js} +2 -2
- package/dist/client/assets/agent-site-editor-mpw2Csz7.js +24 -0
- package/dist/client/assets/{agent-site-editor-preview-BpA11_Yu.js → agent-site-editor-preview-BA36sYGX.js} +3 -3
- package/dist/client/assets/agent-view-CkU0IYt7.js +1 -0
- package/dist/client/assets/{agent-view-guard-CC_CXZXz.js → agent-view-guard-C-KDGm4-.js} +1 -1
- package/dist/client/assets/{agents-list-Cm0rD16a.js → agents-list-CKuwQGtx.js} +1 -1
- package/dist/client/assets/{ai-providers-Dnhw3m11.js → ai-providers-DKHAMpyi.js} +1 -1
- package/dist/client/assets/{alert-d7x6nkTQ.js → alert-Dt-3NCs0.js} +1 -1
- package/dist/client/assets/{alert-dialog-DbPVXIpB.js → alert-dialog-DyR5Q_Tj.js} +1 -1
- package/dist/client/assets/{api-keys-CwvucqWH.js → api-keys-BDNm5-Dl.js} +1 -1
- package/dist/client/assets/api-keys-CC37GpyL.js +1 -0
- package/dist/client/assets/app-editor-D15HlBI9.js +1 -0
- package/dist/client/assets/{asset-utils-B2X6-u_s.js → asset-utils-DASitpN8.js} +1 -1
- package/dist/client/assets/{auth-BG4qFQSm.js → auth-NpT8e85Y.js} +1 -1
- package/dist/client/assets/{auth-catchall--QKnfVt2.js → auth-catchall-CvSC5l_t.js} +1 -1
- package/dist/client/assets/{auth-entry-DIE9VSj_.js → auth-entry-SXWVX_Hn.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CuPiTJfk.js → auth-split-layout-ivHBNujg.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BJgrfhXe.js → authenticate-and-persist-oauth-B1pRhuCl.js} +1 -1
- package/dist/client/assets/{automation-list-row-3PF7uSOA.js → automation-list-row-Ddk9fHNo.js} +1 -1
- package/dist/client/assets/{automation-runs-DfS2YRF7.js → automation-runs-CuZxmXdR.js} +1 -1
- package/dist/client/assets/automations-x9QUNuFg.js +1 -0
- package/dist/client/assets/{autosend-LG-eI-i8.js → autosend-4JcmiES9.js} +1 -1
- package/dist/client/assets/{avatar-BZNxKLv6.js → avatar-DU3VcflD.js} +1 -1
- package/dist/client/assets/{badge-DmLrCyyG.js → badge-D2mSgg83.js} +1 -1
- package/dist/client/assets/{block-document-CTJ131BZ.js → block-document-B-RAdc0f.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-gNEzksKW.js → blocks-preview-workspace-context-BI0TdpjN.js} +1 -1
- package/dist/client/assets/{breadcrumb-CxBUbqBt.js → breadcrumb-zgHbWMCc.js} +1 -1
- package/dist/client/assets/{buckets-BW_7lKAt.js → buckets-BS0Xnpxe.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CwRZ-otf.js → build-improve-prompt-doc-B33wGST8.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-G2OqyB3c.js → bulk-category-panel-CbySlXro.js} +1 -1
- package/dist/client/assets/{calendar-BqtZqzlI.js → calendar-ButUng_A.js} +1 -1
- package/dist/client/assets/{capability-load-error-BxPWpjvk.js → capability-load-error-DRsV-GAi.js} +1 -1
- package/dist/client/assets/{cards-BGZYCw96.js → cards-D39Wg-JZ.js} +1 -1
- package/dist/client/assets/category-editor-DbD1-U8M.js +1 -0
- package/dist/client/assets/{chart-CXffRtMB.js → chart-CiBx-he_.js} +1 -1
- package/dist/client/assets/{chat-context-_q59AZUK.js → chat-context-Bl66TDog.js} +1 -1
- package/dist/client/assets/{chat-draft-DltxgUNg.js → chat-draft-Dr_jRWei.js} +1 -1
- package/dist/client/assets/{checkbox-ClB-7cKk.js → checkbox-CDV3hkI4.js} +1 -1
- package/dist/client/assets/{choose-editor-BYimc8N3.js → choose-editor-CIPqa9qE.js} +1 -1
- package/dist/client/assets/{cli-auth-success-98VSKTvF.js → cli-auth-success-CN1jtlEB.js} +1 -1
- package/dist/client/assets/{client-icons-YajzpeXZ.js → client-icons-BpIRk6Eq.js} +1 -1
- package/dist/client/assets/{collapsible-COaBQVgw.js → collapsible-DCvGxmdk.js} +1 -1
- package/dist/client/assets/{collection-detail-CgUMSgRZ.js → collection-detail-CFy4iVJB.js} +1 -1
- package/dist/client/assets/{collection-display-button-DKAiHd3Q.js → collection-display-button-BLff0NvM.js} +1 -1
- package/dist/client/assets/{collection-search-BiXs1jPm.js → collection-search-Cg8WYO7F.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BB_AGLzP.js → collection-table-wrapper-2OEvZUQj.js} +1 -1
- package/dist/client/assets/{collection-tabs-B7pXy1cp.js → collection-tabs-BxByj3JB.js} +1 -1
- package/dist/client/assets/{combobox-DXnYCRkU.js → combobox-LgVI0Z7L.js} +1 -1
- package/dist/client/assets/{command-DPtIHCMz.js → command-DeI04U1v.js} +1 -1
- package/dist/client/assets/{command-palette-store-DcmJmibB.js → command-palette-store-B6erqxcF.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DpradbnX.js → companion-mcps-section-CPXt61w3.js} +1 -1
- package/dist/client/assets/{connect-BnfQsmIn.js → connect-NgsFpLka.js} +1 -1
- package/dist/client/assets/{connect-layout-CplzJp7H.js → connect-layout-DivbguN1.js} +1 -1
- package/dist/client/assets/{connection-B0rKAD6V.js → connection-Gh-gc5IV.js} +1 -1
- package/dist/client/assets/{connection-card-C75zeoKz.js → connection-card-DOCSy-r2.js} +1 -1
- package/dist/client/assets/{connection-detail-DBRQ_EOn.js → connection-detail-BtFpRXk1.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-exw5Pq0Z.js → connection-form-helpers-COFd-YYJ.js} +1 -1
- package/dist/client/assets/{connections-FiVc_NNY.js → connections-BnXSX27r.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CGINyQXi.js → create-organization-dialog-D_YqMWxW.js} +1 -1
- package/dist/client/assets/{decofile-api-D_1mxcIY.js → decofile-api-DwtnpwwY.js} +1 -1
- package/dist/client/assets/{decopilot-DXH0qU5M.js → decopilot-CqQIn3DK.js} +1 -1
- package/dist/client/assets/{dialog-B23QWo9i.js → dialog-CALEql2B.js} +1 -1
- package/dist/client/assets/{discover-DxcSmxGr.js → discover-0sB_P0gJ.js} +1 -1
- package/dist/client/assets/{domain-settings-g2fp2Ye9.js → domain-settings-BsQLpeO_.js} +1 -1
- package/dist/client/assets/{download-app-dialog-TA6NzEO8.js → download-app-dialog-4cfbO5ZR.js} +1 -1
- package/dist/client/assets/{drawer-BxrIZkXS.js → drawer-Wjj3JV6a.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BxecOnD3.js → dropdown-menu-BwJm6kWw.js} +1 -1
- package/dist/client/assets/{editor-CfFjFo6R.js → editor-B6qYQm3q.js} +1 -1
- package/dist/client/assets/{empty-state-CkZ5yLkM.js → empty-state-CDt1Oweu.js} +1 -1
- package/dist/client/assets/{empty-state-T4gSZ7lE.js → empty-state-Dpo9j0Bh.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DqpsAFUm.js → extract-connection-data-dNt5_vXq.js} +1 -1
- package/dist/client/assets/{feature-gate-iZNxCNZa.js → feature-gate-D7DzzVJY.js} +1 -1
- package/dist/client/assets/{feature-paywall-BVM5GBPX.js → feature-paywall-rsbHj8go.js} +1 -1
- package/dist/client/assets/{file-explorer-BCzFr5oi.js → file-explorer-CFWGO-U6.js} +1 -1
- package/dist/client/assets/{file-preview-CgkV4Grk.js → file-preview-r_4dJHJu.js} +1 -1
- package/dist/client/assets/{file-share-button-C91aKMmk.js → file-share-button-tzoRmnRq.js} +1 -1
- package/dist/client/assets/{file-type-icon-CIaeJ2vN.js → file-type-icon-Dnlnjv2X.js} +1 -1
- package/dist/client/assets/{folder-icon-B2n98w8h.js → folder-icon-DZt6oPqY.js} +1 -1
- package/dist/client/assets/{form-D274Mm5V.js → form-BDbK3JnT.js} +1 -1
- package/dist/client/assets/{gateway-client-Da7gZR-i.js → gateway-client-BKiwX9p5.js} +1 -1
- package/dist/client/assets/{general-DcrWhsvd.js → general-Ok0oiZzk.js} +1 -1
- package/dist/client/assets/{github-icon-B_cEBMlN.js → github-icon-Pmxow-OZ.js} +1 -1
- package/dist/client/assets/{home-kWL5ccMo.js → home-CS-NhJqO.js} +1 -1
- package/dist/client/assets/{hooks-BjBfy6ei.js → hooks-Ccqgw_Vz.js} +1 -1
- package/dist/client/assets/{hooks-BlQpGzXW.js → hooks-Dn-h6Vcw.js} +1 -1
- package/dist/client/assets/{index-nRYJl_2G.js → index-2Adyhfq_.js} +1 -1
- package/dist/client/assets/{index-DZyEvvL6.js → index-B4mA6UnL.js} +1 -1
- package/dist/client/assets/{index-BKFhg0pC.js → index-BMgXFXs8.js} +1 -1
- package/dist/client/assets/{index-DwkC8ftd.js → index-CAn5a9er.js} +1 -1
- package/dist/client/assets/{index-BadUSqcw.js → index-CFD7GjM4.js} +1 -1
- package/dist/client/assets/{index-D6uaBizA.js → index-CLnsRUUW.js} +1 -1
- package/dist/client/assets/{index-D205LVVe.js → index-Cb1NhXJQ.js} +1 -1
- package/dist/client/assets/{index-B_t_9L8u.js → index-Ci6FOo2o.js} +2 -2
- package/dist/client/assets/index-CpNTsElB.css +1 -0
- package/dist/client/assets/{index-DB8hZ0LD.js → index-CpUt41i2.js} +1 -1
- package/dist/client/assets/{index-DcVfvBoo.js → index-D-uWdP1a.js} +1 -1
- package/dist/client/assets/{index-D_G0qAY7.js → index-DO47GS7M.js} +1 -1
- package/dist/client/assets/{index-BSX_Ja12.js → index-DV57LmCQ.js} +1 -1
- package/dist/client/assets/{index-CFuWbX_m.js → index-DgDxrPJQ.js} +1 -1
- package/dist/client/assets/{index-BW-WWr9m.js → index-DzN1GaeD.js} +1 -1
- package/dist/client/assets/{index-B8PSZLZI.js → index-LUO-1awi.js} +1 -1
- package/dist/client/assets/{index-redirect-BwUlazGe.js → index-redirect-DvmJfTQ6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DfvtnjNV.js → infiniteQueryObserver-lxHY9KBm.js} +1 -1
- package/dist/client/assets/{infra-billing-B-CGfdEc.js → infra-billing-BrTbotT6.js} +1 -1
- package/dist/client/assets/{input-CQKBnLmN.js → input-C1_yaWH2.js} +1 -1
- package/dist/client/assets/{input-BAzDfmnE.js → input-DmMiHqqT.js} +1 -1
- package/dist/client/assets/{input-Ca_ZLV1Y.js → input-lLD2pWyd.js} +1 -1
- package/dist/client/assets/{integration-icon-BnRFkhic.js → integration-icon-PXIcCvAJ.js} +1 -1
- package/dist/client/assets/{label-do_aUXHU.js → label-MNehxDd8.js} +1 -1
- package/dist/client/assets/{last-preview-page-BUqf6h1l.js → last-preview-page-B0L1czTe.js} +1 -1
- package/dist/client/assets/{layout-UJ8tWNxs.js → layout-Dpdh60IA.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DfpMRvTv.js → legacy-agents-deep-BurccH7y.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CqiQcjAt.js → legacy-main-redirect-DR_vBjBo.js} +1 -1
- package/dist/client/assets/{library-C_i45qn5.js → library-Bh3JUAWw.js} +1 -1
- package/dist/client/assets/{login-C7udEPeA.js → login-DWsBRCWt.js} +1 -1
- package/dist/client/assets/{markdown-Twa7ZLqX.js → markdown-Bj_2Le1s.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-tEfVUp4A.js → mcp-app-renderer-BtowUfrr.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C917Nh81.js → mcp-oauth-BmHUUoma.js} +1 -1
- package/dist/client/assets/{members-BsFGuEmq.js → members-D97CSBdC.js} +1 -1
- package/dist/client/assets/{message-templates-CIDfEotD.js → message-templates-CGva-Wmj.js} +1 -1
- package/dist/client/assets/{mini-report-page-Ddy5Pw8R.js → mini-report-page-B6KW5rQB.js} +1 -1
- package/dist/client/assets/{mock-board-CkJCse34.js → mock-board-B88aD_ZY.js} +3 -3
- package/dist/client/assets/{monaco-editor-DaJaP1Lm.js → monaco-editor-BL1VqVAn.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BVeD-qT3.js → monitoring-stats-row-DhYpTGm4.js} +1 -1
- package/dist/client/assets/{multi-select-CXFIDFxv.js → multi-select-D4MUTF49.js} +1 -1
- package/dist/client/assets/{mustache-v6qi8gyX.js → mustache-vcSnLgSj.js} +1 -1
- package/dist/client/assets/{oauth-callback-D0viP0sr.js → oauth-callback-CCbopwuF.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CSuMgG32.js → oauth-callback-ai-provider-BhmhWPuU.js} +1 -1
- package/dist/client/assets/{onboarding-VOgHEwav.js → onboarding-CfCwmxWa.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-wjjPbR3H.js → optimistic-project-sidebar-views-r6d0a0fa.js} +1 -1
- package/dist/client/assets/{org-file-open-context-CAC-qw2Y.js → org-file-open-context-BQaKniQN.js} +1 -1
- package/dist/client/assets/{organization-choice-8sEHl_tc.js → organization-choice-n5jWR8x5.js} +1 -1
- package/dist/client/assets/{orgs-DEmuzSnD.js → orgs-BP4Nb7eA.js} +1 -1
- package/dist/client/assets/{page-seo-form-Cuq48XTM.js → page-seo-form-CUFQ9lAZ.js} +1 -1
- package/dist/client/assets/{pair-DDqppz14.js → pair-BVv5qwS0.js} +1 -1
- package/dist/client/assets/{plan-ladder-1DGkQvtt.js → plan-ladder-B_cdDv2u.js} +1 -1
- package/dist/client/assets/{popover-CVXHUdYf.js → popover-CvyZH1aK.js} +1 -1
- package/dist/client/assets/{post-calendar-BUS9OIvE.js → post-calendar-D4wVrUD5.js} +1 -1
- package/dist/client/assets/{post-editor-BZIxDfY9.js → post-editor-Dl7mmgPt.js} +1 -1
- package/dist/client/assets/{preview-content-BkvkIg5_.js → preview-content-CwblWQ7j.js} +1 -1
- package/dist/client/assets/{preview-dialog-CrzeRqhT.js → preview-dialog-8QorEoUx.js} +1 -1
- package/dist/client/assets/{primitives-cehm4nSi.js → primitives-Dm-d52Fy.js} +1 -1
- package/dist/client/assets/{profile-BrvUSH21.js → profile-CqqLFn0p.js} +1 -1
- package/dist/client/assets/{project-app-view-B3Dyt98h.js → project-app-view-Dea9RQT5.js} +1 -1
- package/dist/client/assets/{project-feed-BpTyWPI2.js → project-feed-BWj52Geg.js} +1 -1
- package/dist/client/assets/{project-icon-CbTBUdHd.js → project-icon-B62L0-Ic.js} +1 -1
- package/dist/client/assets/project-reports-BiLKZHtd.js +1 -0
- package/dist/client/assets/project-tasks-CbohEN8r.js +1 -0
- package/dist/client/assets/{prompts-CnSkOwcy.js → prompts-C8qjFh5s.js} +1 -1
- package/dist/client/assets/record-editor-DIcN0zmC.js +1 -0
- package/dist/client/assets/{redirect-editor-CJxBmHDy.js → redirect-editor-DlDRLI5p.js} +1 -1
- package/dist/client/assets/registry-B1XwkW9J.js +2 -0
- package/dist/client/assets/{registry-layout-CZrvope7.js → registry-layout-8_5YS8d1.js} +1 -1
- package/dist/client/assets/{reports-OsoTRPv4.js → reports-BVUgXRYp.js} +1 -1
- package/dist/client/assets/reports-DTnhVLYw.js +1 -0
- package/dist/client/assets/{reports-onboarding-CWGSmZPj.js → reports-onboarding-CFgdzNmN.js} +1 -1
- package/dist/client/assets/{reports-tab-BY3YIV1-.js → reports-tab-geHriKhJ.js} +2 -2
- package/dist/client/assets/{repositories-jGs4vEB4.js → repositories-YhOosDET.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Cz_q5yZW.js → repository-import-picker-DyOhHF3u.js} +1 -1
- package/dist/client/assets/{repository-picker-VKlc-5Nl.js → repository-picker-BUYJfJUH.js} +1 -1
- package/dist/client/assets/{require-capability-AcVeGAPs.js → require-capability-BuyUQe2r.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DX3m9xU5.js → required-auth-layout-CyxpkSWy.js} +1 -1
- package/dist/client/assets/{reset-password-BMBbJ8U2.js → reset-password-OhUCgdFz.js} +1 -1
- package/dist/client/assets/{resizable-7zYbsXBN.js → resizable-DP2_iOJI.js} +1 -1
- package/dist/client/assets/{review-settings-CX8L9XIy.js → review-settings-opGiYRKh.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-vwCs-Pv8.js → rich-text-link-control-IfY5GJsh.js} +1 -1
- package/dist/client/assets/{roles-DV4fcbyA.js → roles-BAZCs_gu.js} +1 -1
- package/dist/client/assets/{route-BwyuTAqy.js → route-9VJmjx4H.js} +1 -1
- package/dist/client/assets/{route-xvY1W3BI.js → route-KMEErrnr.js} +1 -1
- package/dist/client/assets/{route-BWPdXuzd.js → route-VxozlsXO.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-DMLjCiKw.js → runnable-block-editor-D9S_7iKc.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-GS_3-ITC.js → sandbox-lifecycle-context-3dTG6fho.js} +1 -1
- package/dist/client/assets/{schema-DfaDVZ2p.js → schema-36B888Ow.js} +1 -1
- package/dist/client/assets/{scroll-area-BDoLu6qP.js → scroll-area-YvnS-VN7.js} +1 -1
- package/dist/client/assets/{search-input-CyvpxrvE.js → search-input-rOGFcd8V.js} +1 -1
- package/dist/client/assets/{secrets-Dpz6qPsH.js → secrets-BlD021Nv.js} +1 -1
- package/dist/client/assets/{sections-editor-CDqfND3d.js → sections-editor-l0CGUT74.js} +1 -1
- package/dist/client/assets/{select-DNa5fWTD.js → select-DlFxiDXG.js} +1 -1
- package/dist/client/assets/{select-model-CNiFnlRt.js → select-model-D1v-HQmb.js} +1 -1
- package/dist/client/assets/{seo-editor-M0ysd2bD.js → seo-editor-Dsx4w-CS.js} +1 -1
- package/dist/client/assets/{settings-tab-CFrIKYBd.js → settings-tab-1hWkXxtW.js} +1 -1
- package/dist/client/assets/{sheet-CMxXh_Ov.js → sheet-3mWdWARg.js} +1 -1
- package/dist/client/assets/{shell-layout-CWd2W90X.js → shell-layout-BhU24obU.js} +1 -1
- package/dist/client/assets/{sidebar-D9_NtJkk.js → sidebar-D-ykwYZK.js} +1 -1
- package/dist/client/assets/{skill-preview-S2vO6IYy.js → skill-preview-COt3tZyn.js} +1 -1
- package/dist/client/assets/{skills-DbgPHujY.js → skills-CeAeythT.js} +1 -1
- package/dist/client/assets/{sso-Bw-PWl7Q.js → sso-BCvc79Hd.js} +1 -1
- package/dist/client/assets/{store-BgsQX_Fi.js → store-DSS7pwbI.js} +1 -1
- package/dist/client/assets/store-registry-5Rnsr40F.js +2 -0
- package/dist/client/assets/{switch-mcxC_Aan.js → switch-DzbhFkd8.js} +1 -1
- package/dist/client/assets/{synced-repos-lQACy_ad.js → synced-repos-C1a_2VSv.js} +1 -1
- package/dist/client/assets/{table-H21ieEXh.js → table-DRHZogtG.js} +1 -1
- package/dist/client/assets/{tabs-CwAPjptw.js → tabs-BFpD35SN.js} +1 -1
- package/dist/client/assets/{task-board-B3-IsxRC.js → task-board-BnjdulNB.js} +1 -1
- package/dist/client/assets/{task-route-BUeMvwcx.js → task-route-uoLnchBD.js} +1 -1
- package/dist/client/assets/{task-status-BxXgwSMd.js → task-status-CmnhmVw4.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DU7DvA8Z.js → taskboard-analytics-DUtGlm_o.js} +1 -1
- package/dist/client/assets/{tasks-U-h4ZXgz.js → tasks-CFLqCnn9.js} +1 -1
- package/dist/client/assets/tasks-g-1sXb5S.js +1 -0
- package/dist/client/assets/{textarea-WmVIW0bg.js → textarea-cQD0AENQ.js} +1 -1
- package/dist/client/assets/{thread-intent-C2pJfSAJ.js → thread-intent-B4NPPJnW.js} +1 -1
- package/dist/client/assets/{thread-route-bhfmrSLD.js → thread-route-B4ftFRF1.js} +1 -1
- package/dist/client/assets/{thread-route-61fdgmi1.js → thread-route-BuKwn_NI.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DoHyi92k.js → thread-sheet-body-B1hx9HMM.js} +1 -1
- package/dist/client/assets/{toggle-group-B1CgOPWM.js → toggle-group-D-jueDYG.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BYug00Si.js → toolbar-icon-button-C-bcFp4s.js} +1 -1
- package/dist/client/assets/{tooltip-pAkqh20b.js → tooltip-Cjm5-OzF.js} +1 -1
- package/dist/client/assets/{track-KX6uTUqG.js → track-gXVphWaB.js} +1 -1
- package/dist/client/assets/{types-5aijjTQb.js → types-D7bWh5IS.js} +1 -1
- package/dist/client/assets/{usage-stats-S1LN4WEC.js → usage-stats-D42Vs58C.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CYsQyyei.js → use-ai-providers-gBzVwZfi.js} +1 -1
- package/dist/client/assets/{use-automations-BV7TVKO5.js → use-automations-D7KNhekz.js} +1 -1
- package/dist/client/assets/{use-autosave-CgGQs2na.js → use-autosave-B4PyFvWi.js} +1 -1
- package/dist/client/assets/{use-connect-companion-dP07X0QV.js → use-connect-companion-BPzdOTx5.js} +1 -1
- package/dist/client/assets/{use-connection-DIM1Km31.js → use-connection-Xm7LN_9n.js} +1 -1
- package/dist/client/assets/{use-copy-CDcL5GLP.js → use-copy-DU94HmBe.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-13Ot4OKd.js → use-create-virtual-mcp--3UsxEX_.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BHjSaNEM.js → use-date-fns-locale-C0E1XIsK.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B0mbzL5m.js → use-debounced-autosave-B4WPkEbW.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BzlwPqAr.js → use-debounced-value-xGhRE_R9.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CvV_4weZ.js → use-deco-credits-CHmdnwNW.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-1Xa06bcv.js → use-decopilot-events-4c7k0EkQ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-kg0pEh1_.js → use-delete-connection-DuVgZvNd.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BTUkMR_9.js → use-deployment-admin-bb8cVdiw.js} +1 -1
- package/dist/client/assets/{use-entitlements-BKQxiM3P.js → use-entitlements-KRzxrqS2.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CIU-JcgZ.js → use-fast-preview-draft-url-FohMvhQi.js} +1 -1
- package/dist/client/assets/{use-file-configs-CLO9fSxR.js → use-file-configs-dQMTZ0D4.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-WViWnVCU.js → use-infinite-scroll-d9JW4eui.js} +1 -1
- package/dist/client/assets/{use-join-requests-thW8uEAD.js → use-join-requests-DPp6OyPZ.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BZNjo1U1.js → use-main-panel-tabs-LtZ4Guyx.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-RfN5_R0g.js → use-mcp-auth-status-BgfOM5Kn.js} +1 -1
- package/dist/client/assets/{use-mcp-client-E9Vc_Rel.js → use-mcp-client-DXM1xOfJ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CK92DQb1.js → use-mcp-prompts-DC_0PH3B.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DrrZAlYd.js → use-mcp-tools-CMaYw_Hr.js} +1 -1
- package/dist/client/assets/{use-members-Cr7VpPLM.js → use-members-CXzxpKBu.js} +1 -1
- package/dist/client/assets/{use-mobile-BWNsIKXL.js → use-mobile-BYI7AfZ8.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bjy_t-SC.js → use-navigate-to-agent-CjUZCiDZ.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BHFltTlS.js → use-open-billing-url-BEBNPLNJ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bp8IFxD6.js → use-org-auth-client-BPP7gPmZ.js} +1 -1
- package/dist/client/assets/{use-org-fs-DkULXCVM.js → use-org-fs-DVHt8CES.js} +1 -1
- package/dist/client/assets/{use-org-notice-DCW46IsC.js → use-org-notice-BxTs_NTo.js} +1 -1
- package/dist/client/assets/{use-org-sso-BesO5SJw.js → use-org-sso-CTb2BJZl.js} +1 -1
- package/dist/client/assets/{use-organization-roles-bXsV0FW7.js → use-organization-roles-V7NuNbQN.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BagDsr9q.js → use-organization-settings-g6uVBQuV.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Btd3eerC.js → use-panel-navigate-hgplI2Gf.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DDD1DfUm.js → use-project-native-view-presence-DhTiN6Ju.js} +1 -1
- package/dist/client/assets/{use-project-scope-CTaEMAbv.js → use-project-scope-BjFNebNc.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BvIXy5Ly.js → use-registry-connections-DqO-48ZD.js} +1 -1
- package/dist/client/assets/{use-releases-DlUPg5SD.js → use-releases-PNG9gtkr.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CwzJSWg9.js → use-reports-diagnostic-CVPpJgJ0.js} +1 -1
- package/dist/client/assets/{use-route-default-main-3Bfvt474.js → use-route-default-main-DfSpgCsG.js} +1 -1
- package/dist/client/assets/{use-secrets-8-rSfjKw.js → use-secrets-BcSHBiEb.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Bu8sg1z-.js → use-section-preview-base-Mo37PjIJ.js} +1 -1
- package/dist/client/assets/{use-session-runtime-JGH9InOY.js → use-session-runtime-CXFYmlCx.js} +1 -1
- package/dist/client/assets/{use-tags-T5RHvMH9.js → use-tags-DZpP5qDZ.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DOH9LfJe.js → use-task-board-analytics-M_xSWhmc.js} +1 -1
- package/dist/client/assets/{use-task-metadata-sy6KLFNJ.js → use-task-metadata-X-a_cXtq.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-1n3XTlWk.js → use-thread-outputs-bMTFY9dN.js} +1 -1
- package/dist/client/assets/{use-view-mode-BhHJ1Hg6.js → use-view-mode-87wocfjx.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqypJuyN.js → use-virtual-mcp-cCLIMV1h.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BaaJ9wpG.js +1 -0
- package/dist/client/assets/{useQueries-Drlss0b9.js → useQueries-Bsx5oDu5.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-HEcUWN_D.js +1 -0
- package/dist/client/assets/{users-BB661yTJ.js → users-fFbwQlCq.js} +1 -1
- package/dist/client/assets/{utils-iLmJV5k8.js → utils-DZ1FARwz.js} +1 -1
- package/dist/client/assets/{variant-calendar-H5bE__9A.js → variant-calendar-rCSHJOu1.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BrrMWpxD.js → variant-matcher-override-KjWq3dD9.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CO_nPZTh.js → view-mode-toggle-N6248osk.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CMjIasg-.js → virtual-mcp-CjQcEdrw.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-B-XCjxlW.js +0 -1
- package/dist/client/assets/agent-deck-Ber8ft6c.js +0 -1
- package/dist/client/assets/agent-file-DZjVPuyY.js +0 -1
- package/dist/client/assets/agent-library-file-trfE0T09.js +0 -1
- package/dist/client/assets/agent-settings-CNiD3ckF.js +0 -1
- package/dist/client/assets/agent-site-editor-BdMvy4Mo.js +0 -24
- package/dist/client/assets/agent-site-editor-code-Ce7mDfrI.js +0 -2
- package/dist/client/assets/agent-view-CNgwbe5B.js +0 -1
- package/dist/client/assets/api-keys-B1v9ccYJ.js +0 -1
- package/dist/client/assets/app-editor-DNOaIKZM.js +0 -1
- package/dist/client/assets/automations-CWBeAy1b.js +0 -1
- package/dist/client/assets/category-editor-BgCAssvf.js +0 -1
- package/dist/client/assets/index-DTEWW9mB.css +0 -1
- package/dist/client/assets/project-reports-FVtAI87U.js +0 -1
- package/dist/client/assets/project-tasks-38KXi6kx.js +0 -1
- package/dist/client/assets/record-editor-C5-Kr7k6.js +0 -1
- package/dist/client/assets/registry-rhMWKoWM.js +0 -2
- package/dist/client/assets/reports-Douw-a1a.js +0 -1
- package/dist/client/assets/store-registry-CBDrxRGz.js +0 -2
- package/dist/client/assets/tasks-BGoilBPc.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Ddfpz-kZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-JPoWLgBT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d4 as C,c as d,j as c,az as j,r as f,l as p,aU as v,d5 as b,d6 as h}from"./index-
|
|
1
|
+
import{d4 as C,c as d,j as c,az as j,r as f,l as p,aU as v,d5 as b,d6 as h}from"./index-Ci6FOo2o.js";import{L as N}from"./label-MNehxDd8.js";const E=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-Ci6FOo2o.js";function i(t){let r=2166136261;for(let e=0;e<t.length;e++)r=Math.imul(r^t.charCodeAt(e),16777619);return`a${(r>>>0).toString(36).padStart(6,"0").slice(-6)}`}function l(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function o(t,r){if(!r)return t;const e=`${i(r)}_`;return t.startsWith(e)?t.slice(e.length):t}function a(t,r){return o(t,r).replace(/[_-]/g," ").toLowerCase()}export{a as d,l as g,o as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aa as re,ab as X,b as Q,M as ie,n as le,ad as ce,ac as ge,e as ne,o as J,t as G,K as ee,j as i,dN as se,dO as oe,dP as M,az as de,c as Y,r as W,_ as me,J as te,bv as ue,bw as fe,w as pe,B as he,P as $,eU as xe}from"./index-B_t_9L8u.js";import{u as je}from"./use-org-auth-client-Bp8IFxD6.js";import{u as ze}from"./use-debounced-autosave-B0mbzL5m.js";import{A as Se}from"./avatar-BZNxKLv6.js";import{I as ae}from"./input-Ca_ZLV1Y.js";import{C as ve}from"./review-settings-CX8L9XIy.js";import{D as Oe}from"./domain-settings-g2fp2Ye9.js";import{A as be,a as ye,b as Ce,c as _e,g as Ae,d as De,e as Fe,f as we}from"./alert-dialog-DbPVXIpB.js";import{R as Ne}from"./require-capability-AcVeGAPs.js";import"./User01-CKqNomg0.js";import"./switch-mcxC_Aan.js";import"./UserSquare-8e1dRiH3.js";import"./GitBranch01-0XUwaJ1e.js";import"./SearchLg-BEUzmm7J.js";import"./use-organization-settings-BagDsr9q.js";import"./schema-DfaDVZ2p.js";import"./task-board-B3-IsxRC.js";import"./use-connection-DIM1Km31.js";import"./use-mcp-client-E9Vc_Rel.js";import"./auth-BG4qFQSm.js";import"./badge-DmLrCyyG.js";import"./select-DNa5fWTD.js";import"./index-DwkC8ftd.js";import"./Check-CV5wE14s.js";import"./ChevronUp-BIJ33mq-.js";import"./access-gate-DvdkRhsp.js";import"./capability-load-error-BxPWpjvk.js";const Te=re({name:X().min(1,"Name is required").max(255,"Name is too long"),logo:X().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=Q(),m=W.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=Z=>{const z=Z.target.files?.[0];if(!z)return;if(z.size>2097152){G.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>G.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Pe(){const e=Q(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{J("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),G.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{J("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),G.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(M,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(M,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(M,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Le(){const e=Y.c(86),t=Q(),{org:n}=ie(),[g,r]=W.useState(!1),[l,d]=W.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{J("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),G.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{G.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const Z=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:Z,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(M,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let K;e[35]===Symbol.for("react.memo_cache_sentinel")?(K=v=>{r(v),v||d("")},e[35]=K):K=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let U;e[50]===Symbol.for("react.memo_cache_sentinel")?(U=v=>d(v.target.value),e[50]=U):U=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:U,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(_e,{children:E}),e[63]=E,e[64]=P):P=e[64];let L;e[65]!==o?(L=()=>o.mutate(),e[65]=o,e[66]=L):L=e[66];const H=l!==n.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==L||e[71]!==H||e[72]!==k?(R=i.jsx(Ae,{onClick:L,disabled:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=L,e[71]=H,e[72]=k,e[73]=R):R=e[73];let I;e[74]!==P||e[75]!==R?(I=i.jsxs(De,{children:[P,R]}),e[74]=P,e[75]=R,e[76]=I):I=e[76];let q;e[77]!==T||e[78]!==I?(q=i.jsxs(Fe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=q):q=e[79];let B;e[80]!==g||e[81]!==q?(B=i.jsx(we,{open:g,onOpenChange:K,children:q}),e[80]=g,e[81]=q,e[82]=B):B=e[82];let V;return e[83]!==b||e[84]!==B?(V=i.jsxs(i.Fragment,{children:[b,B]}),e[83]=b,e[84]=B,e[85]=V):V=e[85],V}function ke(){const e=Y.c(10),t=Q();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx($.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Pe,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Le,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx($,{children:i.jsx($.Content,{children:i.jsx($.Container,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function gt(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(ke,{})}),e[0]=t):t=e[0],t}export{gt as default};
|
|
1
|
+
import{aa as re,ab as X,b as Q,M as ie,n as le,ad as ce,ac as ge,e as ne,o as J,t as G,K as ee,j as i,dN as se,dO as oe,dP as M,az as de,c as Y,r as W,_ as me,J as te,bv as ue,bw as fe,w as pe,B as he,P as $,eU as xe}from"./index-Ci6FOo2o.js";import{u as je}from"./use-org-auth-client-BPP7gPmZ.js";import{u as ze}from"./use-debounced-autosave-B4WPkEbW.js";import{A as Se}from"./avatar-DU3VcflD.js";import{I as ae}from"./input-lLD2pWyd.js";import{C as ve}from"./review-settings-opGiYRKh.js";import{D as Oe}from"./domain-settings-BsQLpeO_.js";import{A as be,a as ye,b as Ce,c as _e,g as Ae,d as De,e as Fe,f as we}from"./alert-dialog-DyR5Q_Tj.js";import{R as Ne}from"./require-capability-BuyUQe2r.js";import"./User01-D61cOv44.js";import"./switch-DzbhFkd8.js";import"./UserSquare-v3UhY-wJ.js";import"./GitBranch01-DuVUhLIs.js";import"./SearchLg-B9ADJIQh.js";import"./use-organization-settings-g6uVBQuV.js";import"./schema-36B888Ow.js";import"./task-board-BnjdulNB.js";import"./use-connection-Xm7LN_9n.js";import"./use-mcp-client-DXM1xOfJ.js";import"./auth-NpT8e85Y.js";import"./badge-D2mSgg83.js";import"./select-DlFxiDXG.js";import"./index-CAn5a9er.js";import"./Check-CCHtN2JL.js";import"./ChevronUp-58_Y92Dn.js";import"./access-gate-CMGFwr69.js";import"./capability-load-error-DRsV-GAi.js";const Te=re({name:X().min(1,"Name is required").max(255,"Name is too long"),logo:X().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=Q(),m=W.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=Z=>{const z=Z.target.files?.[0];if(!z)return;if(z.size>2097152){G.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>G.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Pe(){const e=Q(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{J("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),G.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{J("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),G.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(M,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(M,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(M,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Le(){const e=Y.c(86),t=Q(),{org:n}=ie(),[g,r]=W.useState(!1),[l,d]=W.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{J("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),G.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{G.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const Z=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:Z,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(M,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let K;e[35]===Symbol.for("react.memo_cache_sentinel")?(K=v=>{r(v),v||d("")},e[35]=K):K=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let U;e[50]===Symbol.for("react.memo_cache_sentinel")?(U=v=>d(v.target.value),e[50]=U):U=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:U,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(_e,{children:E}),e[63]=E,e[64]=P):P=e[64];let L;e[65]!==o?(L=()=>o.mutate(),e[65]=o,e[66]=L):L=e[66];const H=l!==n.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==L||e[71]!==H||e[72]!==k?(R=i.jsx(Ae,{onClick:L,disabled:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=L,e[71]=H,e[72]=k,e[73]=R):R=e[73];let I;e[74]!==P||e[75]!==R?(I=i.jsxs(De,{children:[P,R]}),e[74]=P,e[75]=R,e[76]=I):I=e[76];let q;e[77]!==T||e[78]!==I?(q=i.jsxs(Fe,{children:[T,I]}),e[77]=T,e[78]=I,e[79]=q):q=e[79];let B;e[80]!==g||e[81]!==q?(B=i.jsx(we,{open:g,onOpenChange:K,children:q}),e[80]=g,e[81]=q,e[82]=B):B=e[82];let V;return e[83]!==b||e[84]!==B?(V=i.jsxs(i.Fragment,{children:[b,B]}),e[83]=b,e[84]=B,e[85]=V):V=e[85],V}function ke(){const e=Y.c(10),t=Q();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx($.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Pe,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Le,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx($,{children:i.jsx($.Content,{children:i.jsx($.Container,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function gt(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(ke,{})}),e[0]=t):t=e[0],t}export{gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as o}from"./index-
|
|
1
|
+
import{c as n,j as o}from"./index-Ci6FOo2o.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N,b as A,M as z,j as o,L as M,o as P,B as G,a5 as Y,_ as q,K as J,m as Z,a as Q,r as E,ao as U,P as O,h as V}from"./index-B_t_9L8u.js";import{C as W}from"./index-BadUSqcw.js";import{C as X}from"./input-CQKBnLmN.js";import{D as ee,C as te}from"./chat-context-_q59AZUK.js";import{a as oe}from"./use-organization-settings-BagDsr9q.js";import{i as re}from"./GitBranch01-0XUwaJ1e.js";import{i as ie}from"./SearchLg-BEUzmm7J.js";import{E as se}from"./empty-state-T4gSZ7lE.js";import{R as ne}from"./repository-import-picker-Cz_q5yZW.js";import{o as le}from"./command-palette-store-DcmJmibB.js";import{i as D}from"./ArrowRight-BSx8IDKt.js";import{C as me,a as ae,b as ce}from"./client-icons-YajzpeXZ.js";import{u as pe,b as fe,P as de}from"./project-feed-BpTyWPI2.js";import{A as ue}from"./agent-icon-N33S3RAD.js";import{u as ge}from"./use-navigate-to-agent-Bjy_t-SC.js";import{b as xe}from"./task-route-BUeMvwcx.js";import{s as he}from"./use-project-scope-CTaEMAbv.js";import{b as je}from"./use-virtual-mcp-DqypJuyN.js";import"./use-mobile-BWNsIKXL.js";import"./index-B8PSZLZI.js";import"./resizable-7zYbsXBN.js";import"./MessageCircle01-BUZyBws-.js";import"./thread-route-61fdgmi1.js";import"./use-panel-navigate-Btd3eerC.js";import"./use-route-default-main-3Bfvt474.js";import"./hooks-BjBfy6ei.js";import"./use-mcp-client-E9Vc_Rel.js";import"./auth-BG4qFQSm.js";import"./backoff-8mStPHYB.js";import"./task-board-B3-IsxRC.js";import"./schema-DfaDVZ2p.js";import"./tooltip-pAkqh20b.js";import"./index-DwkC8ftd.js";import"./toolbar-icon-button-BYug00Si.js";import"./index-nRYJl_2G.js";import"./gateway-client-Da7gZR-i.js";import"./dialog-B23QWo9i.js";import"./X-Bb2W3Osa.js";import"./form-D274Mm5V.js";import"./label-do_aUXHU.js";import"./input-Ca_ZLV1Y.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-CAC-qw2Y.js";import"./autosend-LG-eI-i8.js";import"./chat-draft-DltxgUNg.js";import"./use-session-runtime-JGH9InOY.js";import"./thread-intent-C2pJfSAJ.js";import"./slugify-CEUa2lfQ.js";import"./ArrowUp-D9wCXP2E.js";import"./Check-CV5wE14s.js";import"./Image01-BKXjYImN.js";import"./Upload01-BtQp1axP.js";import"./AlertCircle-B6wwVpE_.js";import"./Copy01-Djqdozj7.js";import"./select-DNa5fWTD.js";import"./ChevronUp-BIJ33mq-.js";import"./ArrowLeft-CTfWEOn_.js";import"./usage-stats-S1LN4WEC.js";import"./use-copy-CDcL5GLP.js";import"./markdown-Twa7ZLqX.js";import"./Download01-DHvQwHCH.js";import"./ZoomOut-D2tsmZom.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-entitlements-BKQxiM3P.js";import"./tabs-CwAPjptw.js";import"./Tool02-DQ3gW2fr.js";import"./use-deco-credits-CvV_4weZ.js";import"./use-ai-providers-CYsQyyei.js";import"./toggle-group-B1CgOPWM.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-BHFltTlS.js";import"./XClose-DZSiMxAy.js";import"./decopilot-DXH0qU5M.js";import"./checkbox-ClB-7cKk.js";import"./ChevronSelectorVertical-a1L8nkl_.js";import"./Key01-Bn3b2-E-.js";import"./Settings02-DT6SgAR5.js";import"./SearchMd-BZxbKw5D.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-DiNkCarU.js";import"./ChevronRight-DF00Hxze.js";import"./avatar-BZNxKLv6.js";import"./User01-CKqNomg0.js";import"./Eye-Cdgfzyki.js";import"./download-app-dialog-TA6NzEO8.js";import"./use-is-desktop-app-BNujXJc_.js";import"./Tool01-Cdrnwb5w.js";import"./Stars01-Bumlbnyx.js";import"./popover-CVXHUdYf.js";import"./drawer-BxrIZkXS.js";import"./index-BSX_Ja12.js";import"./input-BAzDfmnE.js";import"./hooks-BlQpGzXW.js";import"./use-mcp-prompts-CK92DQb1.js";import"./use-org-fs-DkULXCVM.js";import"./dropdown-menu-BxecOnD3.js";import"./DotsVertical-W2TFUW8Q.js";import"./Link01-tgfA2O1O.js";import"./Plus-BHzo7JpN.js";import"./question-004-sINsf4GQ.js";import"./use-members-Cr7VpPLM.js";import"./use-org-auth-client-Bp8IFxD6.js";import"./feature-paywall-BVM5GBPX.js";import"./plan-ladder-1DGkQvtt.js";import"./add-connection-dialog-D5tuJQCZ.js";import"./collection-search-BiXs1jPm.js";import"./extract-connection-data-DqpsAFUm.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-B0rKAD6V.js";import"./connection-card-C75zeoKz.js";import"./use-registry-connections-BvIXy5Ly.js";import"./use-connection-DIM1Km31.js";import"./useInfiniteQuery-Ddfpz-kZ.js";import"./infiniteQueryObserver-DfvtnjNV.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-BnRFkhic.js";import"./textarea-WmVIW0bg.js";import"./UserSquare-8e1dRiH3.js";import"./connection-form-helpers-exw5Pq0Z.js";import"./Trash01-DUXtn-7w.js";import"./authenticate-and-persist-oauth-BJgrfhXe.js";import"./mcp-oauth-C917Nh81.js";import"./collection-tabs-B7pXy1cp.js";import"./badge-DmLrCyyG.js";import"./use-infinite-scroll-WViWnVCU.js";import"./useSuspenseInfiniteQuery-JPoWLgBT.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-1Xa06bcv.js";import"./repository-picker-VKlc-5Nl.js";import"./LinkExternal01-BeEySOGR.js";import"./github-icon-B_cEBMlN.js";import"./use-debounced-value-BzlwPqAr.js";import"./project-icon-CbTBUdHd.js";import"./anchors-yqDzZN4K.js";import"./get-initials-D-f_fDFw.js";import"./TrendUp01-NLayJLL7.js";import"./Users03-BgcZr7a4.js";import"./CheckCircle-Cm7e50OB.js";import"./CreditCard01-B-FZXFU_.js";import"./Database01-D2F-33im.js";import"./Printer-BCdINSRW.js";import"./File02-9BP6PQyf.js";import"./Share07-B18DW4IB.js";import"./Globe01-B4Ox45iT.js";import"./SwitchHorizontal01-BBsMhIe7.js";import"./HardDrive-Bltl0EZP.js";import"./Sun-DSmRhca0.js";import"./Package-OGz-YQyF.js";import"./Palette-zweuRfuf.js";import"./Play-CyJUaITh.js";import"./Shield01-CobmTjIR.js";import"./Users01-57sXIUc1.js";import"./XCircle-DY948r_f.js";import"./Zap-CgzyzKhX.js";import"./github-repo-BknN0SVI.js";import"./command-DPtIHCMz.js";import"./index-BKFhg0pC.js";const be=[{name:"Claude",Icon:me,size:14,bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ae,size:12,bg:"#000",fg:"#fff"},{name:"Codex",Icon:ce,size:12,bg:"#4F46E5",fg:"#fff"}];function _e(){const e=N.c(11),t=A(),{org:i}=z();let s;e[0]!==i.slug?(s={org:i.slug},e[0]=i.slug,e[1]=s):s=e[1];let r;e[2]!==t?(r=t("home.orgHome.connectPill"),e[2]=t,e[3]=r):r=e[3];let n;e[4]!==r?(n=o.jsx("span",{className:"font-medium text-foreground",children:r}),e[4]=r,e[5]=n):n=e[5];let l,a;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:be.map(ye)}),a=o.jsx(D,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[6]=l,e[7]=a):(l=e[6],a=e[7]);let c;return e[8]!==s||e[9]!==n?(c=o.jsxs(M,{to:"/$org/settings/connect",params:s,onClick:Ce,className:"group hidden max-w-full md:inline-flex flex-wrap items-center justify-center gap-x-3 gap-y-2 rounded-full border border-border bg-card py-1.5 pl-4 pr-2.5 text-sm transition-colors hover:bg-accent/60",children:[n,l,a]}),e[8]=s,e[9]=n,e[10]=c):c=e[10],c}function ye(e){const{name:t,Icon:i,size:s,bg:r,fg:n}=e;return o.jsx("span",{title:t,className:"flex size-6 items-center justify-center rounded-full",style:{backgroundColor:r,color:n},children:o.jsx(i,{size:s})},t)}function Ce(){return P("connect_clients_opened",{source:"org_home"})}function Ne(e){return e<12?"morning":e<18?"afternoon":"evening"}function Se(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}const R=6;function ke(e){const t=N.c(13),{project:i}=e,s=ge();let r;t[0]!==s||t[1]!==i.id||t[2]!==i.metadata?.ui?.layout?(r=()=>{P("org_home_project_clicked"),s(i.id,{panel:Y(i.metadata?.ui?.layout)})},t[0]=s,t[1]=i.id,t[2]=i.metadata?.ui?.layout,t[3]=r):r=t[3];let n;t[4]!==i.icon||t[5]!==i.title?(n=o.jsx(ue,{icon:i.icon,name:i.title,size:"sm+"}),t[4]=i.icon,t[5]=i.title,t[6]=n):n=t[6];let l;t[7]!==i.title?(l=o.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:i.title}),t[7]=i.title,t[8]=l):l=t[8];let a;return t[9]!==r||t[10]!==n||t[11]!==l?(a=o.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-accent/60",children:[n,l]}),t[9]=r,t[10]=n,t[11]=l,t[12]=a):a=t[12],a}function ve(e){const t=N.c(31),{projects:i,action:s}=e,r=A(),{org:n}=z();let l,a,c,m,d,p;if(t[0]!==s||t[1]!==i||t[2]!==r){const b=[...i].sort(we).slice(0,R);l=i.length>R,d="flex flex-col gap-4";let j;t[9]!==r?(j=r("home.projects.heading"),t[9]=r,t[10]=j):j=t[10];let h;t[11]!==j?(h=o.jsx("h2",{className:"text-lg font-medium text-foreground",children:j}),t[11]=j,t[12]=h):h=t[12],t[13]!==s||t[14]!==h?(p=o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h,s]}),t[13]=s,t[14]=h,t[15]=p):p=t[15],m="@container",a="grid grid-cols-1 gap-1 @lg:grid-cols-2",c=b.map(Te),t[0]=s,t[1]=i,t[2]=r,t[3]=l,t[4]=a,t[5]=c,t[6]=m,t[7]=d,t[8]=p}else l=t[3],a=t[4],c=t[5],m=t[6],d=t[7],p=t[8];let x;t[16]!==a||t[17]!==c?(x=o.jsx("div",{className:a,children:c}),t[16]=a,t[17]=c,t[18]=x):x=t[18];let f;t[19]!==m||t[20]!==x?(f=o.jsx("div",{className:m,children:x}),t[19]=m,t[20]=x,t[21]=f):f=t[21];let u;t[22]!==l||t[23]!==n||t[24]!==r?(u=l&&o.jsx("div",{children:o.jsx(G,{asChild:!0,variant:"ghost",size:"sm",children:o.jsx(M,{to:"/$org/settings/agents",params:{org:n.slug},children:r("home.projects.seeAll")})})}),t[22]=l,t[23]=n,t[24]=r,t[25]=u):u=t[25];let g;return t[26]!==d||t[27]!==p||t[28]!==f||t[29]!==u?(g=o.jsxs("section",{className:d,children:[p,f,u]}),t[26]=d,t[27]=p,t[28]=f,t[29]=u,t[30]=g):g=t[30],g}function Te(e){return o.jsx(ke,{project:e},e.id)}function we(e,t){return(t.updated_at??"").localeCompare(e.updated_at??"")}function Ae(){const e=N.c(10),{org:t}=z(),i=q();let s;e[0]!==t.id?(s=J.orgHasSite(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=!!t.id;let n;e[2]!==i?(n=()=>i.call("ORGANIZATION_HAS_SITE",{}),e[2]=i,e[3]=n):n=e[3];let l;e[4]!==s||e[5]!==r||e[6]!==n?(l={queryKey:s,staleTime:3e5,enabled:r,queryFn:n},e[4]=s,e[5]=r,e[6]=n,e[7]=l):l=e[7];const{data:a}=Z(l),c=a?.hasSite??!1;let m;return e[8]!==c?(m={hasSite:c},e[8]=c,e[9]=m):m=e[9],m}const Pe="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function He(e){const t=N.c(4),{className:i}=e;let s,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),r=o.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),t[0]=s,t[1]=r):(s=t[0],r=t[1]);let n;return t[2]!==i?(n=o.jsxs("svg",{viewBox:"0 0 28 20",className:i,"aria-hidden":"true",focusable:"false",children:[s,r]}),t[2]=i,t[3]=n):n=t[3],n}function Ie(){const e=N.c(27),t=A(),{hasSite:i}=Ae();if(!i)return null;let s;e[0]!==t?(s=t("home.orgHome.trainingThumbnailAlt"),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==s?(r=o.jsx("img",{src:"/cms-training.jpg",alt:s,className:"size-full object-cover"}),e[2]=s,e[3]=r):r=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:o.jsx(He,{className:"w-9"})}),e[4]=n):n=e[4];let l;e[5]!==r?(l=o.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[r,n]}),e[5]=r,e[6]=l):l=e[6];let a;e[7]!==t?(a=t("home.orgHome.trainingEyebrow"),e[7]=t,e[8]=a):a=e[8];let c;e[9]!==a?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e[9]=a,e[10]=c):c=e[10];let m;e[11]!==t?(m=t("home.orgHome.trainingTitle"),e[11]=t,e[12]=m):m=e[12];let d;e[13]!==m?(d=o.jsx("h3",{className:"text-sm font-medium text-foreground",children:m}),e[13]=m,e[14]=d):d=e[14];let p;e[15]!==t?(p=t("home.orgHome.trainingDescription"),e[15]=t,e[16]=p):p=e[16];let x;e[17]!==p?(x=o.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:p}),e[17]=p,e[18]=x):x=e[18];let f;e[19]!==c||e[20]!==d||e[21]!==x?(f=o.jsxs("div",{className:"min-w-0 flex-1",children:[c,d,x]}),e[19]=c,e[20]=d,e[21]=x,e[22]=f):f=e[22];let u;e[23]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(D,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[23]=u):u=e[23];let g;return e[24]!==f||e[25]!==l?(g=o.jsxs("a",{href:Pe,target:"_blank",rel:"noreferrer",onClick:$e,className:"group card-shadow flex w-full items-center gap-4 rounded-xl bg-card p-3 text-left transition-colors hover:bg-accent/60",children:[l,f,u]}),e[24]=f,e[25]=l,e[26]=g):g=e[26],g}function $e(){return P("cms_training_opened",{source:"org_home"})}const ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ee(){const e=N.c(8),t=A();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(ie,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let s;e[1]!==t?(s=t("home.orgHome.searchPlaceholder"),e[1]=t,e[2]=s):s=e[2];let r;e[3]!==s?(r=o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:s}),e[3]=s,e[4]=r):r=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:"⌘K"}),e[5]=n):n=e[5];let l;return e[6]!==r?(l=o.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:Oe,className:"card-shadow flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent/60",children:[i,r,n]}),e[6]=r,e[7]=l):l=e[7],l}function Oe(){P("command_palette_opened",{source:"org_home_search"}),le()}function F(){const e=N.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(V,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Be(e){const t=N.c(37),{canManageAgents:i,importButton:s}=e,r=A(),{org:n}=z();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={pageSize:1e3},t[0]=l):l=t[0];const a=je(l),c=pe();let m,d,p;if(t[1]!==a||t[2]!==i||t[3]!==s||t[4]!==n||t[5]!==r||t[6]!==c){p=Symbol.for("react.early_return_sentinel");e:{let j;if(t[10]!==n?(j=h=>h.id!==n.id,t[10]=n,t[11]=j):j=t[11],m=he(a).filter(j),m.length===0){let h;t[12]!==r?(h=r("routes.agentsList.noAgentsYet"),t[12]=r,t[13]=h):h=t[13];let _;t[14]!==i||t[15]!==r?(_=r(i?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),t[14]=i,t[15]=r,t[16]=_):_=t[16];let y;t[17]!==i||t[18]!==s?(y=i&&s("org_home_empty"),t[17]=i,t[18]=s,t[19]=y):y=t[19];let C;t[20]!==h||t[21]!==_||t[22]!==y?(C=o.jsx("div",{className:"flex items-center justify-center py-10",children:o.jsx(se,{image:null,title:h,description:_,actions:y})}),t[20]=h,t[21]=_,t[22]=y,t[23]=C):C=t[23],p=C;break e}d=fe(xe(m),c,null)}t[1]=a,t[2]=i,t[3]=s,t[4]=n,t[5]=r,t[6]=c,t[7]=m,t[8]=d,t[9]=p}else m=t[7],d=t[8],p=t[9];if(p!==Symbol.for("react.early_return_sentinel"))return p;const x=d.length>0;let f;t[24]!==i||t[25]!==s?(f=i&&s("org_home"),t[24]=i,t[25]=s,t[26]=f):f=t[26];let u;t[27]!==m||t[28]!==f?(u=o.jsx(ve,{projects:m,action:f}),t[27]=m,t[28]=f,t[29]=u):u=t[29];let g;t[30]!==m||t[31]!==x||t[32]!==c?(g=x&&o.jsx(de,{projects:m,tasks:c}),t[30]=m,t[31]=x,t[32]=c,t[33]=g):g=t[33];let b;return t[34]!==u||t[35]!==g?(b=o.jsxs("div",{className:"flex flex-col gap-12",children:[u,g]}),t[34]=u,t[35]=g,t[36]=b):b=t[36],b}function Le(){const e=N.c(51),t=A(),i=oe("home_task_intake_enabled"),{data:s}=Q.useSession(),[r,n]=E.useState(!1),{granted:l}=U("agents:manage");let a,c,m,d,p,x,f,u,g,b,j,h;if(e[0]!==s?.user?.name||e[1]!==t){const B=Se(s?.user?.name),L=ze[Ne(new Date().getHours())];let $;e[14]!==t?($=K=>o.jsxs(G,{size:"sm",variant:"outline",onClick:()=>{P("agent_create_clicked",{source:K,method:"github"}),n(!0)},children:[o.jsx(re,{size:14}),t("home.orgAgents.importFromGitHub")]}),e[14]=t,e[15]=$):$=e[15],d=$,m=O,c=O.Content,a=O.Container,j="reading",h="flex flex-col gap-12 pt-0 md:pt-0",u="flex flex-col items-center gap-12 text-center",e[16]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(_e,{}),b=o.jsx(Ie,{}),e[16]=g,e[17]=b):(g=e[16],b=e[17]),f="flex w-full flex-col items-center gap-5",p="text-3xl font-medium tracking-tight text-foreground",x=B?t(L.named,{name:B}):t(L.bare),e[0]=s?.user?.name,e[1]=t,e[2]=a,e[3]=c,e[4]=m,e[5]=d,e[6]=p,e[7]=x,e[8]=f,e[9]=u,e[10]=g,e[11]=b,e[12]=j,e[13]=h}else a=e[2],c=e[3],m=e[4],d=e[5],p=e[6],x=e[7],f=e[8],u=e[9],g=e[10],b=e[11],j=e[12],h=e[13];let _;e[18]!==p||e[19]!==x?(_=o.jsx("h1",{className:p,children:x}),e[18]=p,e[19]=x,e[20]=_):_=e[20];let y;e[21]!==i?(y=i?o.jsx(E.Suspense,{fallback:o.jsx(F,{}),children:o.jsx(ee,{children:o.jsx(te,{children:o.jsx(X,{homeTaskComposer:!0})})})}):o.jsx(Ee,{}),e[21]=i,e[22]=y):y=e[22];let C;e[23]!==f||e[24]!==_||e[25]!==y?(C=o.jsxs("div",{className:f,children:[_,y]}),e[23]=f,e[24]=_,e[25]=y,e[26]=C):C=e[26];let S;e[27]!==C||e[28]!==u||e[29]!==g||e[30]!==b?(S=o.jsxs("div",{className:u,children:[g,b,C]}),e[27]=C,e[28]=u,e[29]=g,e[30]=b,e[31]=S):S=e[31];let H;e[32]===Symbol.for("react.memo_cache_sentinel")?(H=o.jsx(F,{}),e[32]=H):H=e[32];let k;e[33]!==l||e[34]!==d?(k=o.jsx(E.Suspense,{fallback:H,children:o.jsx(Be,{canManageAgents:l,importButton:d})}),e[33]=l,e[34]=d,e[35]=k):k=e[35];let v;e[36]!==a||e[37]!==S||e[38]!==k||e[39]!==j||e[40]!==h?(v=o.jsxs(a,{width:j,className:h,children:[S,k]}),e[36]=a,e[37]=S,e[38]=k,e[39]=j,e[40]=h,e[41]=v):v=e[41];let T;e[42]!==c||e[43]!==v?(T=o.jsx(c,{children:v}),e[42]=c,e[43]=v,e[44]=T):T=e[44];let w;e[45]!==r?(w=o.jsx(ne,{open:r,onOpenChange:n}),e[45]=r,e[46]=w):w=e[46];let I;return e[47]!==m||e[48]!==T||e[49]!==w?(I=o.jsxs(m,{children:[T,w]}),e[47]=m,e[48]=T,e[49]=w,e[50]=I):I=e[50],I}function Lr(){const e=N.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(W.Content,{children:o.jsx(Le,{})}),e[0]=t):t=e[0],t}export{Lr as default};
|
|
1
|
+
import{c as N,b as A,M as z,j as o,L as M,o as P,B as G,a5 as Y,_ as q,K as J,m as Z,a as Q,r as E,ao as U,P as O,h as V}from"./index-Ci6FOo2o.js";import{C as W}from"./index-CFD7GjM4.js";import{C as X}from"./input-C1_yaWH2.js";import{D as ee,C as te}from"./chat-context-Bl66TDog.js";import{a as oe}from"./use-organization-settings-g6uVBQuV.js";import{i as re}from"./GitBranch01-DuVUhLIs.js";import{i as ie}from"./SearchLg-B9ADJIQh.js";import{E as se}from"./empty-state-Dpo9j0Bh.js";import{R as ne}from"./repository-import-picker-DyOhHF3u.js";import{o as le}from"./command-palette-store-B6erqxcF.js";import{i as D}from"./ArrowRight-B7Hvi15P.js";import{C as me,a as ae,b as ce}from"./client-icons-BpIRk6Eq.js";import{u as pe,b as fe,P as de}from"./project-feed-BWj52Geg.js";import{A as ue}from"./agent-icon-8_uoIw9T.js";import{u as ge}from"./use-navigate-to-agent-CjUZCiDZ.js";import{b as xe}from"./task-route-uoLnchBD.js";import{s as he}from"./use-project-scope-BjFNebNc.js";import{b as je}from"./use-virtual-mcp-cCLIMV1h.js";import"./use-mobile-BYI7AfZ8.js";import"./index-LUO-1awi.js";import"./resizable-DP2_iOJI.js";import"./MessageCircle01-BleWTCg5.js";import"./thread-route-BuKwn_NI.js";import"./use-panel-navigate-hgplI2Gf.js";import"./use-route-default-main-DfSpgCsG.js";import"./hooks-Ccqgw_Vz.js";import"./use-mcp-client-DXM1xOfJ.js";import"./auth-NpT8e85Y.js";import"./backoff-8mStPHYB.js";import"./task-board-BnjdulNB.js";import"./schema-36B888Ow.js";import"./tooltip-Cjm5-OzF.js";import"./index-CAn5a9er.js";import"./toolbar-icon-button-C-bcFp4s.js";import"./index-2Adyhfq_.js";import"./gateway-client-BKiwX9p5.js";import"./dialog-CALEql2B.js";import"./X-Bl6p2PHk.js";import"./form-BDbK3JnT.js";import"./label-MNehxDd8.js";import"./input-lLD2pWyd.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-BQaKniQN.js";import"./autosend-4JcmiES9.js";import"./chat-draft-Dr_jRWei.js";import"./use-session-runtime-CXFYmlCx.js";import"./thread-intent-B4NPPJnW.js";import"./slugify-CEUa2lfQ.js";import"./ArrowUp-BFEFFMY1.js";import"./Check-CCHtN2JL.js";import"./Image01-BG5OCK-e.js";import"./Upload01-C3vxmuR3.js";import"./AlertCircle-VdsUyDsL.js";import"./Copy01-DUI0S5po.js";import"./select-DlFxiDXG.js";import"./ChevronUp-58_Y92Dn.js";import"./ArrowLeft-C1Jxz-38.js";import"./usage-stats-D42Vs58C.js";import"./use-copy-DU94HmBe.js";import"./markdown-Bj_2Le1s.js";import"./Download01-D1unS475.js";import"./ZoomOut-hBrRCaxr.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-entitlements-KRzxrqS2.js";import"./tabs-BFpD35SN.js";import"./Tool02-BWLvpTJ3.js";import"./use-deco-credits-CHmdnwNW.js";import"./use-ai-providers-gBzVwZfi.js";import"./toggle-group-D-jueDYG.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-BEBNPLNJ.js";import"./XClose-DlSEqtvq.js";import"./decopilot-CqQIn3DK.js";import"./checkbox-CDV3hkI4.js";import"./ChevronSelectorVertical-C0AfY4BX.js";import"./Key01-BVFF75nH.js";import"./Settings02-BG6PEEFh.js";import"./SearchMd-Cte0Flmz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-C3zWsNr6.js";import"./ChevronRight-CFHS6mGR.js";import"./avatar-DU3VcflD.js";import"./User01-D61cOv44.js";import"./Eye-DJsJHMdz.js";import"./download-app-dialog-4cfbO5ZR.js";import"./use-is-desktop-app-BNujXJc_.js";import"./Tool01-C-Av9hw4.js";import"./Stars01-BbGiUZr8.js";import"./popover-CvyZH1aK.js";import"./drawer-Wjj3JV6a.js";import"./index-DV57LmCQ.js";import"./input-DmMiHqqT.js";import"./hooks-Dn-h6Vcw.js";import"./use-mcp-prompts-DC_0PH3B.js";import"./use-org-fs-DVHt8CES.js";import"./dropdown-menu-BwJm6kWw.js";import"./DotsVertical-CllTTtzx.js";import"./Link01-DqK8epHf.js";import"./Plus-B3s19fbp.js";import"./question-004-sINsf4GQ.js";import"./use-members-CXzxpKBu.js";import"./use-org-auth-client-BPP7gPmZ.js";import"./feature-paywall-rsbHj8go.js";import"./plan-ladder-B_cdDv2u.js";import"./add-connection-dialog-CP5Mmevx.js";import"./collection-search-Cg8WYO7F.js";import"./extract-connection-data-dNt5_vXq.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-Gh-gc5IV.js";import"./connection-card-DOCSy-r2.js";import"./use-registry-connections-DqO-48ZD.js";import"./use-connection-Xm7LN_9n.js";import"./useInfiniteQuery-BaaJ9wpG.js";import"./infiniteQueryObserver-lxHY9KBm.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-PXIcCvAJ.js";import"./textarea-cQD0AENQ.js";import"./UserSquare-v3UhY-wJ.js";import"./connection-form-helpers-COFd-YYJ.js";import"./Trash01-DBG5z7yc.js";import"./authenticate-and-persist-oauth-B1pRhuCl.js";import"./mcp-oauth-BmHUUoma.js";import"./collection-tabs-BxByj3JB.js";import"./badge-D2mSgg83.js";import"./use-infinite-scroll-d9JW4eui.js";import"./useSuspenseInfiniteQuery-HEcUWN_D.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-4c7k0EkQ.js";import"./repository-picker-BUYJfJUH.js";import"./LinkExternal01-2jYkMKWf.js";import"./github-icon-Pmxow-OZ.js";import"./use-debounced-value-xGhRE_R9.js";import"./project-icon-B62L0-Ic.js";import"./anchors-yqDzZN4K.js";import"./get-initials-D-f_fDFw.js";import"./TrendUp01-CVQkVUqd.js";import"./Users03-CvWlZOBQ.js";import"./CheckCircle-62tE7hh5.js";import"./CreditCard01-BCIcmSsj.js";import"./Database01-CgMLXTB0.js";import"./Printer-hmMbghuH.js";import"./File02-C6lTNDur.js";import"./Share07-XK-81nC3.js";import"./Globe01-BxiM5hiu.js";import"./SwitchHorizontal01-D4Xp6795.js";import"./HardDrive-DYoYQlgK.js";import"./Sun-DPlu9nq0.js";import"./Package-XpklebG8.js";import"./Palette-Cj-GyLY8.js";import"./Play-B7qVZhEj.js";import"./Shield01-BiMmptW_.js";import"./Users01-D6vUv3VA.js";import"./XCircle-CVRXuYKn.js";import"./Zap-CPc5P9In.js";import"./github-repo-BknN0SVI.js";import"./command-DeI04U1v.js";import"./index-BMgXFXs8.js";const be=[{name:"Claude",Icon:me,size:14,bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:ae,size:12,bg:"#000",fg:"#fff"},{name:"Codex",Icon:ce,size:12,bg:"#4F46E5",fg:"#fff"}];function _e(){const e=N.c(11),t=A(),{org:i}=z();let s;e[0]!==i.slug?(s={org:i.slug},e[0]=i.slug,e[1]=s):s=e[1];let r;e[2]!==t?(r=t("home.orgHome.connectPill"),e[2]=t,e[3]=r):r=e[3];let n;e[4]!==r?(n=o.jsx("span",{className:"font-medium text-foreground",children:r}),e[4]=r,e[5]=n):n=e[5];let l,a;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:be.map(ye)}),a=o.jsx(D,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[6]=l,e[7]=a):(l=e[6],a=e[7]);let c;return e[8]!==s||e[9]!==n?(c=o.jsxs(M,{to:"/$org/settings/connect",params:s,onClick:Ce,className:"group hidden max-w-full md:inline-flex flex-wrap items-center justify-center gap-x-3 gap-y-2 rounded-full border border-border bg-card py-1.5 pl-4 pr-2.5 text-sm transition-colors hover:bg-accent/60",children:[n,l,a]}),e[8]=s,e[9]=n,e[10]=c):c=e[10],c}function ye(e){const{name:t,Icon:i,size:s,bg:r,fg:n}=e;return o.jsx("span",{title:t,className:"flex size-6 items-center justify-center rounded-full",style:{backgroundColor:r,color:n},children:o.jsx(i,{size:s})},t)}function Ce(){return P("connect_clients_opened",{source:"org_home"})}function Ne(e){return e<12?"morning":e<18?"afternoon":"evening"}function Se(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}const R=6;function ke(e){const t=N.c(13),{project:i}=e,s=ge();let r;t[0]!==s||t[1]!==i.id||t[2]!==i.metadata?.ui?.layout?(r=()=>{P("org_home_project_clicked"),s(i.id,{panel:Y(i.metadata?.ui?.layout)})},t[0]=s,t[1]=i.id,t[2]=i.metadata?.ui?.layout,t[3]=r):r=t[3];let n;t[4]!==i.icon||t[5]!==i.title?(n=o.jsx(ue,{icon:i.icon,name:i.title,size:"sm+"}),t[4]=i.icon,t[5]=i.title,t[6]=n):n=t[6];let l;t[7]!==i.title?(l=o.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:i.title}),t[7]=i.title,t[8]=l):l=t[8];let a;return t[9]!==r||t[10]!==n||t[11]!==l?(a=o.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 items-center gap-3 rounded-lg p-2 text-left transition-colors hover:bg-accent/60",children:[n,l]}),t[9]=r,t[10]=n,t[11]=l,t[12]=a):a=t[12],a}function ve(e){const t=N.c(31),{projects:i,action:s}=e,r=A(),{org:n}=z();let l,a,c,m,d,p;if(t[0]!==s||t[1]!==i||t[2]!==r){const b=[...i].sort(we).slice(0,R);l=i.length>R,d="flex flex-col gap-4";let j;t[9]!==r?(j=r("home.projects.heading"),t[9]=r,t[10]=j):j=t[10];let h;t[11]!==j?(h=o.jsx("h2",{className:"text-lg font-medium text-foreground",children:j}),t[11]=j,t[12]=h):h=t[12],t[13]!==s||t[14]!==h?(p=o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h,s]}),t[13]=s,t[14]=h,t[15]=p):p=t[15],m="@container",a="grid grid-cols-1 gap-1 @lg:grid-cols-2",c=b.map(Te),t[0]=s,t[1]=i,t[2]=r,t[3]=l,t[4]=a,t[5]=c,t[6]=m,t[7]=d,t[8]=p}else l=t[3],a=t[4],c=t[5],m=t[6],d=t[7],p=t[8];let x;t[16]!==a||t[17]!==c?(x=o.jsx("div",{className:a,children:c}),t[16]=a,t[17]=c,t[18]=x):x=t[18];let f;t[19]!==m||t[20]!==x?(f=o.jsx("div",{className:m,children:x}),t[19]=m,t[20]=x,t[21]=f):f=t[21];let u;t[22]!==l||t[23]!==n||t[24]!==r?(u=l&&o.jsx("div",{children:o.jsx(G,{asChild:!0,variant:"ghost",size:"sm",children:o.jsx(M,{to:"/$org/settings/agents",params:{org:n.slug},children:r("home.projects.seeAll")})})}),t[22]=l,t[23]=n,t[24]=r,t[25]=u):u=t[25];let g;return t[26]!==d||t[27]!==p||t[28]!==f||t[29]!==u?(g=o.jsxs("section",{className:d,children:[p,f,u]}),t[26]=d,t[27]=p,t[28]=f,t[29]=u,t[30]=g):g=t[30],g}function Te(e){return o.jsx(ke,{project:e},e.id)}function we(e,t){return(t.updated_at??"").localeCompare(e.updated_at??"")}function Ae(){const e=N.c(10),{org:t}=z(),i=q();let s;e[0]!==t.id?(s=J.orgHasSite(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=!!t.id;let n;e[2]!==i?(n=()=>i.call("ORGANIZATION_HAS_SITE",{}),e[2]=i,e[3]=n):n=e[3];let l;e[4]!==s||e[5]!==r||e[6]!==n?(l={queryKey:s,staleTime:3e5,enabled:r,queryFn:n},e[4]=s,e[5]=r,e[6]=n,e[7]=l):l=e[7];const{data:a}=Z(l),c=a?.hasSite??!1;let m;return e[8]!==c?(m={hasSite:c},e[8]=c,e[9]=m):m=e[9],m}const Pe="https://www.youtube.com/playlist?list=PLZ4WtTgnJfBw";function He(e){const t=N.c(4),{className:i}=e;let s,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{fill:"#FF0000",d:"M27.4 3.1c-.3-1.2-1.3-2.2-2.5-2.5C22.7 0 14 0 14 0S5.3 0 3.1.6C1.9.9.9 1.9.6 3.1.1 5.3 0 8 0 10s.1 4.7.6 6.9c.3 1.2 1.3 2.2 2.5 2.5C5.3 20 14 20 14 20s8.7 0 10.9-.6c1.2-.3 2.2-1.3 2.5-2.5.5-2.2.6-4.9.6-6.9s-.1-4.7-.6-6.9z"}),r=o.jsx("path",{fill:"#fff",d:"M11.2 14.3l7.3-4.3-7.3-4.3z"}),t[0]=s,t[1]=r):(s=t[0],r=t[1]);let n;return t[2]!==i?(n=o.jsxs("svg",{viewBox:"0 0 28 20",className:i,"aria-hidden":"true",focusable:"false",children:[s,r]}),t[2]=i,t[3]=n):n=t[3],n}function Ie(){const e=N.c(27),t=A(),{hasSite:i}=Ae();if(!i)return null;let s;e[0]!==t?(s=t("home.orgHome.trainingThumbnailAlt"),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==s?(r=o.jsx("img",{src:"/cms-training.jpg",alt:s,className:"size-full object-cover"}),e[2]=s,e[3]=r):r=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20",children:o.jsx(He,{className:"w-9"})}),e[4]=n):n=e[4];let l;e[5]!==r?(l=o.jsxs("div",{className:"relative aspect-video w-40 shrink-0 overflow-hidden rounded-lg",children:[r,n]}),e[5]=r,e[6]=l):l=e[6];let a;e[7]!==t?(a=t("home.orgHome.trainingEyebrow"),e[7]=t,e[8]=a):a=e[8];let c;e[9]!==a?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e[9]=a,e[10]=c):c=e[10];let m;e[11]!==t?(m=t("home.orgHome.trainingTitle"),e[11]=t,e[12]=m):m=e[12];let d;e[13]!==m?(d=o.jsx("h3",{className:"text-sm font-medium text-foreground",children:m}),e[13]=m,e[14]=d):d=e[14];let p;e[15]!==t?(p=t("home.orgHome.trainingDescription"),e[15]=t,e[16]=p):p=e[16];let x;e[17]!==p?(x=o.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:p}),e[17]=p,e[18]=x):x=e[18];let f;e[19]!==c||e[20]!==d||e[21]!==x?(f=o.jsxs("div",{className:"min-w-0 flex-1",children:[c,d,x]}),e[19]=c,e[20]=d,e[21]=x,e[22]=f):f=e[22];let u;e[23]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(D,{className:"size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),e[23]=u):u=e[23];let g;return e[24]!==f||e[25]!==l?(g=o.jsxs("a",{href:Pe,target:"_blank",rel:"noreferrer",onClick:$e,className:"group card-shadow flex w-full items-center gap-4 rounded-xl bg-card p-3 text-left transition-colors hover:bg-accent/60",children:[l,f,u]}),e[24]=f,e[25]=l,e[26]=g):g=e[26],g}function $e(){return P("cms_training_opened",{source:"org_home"})}const ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ee(){const e=N.c(8),t=A();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(ie,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let s;e[1]!==t?(s=t("home.orgHome.searchPlaceholder"),e[1]=t,e[2]=s):s=e[2];let r;e[3]!==s?(r=o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:s}),e[3]=s,e[4]=r):r=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("kbd",{className:"shrink-0 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:"⌘K"}),e[5]=n):n=e[5];let l;return e[6]!==r?(l=o.jsxs("button",{type:"button","data-testid":"org-home-search",onClick:Oe,className:"card-shadow flex w-full items-center gap-2 rounded-xl bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent/60",children:[i,r,n]}),e[6]=r,e[7]=l):l=e[7],l}function Oe(){P("command_palette_opened",{source:"org_home_search"}),le()}function F(){const e=N.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx("div",{className:"flex min-h-64 items-center justify-center",children:o.jsx(V,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Be(e){const t=N.c(37),{canManageAgents:i,importButton:s}=e,r=A(),{org:n}=z();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={pageSize:1e3},t[0]=l):l=t[0];const a=je(l),c=pe();let m,d,p;if(t[1]!==a||t[2]!==i||t[3]!==s||t[4]!==n||t[5]!==r||t[6]!==c){p=Symbol.for("react.early_return_sentinel");e:{let j;if(t[10]!==n?(j=h=>h.id!==n.id,t[10]=n,t[11]=j):j=t[11],m=he(a).filter(j),m.length===0){let h;t[12]!==r?(h=r("routes.agentsList.noAgentsYet"),t[12]=r,t[13]=h):h=t[13];let _;t[14]!==i||t[15]!==r?(_=r(i?"home.orgAgents.importToGetStarted":"routes.agentsList.askAdminToCreate"),t[14]=i,t[15]=r,t[16]=_):_=t[16];let y;t[17]!==i||t[18]!==s?(y=i&&s("org_home_empty"),t[17]=i,t[18]=s,t[19]=y):y=t[19];let C;t[20]!==h||t[21]!==_||t[22]!==y?(C=o.jsx("div",{className:"flex items-center justify-center py-10",children:o.jsx(se,{image:null,title:h,description:_,actions:y})}),t[20]=h,t[21]=_,t[22]=y,t[23]=C):C=t[23],p=C;break e}d=fe(xe(m),c,null)}t[1]=a,t[2]=i,t[3]=s,t[4]=n,t[5]=r,t[6]=c,t[7]=m,t[8]=d,t[9]=p}else m=t[7],d=t[8],p=t[9];if(p!==Symbol.for("react.early_return_sentinel"))return p;const x=d.length>0;let f;t[24]!==i||t[25]!==s?(f=i&&s("org_home"),t[24]=i,t[25]=s,t[26]=f):f=t[26];let u;t[27]!==m||t[28]!==f?(u=o.jsx(ve,{projects:m,action:f}),t[27]=m,t[28]=f,t[29]=u):u=t[29];let g;t[30]!==m||t[31]!==x||t[32]!==c?(g=x&&o.jsx(de,{projects:m,tasks:c}),t[30]=m,t[31]=x,t[32]=c,t[33]=g):g=t[33];let b;return t[34]!==u||t[35]!==g?(b=o.jsxs("div",{className:"flex flex-col gap-12",children:[u,g]}),t[34]=u,t[35]=g,t[36]=b):b=t[36],b}function Le(){const e=N.c(51),t=A(),i=oe("home_task_intake_enabled"),{data:s}=Q.useSession(),[r,n]=E.useState(!1),{granted:l}=U("agents:manage");let a,c,m,d,p,x,f,u,g,b,j,h;if(e[0]!==s?.user?.name||e[1]!==t){const B=Se(s?.user?.name),L=ze[Ne(new Date().getHours())];let $;e[14]!==t?($=K=>o.jsxs(G,{size:"sm",variant:"outline",onClick:()=>{P("agent_create_clicked",{source:K,method:"github"}),n(!0)},children:[o.jsx(re,{size:14}),t("home.orgAgents.importFromGitHub")]}),e[14]=t,e[15]=$):$=e[15],d=$,m=O,c=O.Content,a=O.Container,j="reading",h="flex flex-col gap-12 pt-0 md:pt-0",u="flex flex-col items-center gap-12 text-center",e[16]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(_e,{}),b=o.jsx(Ie,{}),e[16]=g,e[17]=b):(g=e[16],b=e[17]),f="flex w-full flex-col items-center gap-5",p="text-3xl font-medium tracking-tight text-foreground",x=B?t(L.named,{name:B}):t(L.bare),e[0]=s?.user?.name,e[1]=t,e[2]=a,e[3]=c,e[4]=m,e[5]=d,e[6]=p,e[7]=x,e[8]=f,e[9]=u,e[10]=g,e[11]=b,e[12]=j,e[13]=h}else a=e[2],c=e[3],m=e[4],d=e[5],p=e[6],x=e[7],f=e[8],u=e[9],g=e[10],b=e[11],j=e[12],h=e[13];let _;e[18]!==p||e[19]!==x?(_=o.jsx("h1",{className:p,children:x}),e[18]=p,e[19]=x,e[20]=_):_=e[20];let y;e[21]!==i?(y=i?o.jsx(E.Suspense,{fallback:o.jsx(F,{}),children:o.jsx(ee,{children:o.jsx(te,{children:o.jsx(X,{homeTaskComposer:!0})})})}):o.jsx(Ee,{}),e[21]=i,e[22]=y):y=e[22];let C;e[23]!==f||e[24]!==_||e[25]!==y?(C=o.jsxs("div",{className:f,children:[_,y]}),e[23]=f,e[24]=_,e[25]=y,e[26]=C):C=e[26];let S;e[27]!==C||e[28]!==u||e[29]!==g||e[30]!==b?(S=o.jsxs("div",{className:u,children:[g,b,C]}),e[27]=C,e[28]=u,e[29]=g,e[30]=b,e[31]=S):S=e[31];let H;e[32]===Symbol.for("react.memo_cache_sentinel")?(H=o.jsx(F,{}),e[32]=H):H=e[32];let k;e[33]!==l||e[34]!==d?(k=o.jsx(E.Suspense,{fallback:H,children:o.jsx(Be,{canManageAgents:l,importButton:d})}),e[33]=l,e[34]=d,e[35]=k):k=e[35];let v;e[36]!==a||e[37]!==S||e[38]!==k||e[39]!==j||e[40]!==h?(v=o.jsxs(a,{width:j,className:h,children:[S,k]}),e[36]=a,e[37]=S,e[38]=k,e[39]=j,e[40]=h,e[41]=v):v=e[41];let T;e[42]!==c||e[43]!==v?(T=o.jsx(c,{children:v}),e[42]=c,e[43]=v,e[44]=T):T=e[44];let w;e[45]!==r?(w=o.jsx(ne,{open:r,onOpenChange:n}),e[45]=r,e[46]=w):w=e[46];let I;return e[47]!==m||e[48]!==T||e[49]!==w?(I=o.jsxs(m,{children:[T,w]}),e[47]=m,e[48]=T,e[49]=w,e[50]=I):I=e[50],I}function Lr(){const e=N.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(W.Content,{children:o.jsx(Le,{})}),e[0]=t):t=e[0],t}export{Lr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cr as Pt,cs as Dt,ct as P,ab as d,cu as ce,cv as He,cw as Lt,cx as kt,at as jt,bp as x,br as W,bq as oe,aa as T,cy as m,bt as F,cz as Zt,cA as A,bs as $t,t as ye,r as J,c as we,M as Ut,x as Ft,j as Bt}from"./index-
|
|
1
|
+
import{cr as Pt,cs as Dt,ct as P,ab as d,cu as ce,cv as He,cw as Lt,cx as kt,at as jt,bp as x,br as W,bq as oe,aa as T,cy as m,bt as F,cz as Zt,cA as A,bs as $t,t as ye,r as J,c as we,M as Ut,x as Ft,j as Bt}from"./index-Ci6FOo2o.js";import{u as Vt}from"./use-mcp-client-DXM1xOfJ.js";import{d as zt,e as Ye}from"./backoff-8mStPHYB.js";import{T as Ge,a as qe,b as Xe}from"./task-board-BnjdulNB.js";const Qe={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},Ke=Object.values(Qe);var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Oe;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Oe||(Oe={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class de extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof de))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}de.create=t=>new de(t);var Re;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Re||(Re={}));var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));class Z{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var et="vercel.ai.error",Jt=Symbol.for(et),Ne,xe,$=class tt extends(xe=Error,Ne=Jt,xe){constructor({name:e,message:a,cause:r}){super(a),this[Ne]=!0,this.name=e,this.cause=r}static isInstance(e){return tt.hasMarker(e,et)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function at(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var rt="AI_InvalidArgumentError",st=`vercel.ai.error.${rt}`,Wt=Symbol.for(st),Pe,De,Ht=class extends(De=$,Pe=Wt,De){constructor({message:t,cause:e,argument:a}){super({name:rt,message:t,cause:e}),this[Pe]=!0,this.argument=a}static isInstance(t){return $.hasMarker(t,st)}},nt="AI_JSONParseError",ot=`vercel.ai.error.${nt}`,Yt=Symbol.for(ot),Le,ke,je=class extends(ke=$,Le=Yt,ke){constructor({text:t,cause:e}){super({name:nt,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${at(e)}`,cause:e}),this[Le]=!0,this.text=t}static isInstance(t){return $.hasMarker(t,ot)}},it="AI_TypeValidationError",lt=`vercel.ai.error.${it}`,Gt=Symbol.for(lt),Ze,$e,q=class be extends($e=$,Ze=Gt,$e){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:it,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${at(a)}`,cause:a}),this[Ze]=!0,this.value=e,this.context=r}static isInstance(e){return $.hasMarker(e,lt)}static wrap({value:e,cause:a,context:r}){var s,n,i;return be.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new be({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Ht({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var qt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Xt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ue(t){const e=JSON.parse(t);return e===null||typeof e!="object"||qt.test(t)===!1&&Xt.test(t)===!1?e:Qt(e)}function Qt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Kt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ue(t)}try{return Ue(t)}finally{Error.stackTraceLimit=e}}function Ae(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=V(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(V):V(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(V)),t.allOf!=null&&(t.allOf=t.allOf.map(V)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(V));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=V(e[a]);return t}function V(t){return typeof t=="boolean"?t:Ae(t)}var ea=Symbol("Let zodToJsonSchema decide on which parser to use"),Fe={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},ta=t=>typeof t=="string"?{...Fe,name:t}:{...Fe,...t};function L(){return{}}function aa(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==g.ZodAny&&(n.items=E(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function ra(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function sa(){return{type:"boolean"}}function ut(t,e){return E(t.type._def,e)}var na=(t,e)=>E(t.innerType._def,e);function ct(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>ct(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return oa(t)}}var oa=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function ia(t,e){return{...E(t.innerType._def,e),default:t.defaultValue()}}function la(t,e){return e.effectStrategy==="input"?E(t.schema._def,e):L()}function ua(t){return{type:"string",enum:Array.from(t.values)}}var ca=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function da(t,e){const a=[E(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),E(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ca(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function pa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var ge=void 0,k={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ge===void 0&&(ge=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ge),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function dt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":j(a,"email",r.message,e);break;case"format:idn-email":j(a,"idn-email",r.message,e);break;case"pattern:zod":N(a,k.email,r.message,e);break}break;case"url":j(a,"uri",r.message,e);break;case"uuid":j(a,"uuid",r.message,e);break;case"regex":N(a,r.regex,r.message,e);break;case"cuid":N(a,k.cuid,r.message,e);break;case"cuid2":N(a,k.cuid2,r.message,e);break;case"startsWith":N(a,RegExp(`^${ve(r.value,e)}`),r.message,e);break;case"endsWith":N(a,RegExp(`${ve(r.value,e)}$`),r.message,e);break;case"datetime":j(a,"date-time",r.message,e);break;case"date":j(a,"date",r.message,e);break;case"time":j(a,"time",r.message,e);break;case"duration":j(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{N(a,RegExp(ve(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&j(a,"ipv4",r.message,e),r.version!=="v4"&&j(a,"ipv6",r.message,e);break}case"base64url":N(a,k.base64url,r.message,e);break;case"jwt":N(a,k.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&N(a,k.ipv4Cidr,r.message,e),r.version!=="v4"&&N(a,k.ipv6Cidr,r.message,e);break}case"emoji":N(a,k.emoji(),r.message,e);break;case"ulid":{N(a,k.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{j(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{N(a,k.base64,r.message,e);break}}break}case"nanoid":N(a,k.nanoid,r.message,e)}return a}function ve(t,e){return e.patternStrategy==="escape"?ha(t):t}var fa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ha(t){let e="";for(let a=0;a<t.length;a++)fa.has(t[a])||(e+="\\"),e+=t[a];return e}function j(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function N(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Be(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Be(e,r)}function Be(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as X,h as U,j as z,D as V,p as H,q as W}from"./index-
|
|
1
|
+
import{o as X,h as U,j as z,D as V,p as H,q as W}from"./index-2Adyhfq_.js";import{ez as Y,eA as G,ee as J,eB as Z,r as q,c as B,z as ee,K as te}from"./index-Ci6FOo2o.js";var we=X;function ne(n){var e;const{char:o,allowSpaces:t,allowToIncludeChar:s,allowedPrefixes:i,startOfLine:a,$position:r}=n,d=t&&!s,f=W(o),g=new RegExp(`\\s${f}$`),u=a?"^":"",m=s?"":f,h=d?new RegExp(`${u}${f}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${u}(?:^)?${f}[^\\s${m}]*`,"gm"),p=((e=r.nodeBefore)===null||e===void 0?void 0:e.isText)&&r.nodeBefore.text;if(!p)return null;const y=r.pos-p.length,c=Array.from(p.matchAll(h)).pop();if(!c||c.input===void 0||c.index===void 0)return null;const S=c.input.slice(Math.max(0,c.index-1),c.index),v=new RegExp(`^[${i?.join("")}\0]?$`).test(S);if(i!==null&&!v)return null;const w=y+c.index;let l=w+c[0].length;return d&&g.test(p.slice(l-1,l+1))&&(c[0]+=" ",l+=1),w<r.pos&&l>=r.pos?{range:{from:w,to:l},query:c[0].slice(o.length),text:c[0]}:null}function oe(n){return n.docChanged?n.steps.some(e=>{const o=e.slice;if(!o?.content)return!1;const t=o.content.textBetween(0,o.content.size,`
|
|
2
2
|
`);return/\s/.test(t)}):!1}function se(n){return()=>{const e=n.state.selection.$anchor.pos,{top:o,right:t,bottom:s,left:i}=n.view.coordsAtPos(e);try{return new DOMRect(i,o,t-i,s-o)}catch{return null}}}function le(n,e,o,t){return o?()=>{const s=t.getState(n.state),i=s?.decorationId,a=e.dom.querySelector(`[data-decoration-id="${i}"]`);return a?.getBoundingClientRect()||null}:se(n)}function ae({match:n,dismissedRange:e,state:o,transaction:t,editor:s,shouldResetDismissed:i,effectiveAllowSpaces:a}){return i?.({editor:s,state:o,range:e,match:n,transaction:t,allowSpaces:a})?!1:a?n.range.from===e.from:n.range.from===e.from&&!oe(t)}function ie({view:n,pluginKeyRef:e}){const o=n.state.tr.setMeta(e,{exit:!0});n.dispatch(o)}function re({pluginKey:n,decorationTag:e,decorationClass:o,decorationContent:t,decorationEmptyClass:s,renderer:i,dispatchExit:a}){return{handleKeyDown(r,d){var f;const g=n.getState(r.state);if(!g.active)return!1;if(d.key==="Escape"||d.key==="Esc"){var u;return i==null||(u=i.onKeyDown)===null||u===void 0||u.call(i,{view:r,event:d,range:g.range}),a(r),!0}return(i==null||(f=i.onKeyDown)===null||f===void 0?void 0:f.call(i,{view:r,event:d,range:g.range}))||!1},decorations(r){const{active:d,range:f,decorationId:g,query:u}=n.getState(r);if(!d)return null;const m=!u?.length,h=[o];return m&&h.push(s),V.create(r.doc,[H.inline(f.from,f.to,{nodeName:e,class:h.join(" "),"data-decoration-id":g||void 0,"data-decoration-content":t})])}}}function ue({editor:n,char:e,effectiveAllowSpaces:o,allowToIncludeChar:t,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:a,allow:r,shouldShow:d,shouldKeepDismissed:f,pluginKey:g}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,m,h,p){const{isEditable:y}=n,{composing:c}=n.view,{selection:S}=u,{empty:v,from:w}=S,l={...m},D=u.getMeta(g);if(D&&D.exit)return l.active=!1,l.decorationId=null,l.range={from:0,to:0},l.query=null,l.text=null,l.dismissedRange=m.active?{...m.range}:m.dismissedRange,l;if(l.composing=c,u.docChanged&&l.dismissedRange!==null&&(l.dismissedRange={from:u.mapping.map(l.dismissedRange.from),to:u.mapping.map(l.dismissedRange.to)}),y&&(v||n.view.composing)){(w<m.range.from||w>m.range.to)&&!c&&!m.composing&&(l.active=!1);const x=a({char:e,allowSpaces:o,allowToIncludeChar:t,allowedPrefixes:s,startOfLine:i,$position:S.$from}),C=`id_${Math.floor(Math.random()*4294967295)}`;x&&r({editor:n,state:p,range:x.range,isActive:m.active})&&(!d||d({editor:n,range:x.range,query:x.query,text:x.text,transaction:u}))?(l.dismissedRange!==null&&!f({match:x,dismissedRange:l.dismissedRange,state:p,transaction:u})&&(l.dismissedRange=null),l.dismissedRange===null?(l.active=!0,l.decorationId=m.decorationId||C,l.range=x.range,l.query=x.query,l.text=x.text):l.active=!1):(x||(l.dismissedRange=null),l.active=!1)}else l.active=!1;return l.active||(l.decorationId=null,l.range={from:0,to:0},l.query=null,l.text=null),l}}}function ce({editor:n,items:e}){let o=null,t=null,s=null;const i=()=>{t!==null&&(clearTimeout(t),t=null),s?.(),s=null},a=f=>new Promise(g=>{s=g,t=setTimeout(()=>{t=null;const u=s;s=null,u?.()},f)}),r=()=>{o?.abort(),i(),o=null};return{abort:r,fetch:async(f,g)=>{r(),o=new AbortController;const u=o;if(g>0&&await a(g),o!==u||u.signal.aborted)return{status:"aborted"};try{const m=await e({editor:n,query:f,signal:u.signal});return o!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:m}}catch{return o!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function de({placement:n,offset:e,flip:o,floatingUi:t}){var s,i,a,r;const d=[Y({mainAxis:(s=e.mainAxis)!==null&&s!==void 0?s:4,crossAxis:(i=e.crossAxis)!==null&&i!==void 0?i:0})];return o&&d.push(G()),!(t==null||(a=t.middleware)===null||a===void 0)&&a.length&&d.push(...t.middleware),{placement:n,strategy:(r=t?.strategy)!==null&&r!==void 0?r:"absolute",middleware:d}}function fe(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function ge({getReferenceRect:n,contextElement:e,config:o,container:t,dismissOnOutsideClick:s,dismiss:i}){return(a,r={})=>{const d={getBoundingClientRect:()=>{var p;return(p=n())!==null&&p!==void 0?p:new DOMRect},contextElement:e};let f=!1;const g=!a.isConnected;g&&fe(t).appendChild(a),r.onPosition||(a.style.visibility="hidden",a.style.width="max-content");const m=J(d,a,()=>{Z(d,a,{placement:o.placement,strategy:o.strategy,middleware:o.middleware}).then(({x:p,y,placement:c,strategy:S})=>{if(r.onPosition){r.onPosition({x:p,y,placement:c,strategy:S});return}Object.assign(a.style,{position:S,left:`${p}px`,top:`${y}px`}),f||(f=!0,a.style.visibility="")})},r.autoUpdate);let h;return s&&(h=p=>{const y=p.target;!(y instanceof Node)||a.contains(y)||e.contains(y)||i()},document.addEventListener("pointerdown",h,!0)),()=>{m(),h&&document.removeEventListener("pointerdown",h,!0),g&&a.remove()}}}function me({editor:n,pluginKey:e,items:o,renderer:t,minQueryLength:s,debounce:i,initialItems:a,placement:r,offset:d,container:f,flip:g,floatingUi:u,dismissOnOutsideClick:m,command:h,clientRectFor:p,dispatchExit:y}){let c;const S=ce({editor:n,items:o}),v=de({placement:r,offset:d,flip:g,floatingUi:u});function w(l,D){switch(l){case"started":var x;t==null||(x=t.onStart)===null||x===void 0||x.call(t,D);break;case"updated":var C;t==null||(C=t.onUpdate)===null||C===void 0||C.call(t,D);break;case"stopped":var R;t==null||(R=t.onExit)===null||R===void 0||R.call(t,D)}}return{update:async(l,D)=>{var x,C;const R=e.getState(D),A=e.getState(l.state);if(!R||!A)return;let E=null;const P=R.query!==A.query,_=R.text!==A.text,N=R.range.from!==A.range.from||R.range.to!==A.range.to,O=P||_||N;if(!R.active&&A.active)E="started";else if(R.active&&!A.active)E="stopped";else if(A.active&&O)E="updated";else return;const T=E==="stopped"?R:A,$=l.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`),b=p(l,$),M=s===0||(T.query?T.query.length>=s:!1),F=(E==="started"||E==="updated")&&M;if(c={editor:n,range:T.range,query:T.query||"",text:T.text||"",items:a??[],command:L=>h({editor:n,range:T.range,props:L}),decorationNode:$,clientRect:b,loading:F,placement:r,offset:{mainAxis:(x=d.mainAxis)!==null&&x!==void 0?x:4,crossAxis:(C=d.crossAxis)!==null&&C!==void 0?C:0},container:f,flip:g,floatingUi:v,mount:ge({getReferenceRect:b,contextElement:l.dom,config:v,container:f,dismissOnOutsideClick:m,dismiss:()=>y(n.view)})},E==="started"){var k;t==null||(k=t.onBeforeStart)===null||k===void 0||k.call(t,c)}if(E==="updated"){var I;t==null||(I=t.onBeforeUpdate)===null||I===void 0||I.call(t,c)}if(E==="started"&&w(E,c),E==="started"||E==="updated")if(!F)S.abort(),c={...c,items:a??[],loading:!1};else{c={...c,items:a??[],loading:!0},E="updated",w(E,c);const L=await S.fetch(T.query||"",i);if(L.status==="aborted")return;const K=e.getState(l.state);if(!K?.active){S.abort();return}c=L.status==="resolved"?{...c,items:L.items,loading:!1}:{...c,loading:!1}}if(E==="stopped"){S.abort(),w(E,c),c=void 0;return}E==="updated"&&w(E,c)},destroy:()=>{var l;S.abort(),c&&(t==null||(l=t.onExit)===null||l===void 0||l.call(t,c))}}}const j=new U("suggestion");function Q({pluginKey:n=j,editor:e,char:o="@",allowSpaces:t=!1,allowToIncludeChar:s=!1,allowedPrefixes:i=[" "],startOfLine:a=!1,decorationTag:r="span",decorationClass:d="suggestion",decorationContent:f="",decorationEmptyClass:g="is-empty",command:u=()=>null,items:m=()=>[],minQueryLength:h=0,debounce:p=0,initialItems:y,placement:c="bottom-start",offset:S={},container:v,flip:w=!0,floatingUi:l,dismissOnOutsideClick:D=!0,render:x=()=>({}),allow:C=()=>!0,findSuggestionMatch:R=ne,shouldShow:A,shouldResetDismissed:E}){const P=x?.(),_=t&&!s,N=($,b)=>le(e,$,b,n);function O($){return ae({...$,editor:e,shouldResetDismissed:E,effectiveAllowSpaces:_})}const T=$=>ie({view:$,pluginKeyRef:n});return new z({key:n,view:()=>me({editor:e,pluginKey:n,items:m,renderer:P,minQueryLength:h,debounce:p,initialItems:y,placement:c,offset:S,container:v,flip:w,floatingUi:l,dismissOnOutsideClick:D,command:u,clientRectFor:N,dispatchExit:T}),state:ue({editor:e,char:o,effectiveAllowSpaces:_,allowToIncludeChar:s,allowedPrefixes:i,startOfLine:a,findSuggestionMatch:R,allow:C,shouldShow:A,shouldKeepDismissed:O,pluginKey:n}),props:re({pluginKey:n,decorationTag:r,decorationClass:d,decorationContent:f,decorationEmptyClass:g,renderer:P,dispatchExit:T})})}function Re(n,e=j){const o=n.state.tr.setMeta(e,{exit:!0});n.dispatch(o)}var qe=Q;function pe(n){const e=B.c(24),{editor:o,query:t,items:s,onSelect:i,onClose:a}=n,[r,d]=q.useState(0),f=q.useRef(s),g=q.useRef(r),u=q.useRef(i),m=q.useRef(a),h=q.useDeferredValue(t);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(0)},e[0]=p):p=e[0];let y;e[1]!==h?(y=[h],e[1]=h,e[2]=y):y=e[2],q.useEffect(p,y);let c,S;e[3]!==s.length||e[4]!==r?(c=()=>{r>=s.length&&s.length>0&&d(0)},S=[s.length,r],e[3]=s.length,e[4]=r,e[5]=c,e[6]=S):(c=e[5],S=e[6]),q.useEffect(c,S);let v,w;e[7]!==s?(v=()=>{f.current=s},w=[s],e[7]=s,e[8]=v,e[9]=w):(v=e[8],w=e[9]),q.useEffect(v,w);let l,D;e[10]!==r?(l=()=>{g.current=r},D=[r],e[10]=r,e[11]=l,e[12]=D):(l=e[11],D=e[12]),q.useEffect(l,D);let x,C;e[13]!==i?(C=()=>{u.current=i},x=[i],e[13]=i,e[14]=x,e[15]=C):(x=e[14],C=e[15]),q.useEffect(C,x);let R,A;e[16]!==a?(R=()=>{m.current=a},A=[a],e[16]=a,e[17]=R,e[18]=A):(R=e[17],A=e[18]),q.useEffect(R,A);let E,P;e[19]!==o?(E=()=>{if(o?.isDestroyed)return;let O;try{O=o.view.dom}catch{return}if(!O)return;const T=b=>{const M=f.current;if(!M.length)return!1;const F=()=>d(I=>(I+1)%M.length),k=()=>d(I=>(I-1+M.length)%M.length);switch(b.key){case"ArrowUp":return b.preventDefault(),k(),!0;case"ArrowDown":return b.preventDefault(),F(),!0;case"Tab":return b.preventDefault(),b.shiftKey?k():F(),!0;case"Home":return b.preventDefault(),d(0),!0;case"End":return b.preventDefault(),d(M.length-1),!0;case"Enter":{if(b.isComposing)return!1;b.preventDefault();const I=g.current;return I!==-1&&M[I]&&u.current?.(M[I],I),!0}case"Escape":return b.preventDefault(),m.current?.(),!0;default:return!1}},$=b=>{T(b)};return O.addEventListener("keydown",$,!0),()=>{O?.removeEventListener("keydown",$,!0)}},P=[o],e[19]=o,e[20]=E,e[21]=P):(E=e[20],P=e[21]),q.useEffect(E,P);const _=s.length?r:void 0;let N;return e[22]!==_?(N={selectedIndex:_,setSelectedIndex:d},e[22]=_,e[23]=N):N=e[23],N}function ye(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const ve=q.createContext(void 0);function xe(){const n=q.useContext(ve);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function be(n){const e=B.c(16),{editor:o,char:t,pluginKey:s,allow:i,onOpenChange:a}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=r):r=e[0];const[d,f]=q.useReducer(ye,r);let g;e[1]!==a?(g=y=>{a?.(y)},e[1]=a,e[2]=g):g=e[2];const u=q.useEffectEvent(g);let m;e[3]!==t||e[4]!==i||e[5]!==o||e[6]!==u||e[7]!==s?(m=()=>{if(o?.isDestroyed)return;const y=s instanceof U?s:new U(s);o.state.plugins.find(v=>v.spec.key===y)&&o.unregisterPlugin(y);const S=Q({pluginKey:y,editor:o,char:t,allow(v){const w=o.state.doc.resolve(v.range.from);for(let l=w.depth;l>0;l--)if(w.node(l).type.name==="image")return!1;return!(i&&!i(v))},command(){},render:()=>({onStart:v=>{f({type:"ON_START",payload:{element:v.decorationNode??null,query:v.query,range:v.range}}),u(!0)},onUpdate:v=>{f({type:"ON_UPDATE",payload:{element:v.decorationNode??null,query:v.query,range:v.range}})},onKeyDown:v=>v.event.key==="Escape"?(f({type:"ON_EXIT"}),!0):!1,onExit:()=>{f({type:"ON_EXIT"}),u(!1)}}),items:he});return o.registerPlugin(S),()=>{o?.isDestroyed||o.unregisterPlugin(y)}},e[3]=t,e[4]=i,e[5]=o,e[6]=u,e[7]=s,e[8]=m):m=e[8];let h;e[9]!==t||e[10]!==i||e[11]!==o||e[12]!==s?(h=[o,s,t,f,i],e[9]=t,e[10]=i,e[11]=o,e[12]=s,e[13]=h):h=e[13],q.useEffect(m,h);let p;return e[14]!==d?(p={state:d,dispatch:f},e[14]=d,e[15]=p):p=e[15],p}function he(){return[]}function Ce({editor:n,queryKey:e,queryFn:o,onSelect:t}){const{state:s,dispatch:i}=xe(),a=q.useDeferredValue(s.query),{data:r}=ee({queryKey:te.suggestionItems(e,s.open,a),queryFn:()=>s.open?o({query:a}):[]}),d=()=>{i({type:"ON_EXIT"})},f=async(u,m)=>{if(!(s.selectedItem!==null||!s.range)){i({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,y=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),c=s.range?{...s.range}:{from:0,to:0};y&&s.range&&(c.to+=1),await t({range:c,item:u})===!1?i({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:g}=pe({editor:n,query:a,items:r,onSelect:f,onClose:d});return{selectedItem:s.selectedItem,items:r,selectedIndex:g,close:d,onSelect:f}}export{ve as S,xe as a,Ce as b,qe as c,Re as e,we as s,be as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as fo,r as F,b as cc,ac as Hf,j as R,h as Vf,B as cl,ab as ul,aa as jf,ad as Wf,dY as uc,dZ as Kf,aw as Uf,d_ as Kt,d$ as _f,l as dc}from"./index-B_t_9L8u.js";import{d as qf,g as Jf}from"./gateway-client-Da7gZR-i.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-B23QWo9i.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-D274Mm5V.js";import{I as oh}from"./input-Ca_ZLV1Y.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-CAC-qw2Y.js";import{T as ah,a as ch,c as uh}from"./tooltip-pAkqh20b.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,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,n,r,i){return this.content.textBetween(e,n,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,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.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()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,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):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
|
|
1
|
+
import{c as fo,r as F,b as cc,ac as Hf,j as R,h as Vf,B as cl,ab as ul,aa as jf,ad as Wf,dY as uc,dZ as Kf,aw as Uf,d_ as Kt,d$ as _f,l as dc}from"./index-Ci6FOo2o.js";import{d as qf,g as Jf}from"./gateway-client-BKiwX9p5.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-CALEql2B.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-BDbK3JnT.js";import{I as oh}from"./input-lLD2pWyd.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-BQaKniQN.js";import{T as ah,a as ch,c as uh}from"./tooltip-Cjm5-OzF.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,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,n,r,i){return this.content.textBetween(e,n,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,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.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()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,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):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
|
|
2
2
|
`)}}Ut.empty=new Ut(!0);class kh{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Cc(t){let e=[];do e.push(Sh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Sh(t){let e=[];do e.push(xh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function xh(t){let e=Eh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Ch(t,e);else break;return e}function pl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Ch(t,e){let n=pl(t),r=n;return t.eat(",")&&(t.next!="}"?r=pl(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Mh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Eh(t){if(t.eat("(")){let e=Cc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Mh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Th(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=n())}else if(o.type=="star"){let a=n();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=n();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=n();i(s(o.expr,a),u),a=u}if(o.max==-1)i(s(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=n();r(a,u),i(s(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Mc(t,e){return e-t}function ml(t,e){let n=[];return r(e),n.sort(Mc);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&n.indexOf(a)==-1&&r(a)}}}function wh(t){let e=Object.create(null);return n(ml(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);ml(t,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new Ut(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(Mc);s.next.push({type:i[o][0],next:e[l.join(",")]||n(l)})}return s}}function vh(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ec(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Tc(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function wc(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let i in t)t[i].validate&&t[i].validate(e[i])}function vc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Nh(t,r,e[r]);return n}let gl=class Ac{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=vc(e,r.attrs),this.defaultAttrs=Ec(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==Ut.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:Tc(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bt(this,this.computeAttrs(e),k.from(n),$.setFrom(r))}createChecked(e=null,n,r){return n=k.from(n),this.checkContent(n),new Bt(this,this.computeAttrs(e),n,$.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=k.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(k.empty,!0);return s?new Bt(this,e,n.append(s),$.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){wc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:$.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new Ac(s,n,o));let i=n.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 s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ah(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class Nh{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ah(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ri{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=vc(e,i.attrs),this.excluded=null;let s=Ec(this.attrs);this.instance=s?new $(this,s):null}create(e=null){return!e&&this.instance?this.instance:new $(this,Tc(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ri(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){wc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Nc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=se.from(e.nodes),n.marks=se.from(e.marks||{}),this.nodes=gl.compile(this.spec.nodes,this),this.marks=Ri.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 s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Ut.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?yl(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:yl(this,o.split(" "))}this.nodeFromJSON=i=>Bt.fromJSON(this,i),this.markFromJSON=i=>$.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof gl){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Wr(r,r.defaultAttrs,e,$.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function yl(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let l in t.marks){let a=t.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Oh(t){return t.tag!=null}function Dh(t){return t.style!=null}class He{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Oh(i))this.tags.push(i);else if(Dh(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new kl(this,n,!1);return r.addAll(e,$.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new kl(this,n,!0);return r.addAll(e,$.none,n.from,n.to),M.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Ph(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(o.getAttrs){let a=o.getAttrs(n);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let l=n[o];if((l.priority==null?50:l.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const Oc={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Rh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dc={ol:!0,ul:!0},er=1,vs=2,Bn=4;function bl(t,e,n){return e!=null?(e?er:0)|(e==="full"?vs:0):t&&t.whitespace=="pre"?er|vs:n&~Bn}class Cr{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=$.none,this.match=s||(o&Bn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(k.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);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&er)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=k.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Oc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class kl{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=bl(null,n.preserveWhitespace,0)|(r?Bn:0);i?s=new Cr(i.type,i.attrs,$.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new Cr(null,null,$.none,!0,null,o):s=new Cr(e.schema.topNodeType,null,$.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&vs?"full":this.localPreserveWS||(i.options&er)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(o.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Dc.hasOwnProperty(o)&&this.parser.normalizeLists&&Ih(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Rh.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Oc.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=a&&a.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(s,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,n.attrs||null,r,n.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=$.none;for(let l of i.concat(e.marks))(s.type?s.type.allowsMarkType(l.type):xl(l.type,e.type))&&(o=l.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=bl(e,s,o.options);o.options&Bn&&o.content.length==0&&(l|=Bn);let a=$.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):xl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Cr(e,n,a,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=er)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Ih(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Dc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Ph(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Sl(t){let e={};for(let n in t)e[n]=t[n];return e}function xl(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}class nt{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Mr(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)i=s.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,n);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){if(e.isText)return Mr(n).createTextNode(e.text);let{dom:r,contentDOM:i}=Lr(Mr(n),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,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Lr(Mr(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:Lr(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new nt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Cl(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Cl(e.marks)}}function Cl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Mr(t){return t.document||window.document}const Ml=new WeakMap;function Lh(t){let e=Ml.get(t);return e===void 0&&Ml.set(t,e=$h(t)),e}function $h(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Lr(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Lh(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let l,a=n?t.createElementNS(n,i):t.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?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(t.createTextNode(f));else{let{dom:h,contentDOM:p}=Lr(t,f,n,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Rc=65535,Ic=Math.pow(2,16);function zh(t,e){return t+e*Ic}function El(t){return t&Rc}function Bh(t){return(t-(t&Rc))/Ic}const Pc=1,Lc=2,$r=4,$c=8;class As{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$c)>0}get deletedBefore(){return(this.delInfo&(Pc|$r))>0}get deletedAfter(){return(this.delInfo&(Lc|$r))>0}get deletedAcross(){return(this.delInfo&$r)>0}}class xe{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xe.empty)return xe.empty}recover(e){let n=0,r=El(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Bh(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:n:n,h=a+i+(f<0?0:u);if(r)return h;let p=e==(n<0?a:d)?null:zh(l/3,e-a),g=e==a?Lc:e==d?Pc:$r;return(n<0?e!=a:e!=d)&&(g|=$c),new As(h,g,p)}i+=u-c}return r?e+i:new As(e+i,0,null)}touches(e,n){let r=0,i=El(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),c=this.ranges[i+n],u=this.ranges[i+r];e(l,l+c,a,a+u),s+=u-c}}invert(){return new xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xe.empty:new xe(e<0?[0,-e,0]:[0,0,e])}}xe.empty=new xe([]);class tr{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new tr(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new tr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],l=o.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new As(e,i,null)}}const Gi=Object.create(null);class fe{getMap(){return xe.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Gi[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Gi)throw new RangeError("Duplicate use of step JSON ID "+e);return Gi[e]=n,n.prototype.jsonID=e,n}}class G{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new G(e,null)}static fail(e){return new G(null,e)}static fromReplace(e,n,r,i){try{return G.ok(e.replace(n,r,i))}catch(s){if(s instanceof Qn)return G.fail(s.message);throw s}}}function ho(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(ho(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return k.fromArray(r)}class mt extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new M(ho(n.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,s)}invert(){return new De(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mt(n.pos,r.pos,this.mark)}merge(e){return e instanceof mt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mt(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("addMark",mt);class De extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new M(ho(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,r)}invert(){return new mt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new De(n.pos,r.pos,this.mark)}merge(e){return e instanceof De&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new De(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new De(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("removeMark",De);class gt extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new gt(this.pos,n.marks[i]);return new gt(this.pos,this.mark)}}return new _t(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new gt(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("addNodeMark",gt);class _t extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new gt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new _t(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new _t(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("removeNodeMark",_t);class q extends fe{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Ns(e,this.from,this.to)?G.fail("Structure replace would overwrite content"):G.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xe([this.from,this.to-this.from,this.slice.size])}invert(e){return new q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&q.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new q(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new q(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new q(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new q(n.from,n.to,M.fromJSON(e,n.slice),!!n.structure)}}q.MAP_BIAS=1;fe.jsonID("replace",q);class ee extends fe{constructor(e,n,r,i,s,o,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Ns(e,this.from,this.gapFrom)||Ns(e,this.gapTo,this.to)))return G.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return G.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?G.fromReplace(e,this.from,this.to,r):G.fail("Content does not fit in gap")}getMap(){return new xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new ee(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new ee(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ee(n.from,n.to,n.gapFrom,n.gapTo,M.fromJSON(e,n.slice),n.insert,!!n.structure)}}fe.jsonID("replaceAround",ee);function Ns(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Fh(t,e,n,r){let i=[],s=[],o,l;t.doc.nodesBetween(e,n,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,n),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:i.push(o=new De(f,h,d[g])));l&&l.to==f?l.to=h:s.push(l=new mt(f,h,r))}}),i.forEach(a=>t.step(a)),s.forEach(a=>t.step(a))}function Hh(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Ri){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,n);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=s):i.push({style:d,from:Math.max(l,e),to:c,step:s})}}}),i.forEach(o=>t.step(new De(o.from,o.to,o.style)))}function po(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<s.childCount;a++){let c=s.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new q(l,u,M.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new De(l,u,c.marks[f]));if(i&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new M(k.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new q(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);t.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)t.step(o[a])}function Vh(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Mn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let o=t.$from.node(r),l=t.$from.index(r)+i,a=t.$to.indexAfter(r)-s;if(r<t.depth&&o.canReplace(l,a,n))return r;if(r==0||o.type.spec.isolating||!Vh(o,l,a))break;l&&(i=1),a<o.childCount&&(s=1)}return null}function jh(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),l=i.after(s+1),a=o,c=l,u=k.empty,d=0;for(let p=s,g=!1;p>n;p--)g||r.index(p)>0?(g=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,g=!1;p>n;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=k.from(i.node(p).copy(f)),h++):c++;t.step(new ee(a,c,o,l,new M(u.append(f),d,h),u.size-d,!0))}function mo(t,e,n=null,r=t){let i=Wh(t,e),s=i&&Kh(r,e);return s?i.map(Tl).concat({type:e,attrs:n}).concat(s.map(Tl)):null}function Tl(t){return{type:t,attrs:null}}function Wh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function Kh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(n.child(c).type);return!a||!a.validEnd?null:o}function Uh(t,e,n){let r=k.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let l=n[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new ee(i,s,i,s,new M(r,0,0),n.length,!0))}function _h(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&qh(t.doc,t.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Bc(t,o,l,s),po(t,t.mapping.slice(s).map(l,1),r,void 0,c===null);let u=t.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return t.step(new ee(d,f,d+1,f-1,new M(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&zc(t,o,l,s),!1}})}function zc(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Bc(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,b9 as ce,j as p,b4 as _,b3 as j,b1 as C,bb as le,b8 as de,bo as ue,bk as fe,bj as me}from"./index-
|
|
1
|
+
import{r as l,b9 as ce,j as p,b4 as _,b3 as j,b1 as C,bb as le,b8 as de,bo as ue,bk as fe,bj as me}from"./index-Ci6FOo2o.js";import{e as Y}from"./select-DlFxiDXG.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,T]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:v=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:b=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),w=r==="horizontal"?ge:be,[S=[],K]=ce({prop:h,defaultProp:v,onChange:x=>{[...m.current][f.current]?.focus(),i(x)}}),V=l.useRef(S);function B(x){const y=ye(S,x);I(x,y)}function se(x){I(x,f.current)}function ae(){const x=V.current[f.current];S[f.current]!==x&&d(S)}function I(x,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((x-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=xe(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(V.current=S)}),min:n,max:s,inverted:b,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:x,direction:y})=>{if(!a){const z=$.includes(x.key)||x.shiftKey&&X.includes(x.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:v,...h}=e,[i,d]=l.useState(null),b=C(t,w=>d(w)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(w){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(w-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:b,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=D(w.clientX);r?.(S)},onSlideMove:w=>{const S=D(w.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:w=>{const K=G[f?"from-left":"from-right"].includes(w.key);v?.({event:w,direction:K?-1:1})}})})}),be=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...v}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),b=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],w=O(f,b?[n,o]:[o,n]);return d.current=m,w(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...v,ref:i,style:{...v.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[b?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...v}=e,h=T(M,o);return p.jsx(j.span,{...v,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=T(ee,o);return p.jsx(j.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=T(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,v=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...v):0,i=100-Math.max(...v);return p.jsx(j.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(ve,{...e,ref:c,index:r})}),ve=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=T(L,o),a=Q(L,o),[u,v]=l.useState(null),h=C(t,D=>v(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),b=r.values[n],R=b===void 0?0:ie(b,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(j.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":b,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:b===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:b},n)]})});oe.displayName=L;var we="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(j.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=we;function xe(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,je=ne,Te=oe;export{Ie as R,Ae as T,je as a,Te as b};
|