decocms 4.166.2 → 4.167.0
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-DH3qtgBe.js → AlertCircle-Cd8M35Wb.js} +1 -1
- package/dist/client/assets/{AreaChart-CUxSq8CM.js → AreaChart-C78nqQQF.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bw-aOPaU.js → ArrowUp-4BHUZHFD.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Cc2KMNxL.js → ArrowUpRight-CCEVlmCI.js} +1 -1
- package/dist/client/assets/{Check-lBHxT1HX.js → Check-CK_e8wdj.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cva3EkPV.js → CheckCircle-D31c9Zko.js} +1 -1
- package/dist/client/assets/{ChevronDown-QYK7Lenl.js → ChevronDown-DSAcD82u.js} +1 -1
- package/dist/client/assets/{ChevronRight-CWURfvDb.js → ChevronRight-D02mIW0w.js} +1 -1
- package/dist/client/assets/{ChevronUp-BMvYccDe.js → ChevronUp-BqqaHKfG.js} +1 -1
- package/dist/client/assets/{Copy01-CAqSjpf_.js → Copy01-CbmbpqVa.js} +1 -1
- package/dist/client/assets/{CpuChip01-lsdcDtEC.js → CpuChip01-DHX1tpE2.js} +1 -1
- package/dist/client/assets/{DotsVertical-C58fabD-.js → DotsVertical-DD9vI7XN.js} +1 -1
- package/dist/client/assets/{Eye-Dw90cLwR.js → Eye-CgfUY2cN.js} +1 -1
- package/dist/client/assets/{FilterLines-BafoDeSJ.js → FilterLines-BVMJKn0q.js} +1 -1
- package/dist/client/assets/{HardDrive-BuNe2d8F.js → HardDrive-2n4L-vNW.js} +1 -1
- package/dist/client/assets/{Key01-DSruLSCx.js → Key01-T5YNQBm2.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BV4kR0Cl.js → LayoutLeft-CaOxvIEl.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DltqAIeP.js → LinkExternal01-CXa8wVjc.js} +1 -1
- package/dist/client/assets/{LogOut01-B1kROqne.js → LogOut01-CM9eugyU.js} +1 -1
- package/dist/client/assets/{Monitor01-Ba7OYhMO.js → Monitor01-8S0W2w5U.js} +1 -1
- package/dist/client/assets/{Palette-CwJTW0Hm.js → Palette-BQLbJJdf.js} +1 -1
- package/dist/client/assets/{Play-B47Q6pNp.js → Play-CuYQk1-M.js} +1 -1
- package/dist/client/assets/{Plus-Bi2kvuIY.js → Plus-BApQaxo5.js} +1 -1
- package/dist/client/assets/{SearchLg-UBODIUpH.js → SearchLg-BSb_OzKH.js} +1 -1
- package/dist/client/assets/{SearchMd-Swr0KhLg.js → SearchMd-bzt4kP0K.js} +1 -1
- package/dist/client/assets/{Settings02-Crp31NAs.js → Settings02-Cslfpi0u.js} +1 -1
- package/dist/client/assets/{Shield01-D6aMdI8b.js → Shield01-vx0tzuE8.js} +1 -1
- package/dist/client/assets/{Star01-WZXTBc9P.js → Star01-DGK3WnVL.js} +1 -1
- package/dist/client/assets/{Stars01-CbClslIT.js → Stars01-BkoB-Q1B.js} +1 -1
- package/dist/client/assets/{Stars02-D3Ts30Xu.js → Stars02-Cx4R-W4T.js} +1 -1
- package/dist/client/assets/{Sun-DOEVL1Eu.js → Sun-Cno0ZL2K.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-5PmCZ0_U.js → SwitchHorizontal01-B1yag0Lu.js} +1 -1
- package/dist/client/assets/{Tool01-BgrN_XhB.js → Tool01-BPkNcjLe.js} +1 -1
- package/dist/client/assets/{Tool02-C8_nzaSV.js → Tool02-8rf_PPrb.js} +1 -1
- package/dist/client/assets/{Trash01-BB8WWZkr.js → Trash01-CjLF47KG.js} +1 -1
- package/dist/client/assets/{TrendUp01-cPdEBjok.js → TrendUp01-B3nbKtR5.js} +1 -1
- package/dist/client/assets/{Upload01-HoFghnaA.js → Upload01-C74iA_2l.js} +1 -1
- package/dist/client/assets/{User01-CU43n4aC.js → User01-gol1gjVG.js} +1 -1
- package/dist/client/assets/{Users01-BfmGwOWr.js → Users01-ConkK5Hy.js} +1 -1
- package/dist/client/assets/{Users03-BrSAA7CP.js → Users03-C0TiA5ig.js} +1 -1
- package/dist/client/assets/{X-BW2EYO4B.js → X-D-SXXNOh.js} +1 -1
- package/dist/client/assets/{XCircle-Mv4us9Z1.js → XCircle-Bdipnf78.js} +1 -1
- package/dist/client/assets/{XClose-DCuiifka.js → XClose-BXyOmw6P.js} +1 -1
- package/dist/client/assets/{Zap-fP1c7xXe.js → Zap-DJXvF0rz.js} +1 -1
- package/dist/client/assets/{ZapSquare-DYA2y0UF.js → ZapSquare-DRAXQQVP.js} +1 -1
- package/dist/client/assets/{access-gate-BOsNScRg.js → access-gate-BKMOmBMY.js} +1 -1
- package/dist/client/assets/{add-section-modal-_WTg53uR.js → add-section-modal-B75sXBI5.js} +1 -1
- package/dist/client/assets/{agent-icon-Dx4NCRpv.js → agent-icon-bqP8cd4A.js} +1 -1
- package/dist/client/assets/{agents-list-B6Umsglt.js → agents-list-JTNfRO7b.js} +1 -1
- package/dist/client/assets/ai-providers-DB4edqOH.js +1 -0
- package/dist/client/assets/{alert-dialog-C9XbRCXw.js → alert-dialog-fWZE2eoL.js} +3 -3
- package/dist/client/assets/{alert-NAuelKid.js → alert-kXNc1jQs.js} +1 -1
- package/dist/client/assets/{app-editor-9ydsOs0i.js → app-editor-BJoZeDYw.js} +1 -1
- package/dist/client/assets/{auth-B6HaqNKN.js → auth-B6-JmtGV.js} +1 -1
- package/dist/client/assets/{auth-catchall-CgRGtxCe.js → auth-catchall-cHl02pOC.js} +1 -1
- package/dist/client/assets/{auth-entry-iN06W9mE.js → auth-entry-BkcVdNXd.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CbLuIloM.js → auth-split-layout-ozU7OFFM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B4pAf04F.js → authenticate-and-persist-oauth-BBAoTw-S.js} +1 -1
- package/dist/client/assets/{automation-list-row-BRUbqICU.js → automation-list-row-BkrA0C81.js} +1 -1
- package/dist/client/assets/{automation-runs-BJxujaRz.js → automation-runs-1f49gKdv.js} +1 -1
- package/dist/client/assets/{automations-DM2CfSl8.js → automations-CuujfvxS.js} +1 -1
- package/dist/client/assets/{avatar-D9ru8t7J.js → avatar-CG1sYMC3.js} +1 -1
- package/dist/client/assets/{badge-DuDSo4B5.js → badge-DTv3ytkG.js} +1 -1
- package/dist/client/assets/{block-document-Bj42QOMt.js → block-document-pKW_gNRc.js} +1 -1
- package/dist/client/assets/{brand-context-BUhPcaYQ.js → brand-context-CSdoqkrl.js} +1 -1
- package/dist/client/assets/{buckets-bVh7oMEv.js → buckets-9vcDP1Xx.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-88hyriYd.js → bulk-category-panel-Z8lz1ptZ.js} +1 -1
- package/dist/client/assets/{calendar-CyEY0jbs.js → calendar-CSYSRHan.js} +1 -1
- package/dist/client/assets/{capability-load-error-D5Gggd0Y.js → capability-load-error-CI7JffNO.js} +1 -1
- package/dist/client/assets/{card-F2SMEUTI.js → card-Djqe431m.js} +1 -1
- package/dist/client/assets/{category-editor-DW9xGXQm.js → category-editor-BOkZGzvy.js} +1 -1
- package/dist/client/assets/{chat-context-BPHBf2SD.js → chat-context-B9IMqX9H.js} +4 -4
- package/dist/client/assets/{checkbox-ttemAxHh.js → checkbox-g1Xe-Fh0.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CqGPeKLM.js → cli-auth-success-71pX1cOc.js} +1 -1
- package/dist/client/assets/{collection-detail-Dfuq9bfs.js → collection-detail-DSTfsDtj.js} +1 -1
- package/dist/client/assets/{collection-display-button-BRJWc_xO.js → collection-display-button-DqckpPka.js} +1 -1
- package/dist/client/assets/{collection-search-C_lEkJSM.js → collection-search-D8p930-2.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CzY9tIKJ.js → collection-table-wrapper-C4pkDKfG.js} +1 -1
- package/dist/client/assets/{collection-tabs-DKMXuAh7.js → collection-tabs-Btbvy5wZ.js} +1 -1
- package/dist/client/assets/{command-BaN3HpzD.js → command-D8VZgYcp.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-Cbx7Kx6o.js → commerce-onboarding-B_-r2hWt.js} +1 -1
- package/dist/client/assets/{companions-core-DBvnypYt.js → companions-core-C6pGrBaV.js} +1 -1
- package/dist/client/assets/{connect-CsGthfpX.js → connect-Dggz_rgK.js} +1 -1
- package/dist/client/assets/{connection-D4s1OcN3.js → connection-Bm6D5T7s.js} +1 -1
- package/dist/client/assets/{connection-card-ClxMiq53.js → connection-card-DaylHwd8.js} +1 -1
- package/dist/client/assets/{connection-detail-CD343aW8.js → connection-detail-pp291ZsI.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BL_ujE81.js → connection-form-helpers-abaaeWRW.js} +1 -1
- package/dist/client/assets/{connections-CUCSFMwK.js → connections-C-3JQ-RT.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DvMExQy8.js → decopilot-sse-pool-DJTs5v3B.js} +1 -1
- package/dist/client/assets/{dialog-1l6V_AO-.js → dialog-BNEf4h73.js} +1 -1
- package/dist/client/assets/{domain-settings-DNGGLfRt.js → domain-settings-BQw1ZHpG.js} +1 -1
- package/dist/client/assets/{drawer-D_dlIrgq.js → drawer-BOicXoW4.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BSq_T2rN.js → dropdown-menu-B0OSBqF5.js} +1 -1
- package/dist/client/assets/{empty-state-DbpV7XVc.js → empty-state-Jijm8Zjj.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DsmAsG2q.js → extract-connection-data-ByQ1VQpk.js} +1 -1
- package/dist/client/assets/{file-explorer-qDmxYOXW.js → file-explorer-CheIIdH4.js} +2 -2
- package/dist/client/assets/{form-BBhau0Q4.js → form-BoZJqj_8.js} +1 -1
- package/dist/client/assets/{general-DEP7lOkZ.js → general-CtysXkWo.js} +1 -1
- package/dist/client/assets/github-repo-picker-CCSv048C.js +1 -0
- package/dist/client/assets/{hooks-D1TjgNd-.js → hooks-Bl53PFCW.js} +5 -5
- package/dist/client/assets/{index-CiqXq-Gv.js → index-7i5MzulY.js} +1 -1
- package/dist/client/assets/index-BAn2tA3m.js +1 -0
- package/dist/client/assets/{index-C_7kU-Qk.js → index-BB4oQ8m2.js} +1 -1
- package/dist/client/assets/{index-B1Tuj6zE.js → index-BdV3mKMQ.js} +1 -1
- package/dist/client/assets/{index-D8Oyc-Sj.js → index-CzdD7w68.js} +1 -1
- package/dist/client/assets/{index-LnErdRrl.js → index-D7iPCSni.js} +13 -13
- package/dist/client/assets/{index-B1INhWoo.js → index-DBW7-LLJ.js} +6 -6
- package/dist/client/assets/{index-Bg79Fd9u.js → index-DFVpce2g.js} +5 -5
- package/dist/client/assets/{index-CtHwx2FP.js → index-DS1dPTBr.js} +1 -1
- package/dist/client/assets/{index-B09P05BF.js → index-DW8FWTYY.js} +1 -1
- package/dist/client/assets/index-EC0JTBd4.js +1 -0
- package/dist/client/assets/{index-redirect-CSLJ76k2.js → index-redirect-idcaLUlq.js} +1 -1
- package/dist/client/assets/{input-DkjdpI9N.js → input-DM14QBHx.js} +1 -1
- package/dist/client/assets/{integration-icon-eRBxSPRX.js → integration-icon-BjR4OGAx.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DW8BgMeK.js → invite-member-dialog-D9LT_tFK.js} +1 -1
- package/dist/client/assets/{label-BxyuqrG3.js → label-BEcprhix.js} +1 -1
- package/dist/client/assets/{layout-Cu8cokWN.js → layout-DluG1Vni.js} +1 -1
- package/dist/client/assets/{login-cHpOzdtv.js → login-BUNmGthz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BWVH0_CJ.js → mcp-oauth-ws9m29vQ.js} +1 -1
- package/dist/client/assets/{members-CywL8X1G.js → members-B2rGjbVl.js} +1 -1
- package/dist/client/assets/{monaco-editor-Mtdo8aZY.js → monaco-editor-DJSyif3I.js} +4 -4
- package/dist/client/assets/{monitoring-stats-row-je0A9zFO.js → monitoring-stats-row-B5xpjD5z.js} +3 -3
- package/dist/client/assets/{multi-select-Cna0azbN.js → multi-select-DX4wKmiL.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bz_8J_A5.js → oauth-callback-ai-provider-DYANs1ON.js} +1 -1
- package/dist/client/assets/{oauth-callback-DTQkysno.js → oauth-callback-qhM58XQs.js} +1 -1
- package/dist/client/assets/{onboarding-CjSfkbXS.js → onboarding-WshxsJzF.js} +1 -1
- package/dist/client/assets/{org-layout-BjpSi748.js → org-layout-CvfJlqf0.js} +1 -1
- package/dist/client/assets/{organization-choice-NAhiEtg0.js → organization-choice-CsgXcMIz.js} +1 -1
- package/dist/client/assets/{orgs-CrVyQZvg.js → orgs-CGCwj0aX.js} +1 -1
- package/dist/client/assets/{page-seo-form-vyR-JMew.js → page-seo-form-BUmIrCHq.js} +1 -1
- package/dist/client/assets/{popover-PONP-IrS.js → popover-13d1_Ydy.js} +1 -1
- package/dist/client/assets/{post-editor-DAuwYe2r.js → post-editor-CW3QV3HH.js} +1 -1
- package/dist/client/assets/{primitives-D8K2Kshy.js → primitives-CWnjtxmC.js} +1 -1
- package/dist/client/assets/{profile-YApiO9LU.js → profile-D-gvwVRu.js} +1 -1
- package/dist/client/assets/project-app-view-CWjCgPJM.js +1 -0
- package/dist/client/assets/record-editor-Bhe663KT.js +1 -0
- package/dist/client/assets/{redirect-editor-BTed9W7Z.js → redirect-editor-BQgkHo14.js} +1 -1
- package/dist/client/assets/registry-Dp0LTgEx.js +2 -0
- package/dist/client/assets/{registry-layout-xuewIiFA.js → registry-layout-10se5s7s.js} +1 -1
- package/dist/client/assets/{reports-CNXGX--9.js → reports-B0dg8-1T.js} +1 -1
- package/dist/client/assets/{require-capability-RQbEgO2R.js → require-capability-94N1MpBW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cp2xOp41.js → required-auth-layout-DTRJEXT6.js} +1 -1
- package/dist/client/assets/{reset-password-DTmQ8ZLF.js → reset-password-DTqfLCFl.js} +1 -1
- package/dist/client/assets/{roles-DteJLIyV.js → roles-DMaB4I0B.js} +1 -1
- package/dist/client/assets/{search-input-l0QwIQw1.js → search-input-Cav-R6u1.js} +1 -1
- package/dist/client/assets/{secrets-4vWsgQBd.js → secrets-CmQA_lCO.js} +1 -1
- package/dist/client/assets/{sections-editor-C_KhTOCu.js → sections-editor-B1CYJQwI.js} +1 -1
- package/dist/client/assets/{select-model-CUI7TW7J.js → select-model-z0c2dMz_.js} +2 -2
- package/dist/client/assets/{select-CzAV5CH5.js → select-p5o_Bt0F.js} +1 -1
- package/dist/client/assets/self-tool-result-Cgb76l_D.js +1 -0
- package/dist/client/assets/{seo-editor-Dd2fVK23.js → seo-editor-DTdLrmHB.js} +1 -1
- package/dist/client/assets/{settings-layout-DQBiJK3p.js → settings-layout-BnrJScNO.js} +1 -1
- package/dist/client/assets/{settings-section-CoPqg6gm.js → settings-section-CZTjnxlV.js} +1 -1
- package/dist/client/assets/{shell-controls-DZPzbjgh.js → shell-controls-XiJZc3ao.js} +1 -1
- package/dist/client/assets/{shell-layout-BWjH-Sfe.js → shell-layout-CvSnv4Ng.js} +1 -1
- package/dist/client/assets/{sidebar-DD3SRmGs.js → sidebar-BBmlF4Le.js} +1 -1
- package/dist/client/assets/{skeleton-ZVeLusnT.js → skeleton-D5maqyjg.js} +1 -1
- package/dist/client/assets/{spinner-CeQixqey.js → spinner-D09NsuWH.js} +1 -1
- package/dist/client/assets/{sso-ioZ6VXWU.js → sso-DqK4eFK8.js} +1 -1
- package/dist/client/assets/{store-DsMfvWEf.js → store-DRo6GtOx.js} +1 -1
- package/dist/client/assets/store-registry-BfDOrY5J.js +2 -0
- package/dist/client/assets/{studio-tools-QMuOj6-u.js → studio-tools-eC6fCmF6.js} +1 -1
- package/dist/client/assets/{switch-DvFygQiJ.js → switch-DJGvmJgh.js} +1 -1
- package/dist/client/assets/{tab-id-8wArXECU.js → tab-id-ts2R-IK7.js} +1 -1
- package/dist/client/assets/{table-TbcMVTO8.js → table-CUPzY57H.js} +1 -1
- package/dist/client/assets/{tabs-CFfkTu0X.js → tabs-BezZc3NY.js} +1 -1
- package/dist/client/assets/{textarea-DkC87OzG.js → textarea-DHTTJLnr.js} +1 -1
- package/dist/client/assets/{toggle-group-CTKp_-5Y.js → toggle-group-CqJpxcmh.js} +1 -1
- package/dist/client/assets/{toolbar-xTOW3jV5.js → toolbar-8XCdJRqW.js} +1 -1
- package/dist/client/assets/{tooltip-DvQ0XsJD.js → tooltip-fkTa7gIG.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CXx6vxgf.js → use-ai-providers-wy-pIlnl.js} +1 -1
- package/dist/client/assets/{use-automations-CIRY26Sm.js → use-automations-BebUXKcQ.js} +1 -1
- package/dist/client/assets/{use-autosave-BFchLnE-.js → use-autosave-CUZ4cIic.js} +1 -1
- package/dist/client/assets/{use-capability-CbsdK6kc.js → use-capability-D9H3t7HP.js} +1 -1
- package/dist/client/assets/{use-clock-tick-yxMgruH1.js → use-clock-tick-Cso4aNFM.js} +1 -1
- package/dist/client/assets/{use-connection-Crt7Wnf6.js → use-connection-DJ0b1gTC.js} +1 -1
- package/dist/client/assets/{use-copy-D8LT9wzj.js → use-copy-BNgRyC_N.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CYPHz2tM.js → use-create-virtual-mcp-pKJoeitk.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Bk4kxnd7.js → use-debounced-autosave-B-9KRifB.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C7ql9pQ9.js → use-debounced-value-DrbFDRJg.js} +1 -1
- package/dist/client/assets/{use-deco-credits-D09kZAP8.js → use-deco-credits-DmpIUFXQ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C_3NeXEi.js → use-decopilot-events-CPtuygfk.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C37Wf7oV.js → use-delete-connection-Ca978irp.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-s6rTcF1z.js → use-deployment-admin-DG7sPT_s.js} +1 -1
- package/dist/client/assets/{use-file-configs-d0gxFXga.js → use-file-configs-BSbmDdF6.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-GIf_V4mg.js → use-infinite-scroll-BLH47khU.js} +1 -1
- package/dist/client/assets/{use-join-requests-CTSz7464.js → use-join-requests-BFZJlmrE.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BXPNVCkT.js → use-mcp-auth-status-DtWK2vVN.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cpe5VVFd.js → use-mcp-client-YC9HMu6y.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-vrGNFP62.js → use-mcp-tools-81zsgjbk.js} +1 -1
- package/dist/client/assets/{use-members-Di-wqSFo.js → use-members-BOo6SBZf.js} +1 -1
- package/dist/client/assets/{use-mobile-BDpXfOGb.js → use-mobile-DaXh9iB4.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-xBQA-nI3.js → use-navigate-to-agent-CwseQD-z.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-xlorPrK7.js → use-org-auth-client-B_HThHi-.js} +1 -1
- package/dist/client/assets/{use-org-sso-BP9JFiDp.js → use-org-sso-vq0R-8A9.js} +1 -1
- package/dist/client/assets/{use-organization-roles-LBstF68U.js → use-organization-roles-C1XBXdGf.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BxnffxCo.js → use-organization-settings-Bi013MJn.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CMbVPAo5.js → use-registry-connections-DHHAMc5J.js} +1 -1
- package/dist/client/assets/{use-secrets-BvEnn7fN.js → use-secrets-BCwf7s42.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cuh2VhxF.js → use-status-sounds-B4bZcx6E.js} +1 -1
- package/dist/client/assets/{use-tags-Ro4HIuso.js → use-tags-CxtVjJTC.js} +1 -1
- package/dist/client/assets/{use-view-mode-BPzd0kmg.js → use-view-mode-2rHbtOa0.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CRbRiAY-.js → use-virtual-mcp-Czn5fHtD.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-yZBiNKu9.js +1 -0
- package/dist/client/assets/{useQueries-D1qVck3-.js → useQueries-BIMkg7rJ.js} +1 -1
- package/dist/client/assets/{useRouterState-BK4V-Kyf.js → useRouterState-CQeHJLAo.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CdZRM8uM.js +1 -0
- package/dist/client/assets/{users-DG9dviv7.js → users-CbQWIH4c.js} +1 -1
- package/dist/client/assets/{variant-calendar-B31vNriY.js → variant-calendar-CVBnB48e.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Ckvgwera.js → view-mode-toggle-CZXwONMQ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +158 -158
- package/dist/server/server.js +123 -123
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-B61Bdd0p.js +0 -1
- package/dist/client/assets/github-repo-picker-DZFkRYw0.js +0 -1
- package/dist/client/assets/index-D0yzSc_G.js +0 -1
- package/dist/client/assets/index-SpY-wt3w.js +0 -1
- package/dist/client/assets/project-app-view-ZWIwvBP5.js +0 -1
- package/dist/client/assets/record-editor-CzQMCL3u.js +0 -1
- package/dist/client/assets/registry-PrAxBk77.js +0 -2
- package/dist/client/assets/self-tool-result-CFJjEh0u.js +0 -1
- package/dist/client/assets/store-registry-eAQ_7jJi.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C-RqwYQP.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QRgmbC8e.js +0 -1
package/dist/client/assets/{automation-list-row-BRUbqICU.js → automation-list-row-BkrA0C81.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-
|
|
1
|
+
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-DBW7-LLJ.js";import{A as Y,a as Z,b as ee,c as te,d as se,e as ie,f as ne,g as oe}from"./alert-dialog-fWZE2eoL.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-B0OSBqF5.js";import{s as me}from"./Stars02-Cx4R-W4T.js";import{a as ue}from"./DotsVertical-DD9vI7XN.js";import{s as de}from"./Trash01-CjLF47KG.js";import{i as fe}from"./Zap-DJXvF0rz.js";import{u as ge}from"./use-virtual-mcp-Czn5fHtD.js";import{A as xe}from"./agent-icon-bqP8cd4A.js";import{u as pe}from"./use-automations-BebUXKcQ.js";function ke(c){const e=G.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,O]=U.useState(!1),r=ge(a?s.virtual_mcp_id:void 0);let S;e[0]!==s.id||e[1]!==o?(S=()=>{o.mutate(s.id),O(!1)},e[0]=s.id,e[1]=o,e[2]=S):S=e[2];const I=S;let E;e[3]!==n?(E=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=E):E=e[4];const H=E,V=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==V?(u=W("inline-block size-2 rounded-full shrink-0",V),e[5]=V,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(ue,{size:16})})}),e[32]=F):F=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),O(!0)},B=t.jsx(de,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(re,{children:[F,t.jsx(le,{align:"end",children:t.jsxs(ce,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let b;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(b=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=b):b=e[45];let A;e[46]!==i?(A=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=A):A=e[47];let D;e[48]!==A?(D=t.jsx(Y,{children:A}),e[48]=A,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(Z,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ee,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(te,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==I||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(se,{onClick:I,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=I,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(ie,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(ne,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let M;e[74]!==l||e[75]!==z?(M=t.jsx(oe,{open:l,onOpenChange:O,children:z}),e[74]=l,e[75]=z,e[76]=M):M=e[76];let K;return e[77]!==b||e[78]!==M?(K=t.jsxs(t.Fragment,{children:[b,M]}),e[77]=b,e[78]=M,e[79]=K):K=e[79],K}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=G.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(me,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ke as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as R,c as L,b as V,Z as Rn,j as n,B as Ce,Y as ss,X as Pn,_ as An,m as K,p as En,aA as Ln,ax as we,aE as Mn,aD as Se,bL as Be,aB as Pe,bM as xs,az as hs,F as je,o as Dn,e as Fn,K as pe,t as ft,n as Ue,d as Me,E as gs,av as bs,bN as kt,aC as zn,bO as _e}from"./index-B1INhWoo.js";import{e as On}from"./select-CzAV5CH5.js";import{u as ys}from"./useInfiniteQuery-C-RqwYQP.js";import{a as js,u as Bn}from"./use-connection-Crt7Wnf6.js";import{k as Un,u as Tt,f as Hn,i as Wn,a as Vn,S as qn}from"./use-mcp-client-Cpe5VVFd.js";import{a as Gn}from"./use-virtual-mcp-CRbRiAY-.js";import{C as Xn}from"./card-F2SMEUTI.js";import{o as vs,m as Ss,p as _t,q as Ct}from"./sidebar-DD3SRmGs.js";import{c as Ns,e as ws,a as Qe,d as fe,b as ks,T as me}from"./table-TbcMVTO8.js";import{E as mt}from"./empty-state-DbpV7XVc.js";import{u as It}from"./use-infinite-scroll-GIf_V4mg.js";import{u as Yn}from"./use-members-Di-wqSFo.js";import{u as Ts,S as Ee}from"./use-clock-tick-yxMgruH1.js";import{e as Kn}from"./use-automations-CIRY26Sm.js";import{u as _s}from"./studio-tools-QMuOj6-u.js";import{u as Jn}from"./useSuspenseInfiniteQuery-QRgmbC8e.js";import{A as Cs}from"./avatar-D9ru8t7J.js";import{t as Ge}from"./ChevronDown-QYK7Lenl.js";import{n as pt}from"./ChevronUp-BMvYccDe.js";import{n as Is,t as Qn,c as $s,i as Zn,a as $t}from"./Tool02-C8_nzaSV.js";import{h as el,aN as tl,aO as sl,a6 as nl,E as ll,aP as ol,ad as rl,i as ns,at as al,C as il,m as cl,aQ as ul,aL as Rs,aR as dl,A as Ps,aS as be,aT as fl,n as ml}from"./agent-icon-Dx4NCRpv.js";import{t as Ze}from"./Stars01-CbClslIT.js";import{i as As,b as He}from"./XCircle-Mv4us9Z1.js";import{i as Rt}from"./Check-lBHxT1HX.js";import{i as ls}from"./ChevronRight-CWURfvDb.js";import{a as Es}from"./Copy01-CAqSjpf_.js";import{b as Ne,t as Pt,c as os}from"./format-time-BnbuEtat.js";import{u as Ls}from"./use-copy-D8LT9wzj.js";import{T as Ie,a as $e,c as Re}from"./tooltip-DvQ0XsJD.js";import{j as At,I as pl,R as xl,J as hl,t as gl,U as he,V as Ms,W as De,c as bl,u as yl,M as jl,e as vl,f as Sl}from"./calendar-CyEY0jbs.js";import{d as Nl,c as wl,r as kl,e as Tl}from"./hooks-D1TjgNd-.js";import{j as Fe,F as _l,k as Et,b as Ds,a as Cl}from"./chat-context-BPHBf2SD.js";import{c as Il}from"./monaco-editor-Mtdo8aZY.js";import{g as Fs,M as $l}from"./index-CtHwx2FP.js";import{f as Rl,o as Pl,q as Al}from"./tab-id-8wArXECU.js";import{i as zs}from"./AlertCircle-DH3qtgBe.js";import{s as El}from"./Eye-Dw90cLwR.js";import{s as Xe,t as Os}from"./Star01-WZXTBc9P.js";import{s as Ll}from"./XClose-DCuiifka.js";import{n as xt}from"./ZapSquare-DYA2y0UF.js";import{d as Ml,c as Dl,a as We}from"./Tool01-BgrN_XhB.js";import{i as ze}from"./Monitor01-Ba7OYhMO.js";import{i as Fl}from"./SearchMd-Swr0KhLg.js";import{i as zl}from"./Upload01-HoFghnaA.js";import{u as Ol,a as Bl}from"./shell-layout-BWjH-Sfe.js";import{n as Bs}from"./LinkExternal01-DltqAIeP.js";import{I as ke}from"./integration-icon-eRBxSPRX.js";import{i as Ul}from"./ArrowUpRight-Cc2KMNxL.js";import{a as Lt}from"./Users03-BrSAA7CP.js";import{a as ye}from"./Palette-CwJTW0Hm.js";import{c as Us}from"./use-navigate-to-agent-xBQA-nI3.js";import{a as Hl}from"./Stars02-D3Ts30Xu.js";import{g as Wl}from"./AreaChart-CUxSq8CM.js";import{b as Vl,a as ql,c as Gl,d as Xl,e as Yl}from"./dialog-1l6V_AO-.js";import{a as Kl,F as Jl,b as Ql,c as Zl,d as eo,e as to}from"./form-BBhau0Q4.js";import{I as so}from"./input-DkjdpI9N.js";import{S as no}from"./spinner-CeQixqey.js";const lo={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Hs(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(lo)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function Ws(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Vs(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+Hs(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function Bc(s){return s.reduce((e,t)=>Vs(e,t.metadata?.usage),Ws())}const oo={damping:.7,stiffness:.05,mass:1.25},ro=70,ao=1e3/60,io=350;let et=!1;globalThis.document?.addEventListener("mousedown",()=>{et=!0});globalThis.document?.addEventListener("mouseup",()=>{et=!1});globalThis.document?.addEventListener("click",()=>{et=!1});const co=(s={})=>{const[e,t]=R.useState(!1),[l,o]=R.useState(s.initial!==!1),[a,r]=R.useState(!1),c=R.useRef(null);c.current=s;const i=R.useCallback(()=>{if(!et)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const v=b.getRangeAt(0);return v.commonAncestorContainer.contains(g.current)||g.current?.contains(v.commonAncestorContainer)},[]),u=R.useCallback(b=>{f.isAtBottom=b,o(b)},[]),m=R.useCallback(b=>{f.escapedFromLock=b,t(b)},[]),f=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(v){if(g.current){const{scrollBehavior:j}=getComputedStyle(g.current);j!=="auto"&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=v,f.ignoreScrollToTop=g.current.scrollTop,j!=="auto"&&(g.current.style.scrollBehavior=j)}},get targetScrollTop(){return!g.current||!y.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!y.current)return 0;const{targetScrollTop:v}=this;if(!s.targetScrollTop)return v;if(b?.targetScrollTop===v)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(v,{scrollElement:g.current,contentElement:y.current}),v),0);return b={targetScrollTop:v,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ro}}},[]),d=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||u(!0);const v=Date.now()+(Number(b.wait)||0),j=it(c.current,b.animation),{ignoreEscapes:T=!1}=b;let S,N=f.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=v+(b.duration??0);const w=async()=>{const k=new Promise(requestAnimationFrame).then(()=>{if(!f.isAtBottom)return f.animation=void 0,!1;const{scrollTop:_}=f,C=performance.now(),I=(C-(f.lastTick??C))/ao;if(f.animation||(f.animation={behavior:j,promise:k,ignoreEscapes:T}),f.animation.behavior===j&&(f.lastTick=C),i()||v>Date.now())return w();if(_<Math.min(N,f.calculatedTargetScrollTop)){if(f.animation?.behavior===j){if(j==="instant")return f.scrollTop=f.calculatedTargetScrollTop,w();f.velocity=(j.damping*f.velocity+j.stiffness*f.scrollDifference)/j.mass,f.accumulated+=f.velocity*I,f.scrollTop+=f.accumulated,f.scrollTop!==_&&(f.accumulated=0)}return w()}return S>Date.now()?(N=f.calculatedTargetScrollTop,w()):(f.animation=void 0,f.scrollTop<f.calculatedTargetScrollTop?d({animation:it(c.current,c.current.resize),ignoreEscapes:T,duration:Math.max(0,S-Date.now())||void 0}):f.isAtBottom)});return k.then(_=>(requestAnimationFrame(()=>{f.animation||(f.lastTick=void 0,f.velocity=0)}),_))};return b.wait!==!0&&(f.animation=void 0),f.animation?.behavior===j?f.animation.promise:w()},[u,i,f]),p=R.useCallback(()=>{m(!0),u(!1)},[m,u]),x=R.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:v,ignoreScrollToTop:j}=f;let{lastScrollTop:T=v}=f;f.lastScrollTop=v,f.ignoreScrollToTop=void 0,j&&j>v&&(T=j),r(f.isNearBottom),setTimeout(()=>{if(f.resizeDifference||v===j)return;if(i()){m(!0),u(!1);return}const S=v>T,N=v<T;if(f.animation?.ignoreEscapes){f.scrollTop=T;return}N&&(m(!0),u(!1)),S&&m(!1),!f.escapedFromLock&&f.isNearBottom&&u(!0)},1)},[m,u,i,f]),h=R.useCallback(({target:b,deltaY:v})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===g.current&&v<0&&g.current.scrollHeight>g.current.clientHeight&&!f.animation?.ignoreEscapes&&(m(!0),u(!1))},[m,u,f]),g=rs(b=>{g.current?.removeEventListener("scroll",x),g.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",x,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),y=rs(b=>{if(f.resizeObserver?.disconnect(),f.resizeObserver=void 0,!b)return;let v;f.resizeObserver=new ResizeObserver(([j])=>{const{height:T}=j.contentRect,S=T-(v??T);if(f.resizeDifference=S,f.scrollTop>f.targetScrollTop&&(f.scrollTop=f.targetScrollTop),r(f.isNearBottom),S>=0){const N=it(c.current,v?c.current.resize:c.current.initial);d({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:io})}else f.isNearBottom&&(m(!1),u(!0));v=T,requestAnimationFrame(()=>{setTimeout(()=>{f.resizeDifference===S&&(f.resizeDifference=0)},1)})}),f.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:g,scrollToBottom:d,stopScroll:p,isAtBottom:l||a,isNearBottom:a,escapedFromLock:e,state:f}};function rs(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const at=new Map;function it(...s){const e={...oo};let t=!1;for(const o of s){if(o==="instant"){t=!0;continue}typeof o=="object"&&(t=!1,e.damping=o.damping??e.damping,e.stiffness=o.stiffness??e.stiffness,e.mass=o.mass??e.mass)}const l=JSON.stringify(e);return at.has(l)||at.set(l,Object.freeze(e)),t?"instant":at.get(l)}function uo(s){let e=2166136261;for(let t=0;t<s.length;t++)e=Math.imul(e^s.charCodeAt(t),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function Mt(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Dt(s,e){if(!e)return s;const t=`${uo(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function fo(s,e){return Dt(s,e).replace(/[_-]/g," ").toLowerCase()}function mo(s,e){const t={};for(const l of s?.arguments??[])t[l.name]=l.required?ss().min(1,e):ss();return Pn(t)}function po(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function xo(s){const e=L.c(74),{prompt:t,setPrompt:l,onSubmit:o,defaultValues:a}=s,r=R.useId(),c=V();let i,u;if(e[0]!==t||e[1]!==c){const D=mo(t,c("chat.dialogPromptArguments.required"));u=An,i=Rn(D),e[0]=t,e[1]=c,e[2]=i,e[3]=u}else i=e[2],u=e[3];let m;e[4]!==a||e[5]!==t?(m=t?po(t,a):{},e[4]=a,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f={resolver:i,defaultValues:m,mode:"onChange"},e[7]=i,e[8]=m,e[9]=f):f=e[9];const d=u(f);let p;e[10]!==t?.arguments?(p=t?.arguments??[],e[10]=t?.arguments,e[11]=p):p=e[11];const x=p;let h;e[12]!==d||e[13]!==o||e[14]!==l?(h=async D=>{await o(D),l(null),d.reset()},e[12]=d,e[13]=o,e[14]=l,e[15]=h):h=e[15];const g=h;let y;e[16]!==d||e[17]!==l?(y=D=>{D||(d.reset(),l(null))},e[16]=d,e[17]=l,e[18]=y):y=e[18];const b=y;if(!t)return null;let v;e[19]!==t._meta||e[20]!==t.name||e[21]!==t.title?(v=t.title||fo(t.name,Mt(t._meta)),e[19]=t._meta,e[20]=t.name,e[21]=t.title,e[22]=v):v=e[22];let j;e[23]!==v?(j=n.jsx(Vl,{children:n.jsx("span",{className:"capitalize",children:v})}),e[23]=v,e[24]=j):j=e[24];let T;e[25]!==t.description?(T=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[25]=t.description,e[26]=T):T=e[26];let S;e[27]!==T||e[28]!==j?(S=n.jsxs(ql,{children:[j,T]}),e[27]=T,e[28]=j,e[29]=S):S=e[29];let N;e[30]!==d||e[31]!==g?(N=D=>{D.stopPropagation(),d.handleSubmit(g)(D)},e[30]=d,e[31]=g,e[32]=N):N=e[32];let w;if(e[33]!==x||e[34]!==d.control||e[35]!==d.formState.isSubmitting||e[36]!==c){let D;e[38]!==d.control||e[39]!==d.formState.isSubmitting||e[40]!==c?(D=O=>n.jsx(Jl,{control:d.control,name:O.name,render:B=>{const{field:U}=B;return n.jsxs(Ql,{children:[n.jsxs(Zl,{className:"text-xs",children:[O.name,O.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",c("chat.dialogPromptArguments.optional")]})]}),n.jsx(eo,{children:n.jsx(so,{...U,value:U.value??"",required:O.required,placeholder:O.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),n.jsx(to,{})]})}},O.name),e[38]=d.control,e[39]=d.formState.isSubmitting,e[40]=c,e[41]=D):D=e[41],w=x.map(D),e[33]=x,e[34]=d.control,e[35]=d.formState.isSubmitting,e[36]=c,e[37]=w}else w=e[37];let k;e[42]!==b?(k=()=>b(!1),e[42]=b,e[43]=k):k=e[43];const _=d.formState.isSubmitting;let C;e[44]!==c?(C=c("chat.dialogPromptArguments.cancel"),e[44]=c,e[45]=C):C=e[45];let I;e[46]!==d.formState.isSubmitting||e[47]!==k||e[48]!==C?(I=n.jsx(Ce,{type:"button",variant:"ghost",onClick:k,disabled:_,children:C}),e[46]=d.formState.isSubmitting,e[47]=k,e[48]=C,e[49]=I):I=e[49];let E;e[50]!==d.formState.isSubmitting||e[51]!==c?(E=d.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(no,{size:"xs"}),c("chat.dialogPromptArguments.loading")]}):c("chat.dialogPromptArguments.usePrompt"),e[50]=d.formState.isSubmitting,e[51]=c,e[52]=E):E=e[52];let P;e[53]!==d.formState.isSubmitting||e[54]!==r||e[55]!==E?(P=n.jsx(Ce,{type:"submit",form:r,disabled:d.formState.isSubmitting,children:E}),e[53]=d.formState.isSubmitting,e[54]=r,e[55]=E,e[56]=P):P=e[56];let $;e[57]!==I||e[58]!==P?($=n.jsxs(Gl,{children:[I,P]}),e[57]=I,e[58]=P,e[59]=$):$=e[59];let A;e[60]!==r||e[61]!==N||e[62]!==w||e[63]!==$?(A=n.jsxs("form",{id:r,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[w,$]}),e[60]=r,e[61]=N,e[62]=w,e[63]=$,e[64]=A):A=e[64];let M;e[65]!==d||e[66]!==A?(M=n.jsx(Kl,{...d,children:A}),e[65]=d,e[66]=A,e[67]=M):M=e[67];let F;e[68]!==S||e[69]!==M?(F=n.jsxs(Xl,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,M]}),e[68]=S,e[69]=M,e[70]=F):F=e[70];let z;return e[71]!==b||e[72]!==F?(z=n.jsx(Yl,{open:!0,onOpenChange:b,children:F}),e[71]=b,e[72]=F,e[73]=z):z=e[73],z}const ho=/^mcp__[a-zA-Z0-9_-]+__/;function qs(s){return s.replace(ho,"")}function tt(s){const e=L.c(19),{id:t,part:l,copyable:o,extraActions:a,alwaysShowActions:r,animate:c}=s,i=o===void 0?!1:o,u=r===void 0?!1:r,m=c===void 0?!1:c,{handleCopy:f}=Ls(),d=V(),[p,x]=R.useState(!1);let h;e[0]!==f||e[1]!==t||e[2]!==l.text?(h=async()=>{En("chat_message_copied",{message_id:t,chars:l.text.length}),await f(l.text),x(!0),setTimeout(()=>x(!1),2e3)},e[0]=f,e[1]=t,e[2]=l.text,e[3]=h):h=e[3];const g=h,y=i&&a,b=y||a;let v;e[4]!==m||e[5]!==t||e[6]!==l.text?(v=n.jsx(At,{id:t,text:l.text,animate:m}),e[4]=m,e[5]=t,e[6]=l.text,e[7]=v):v=e[7];let j;e[8]!==u||e[9]!==a||e[10]!==g||e[11]!==p||e[12]!==b||e[13]!==y||e[14]!==d?(j=b&&n.jsxs("div",{className:K("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",u?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,y&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),y&&n.jsx("button",{type:"button",onClick:g,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":d("chat.textPart.copyMessage"),children:p?n.jsx(Rt,{className:"size-4"}):n.jsx(Es,{className:"size-4"})})]}),e[8]=u,e[9]=a,e[10]=g,e[11]=p,e[12]=b,e[13]=y,e[14]=d,e[15]=j):j=e[15];let T;return e[16]!==v||e[17]!==j?(T=n.jsxs("div",{className:"group/part relative",children:[v,j]}),e[16]=v,e[17]=j,e[18]=T):T=e[18],T}function Uc(s,e,t){s.chain().focus().insertContentAt(e,[go(t),{type:"text",text:" "}]).run()}function go(s){return{type:"file",attrs:s}}function bo(s){const e=L.c(17),{node:t,selected:l,view:o}=s,{name:a,mimeType:r,data:c}=t.attrs,i=l&&o.editable;let u;e[0]!==r?(u=r.startsWith("image/"),e[0]=r,e[1]=u):u=e[1];const m=u,f=i&&"outline-2 outline-blue-300 outline-offset-0";let d;e[2]!==f?(d=K("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",f),e[2]=f,e[3]=d):d=e[3];let p;e[4]!==a?(p=n.jsx(Ie,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=p):p=e[5];let x;e[6]!==c||e[7]!==m||e[8]!==r||e[9]!==a?(x=n.jsx($e,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${r};base64,${c}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:r})]})}),e[6]=c,e[7]=m,e[8]=r,e[9]=a,e[10]=x):x=e[10];let h;e[11]!==p||e[12]!==x?(h=n.jsxs(Re,{children:[p,x]}),e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;return e[14]!==d||e[15]!==h?(g=n.jsx(hl,{className:d,children:h}),e[14]=d,e[15]=h,e[16]=g):g=e[16],g}const yo=pl.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return xl(bo)}}),Te=16,ht=2.5,gt=(Te-ht)/2,ct=2*Math.PI*gt;function Gs(s){const e=L.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:o,outputTokens:a,cost:r}=t;if(!l&&!o&&!a)return null;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(el,{size:12}),e[0]=c):c=e[0];let i;e[1]!==r||e[2]!==l?(i=r>0?`$${r.toFixed(4)}`:l.toLocaleString(),e[1]=r,e[2]=l,e[3]=i):i=e[3];let u;e[4]!==i?(u=n.jsx(Ie,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[c,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:i})]})}),e[4]=i,e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=f):f=e[7];let d;e[8]!==o?(d=o.toLocaleString(),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"text-right tabular-nums",children:d}),e[10]=d,e[11]=p):p=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const h=a-(t.reasoningTokens??0);let g;e[13]!==h?(g=h.toLocaleString(),e[13]=h,e[14]=g):g=e[14];let y;e[15]!==g?(y=n.jsx("span",{className:"text-right tabular-nums",children:g}),e[15]=g,e[16]=y):y=e[16];let b;e[17]!==o||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(b=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:o>0?`${(t.cacheReadTokens/o*100).toFixed(0)}%`:"0%"})]}),e[17]=o,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=b):b=e[20];let v;e[21]!==r?(v=r>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",r.toFixed(4)]})]}),e[21]=r,e[22]=v):v=e[22];let j;e[23]!==y||e[24]!==b||e[25]!==v||e[26]!==p?(j=n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[f,p,x,y,b,v]})]}),e[23]=y,e[24]=b,e[25]=v,e[26]=p,e[27]=j):j=e[27];let T;return e[28]!==j||e[29]!==u?(T=n.jsxs(Re,{children:[u,j]}),e[28]=j,e[29]=u,e[30]=T):T=e[30],T}function jo(s){const e=L.c(19),{usage:t,duration:l}=s,o=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,r=t!=null&&(t.totalTokens??0)>0;if(!o&&!a&&!r)return null;let c;e[0]!==l||e[1]!==o?(c=o?Ne(l/1e3):null,e[0]=l,e[1]=o,e[2]=c):c=e[2];const i=c;let u;e[3]!==l||e[4]!==i||e[5]!==t?(u=i&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:Ne(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=i,e[5]=t,e[6]=u):u=e[6];let m;e[7]!==a||e[8]!==o||e[9]!==r?(m=o&&(a||r)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=o,e[9]=r,e[10]=m):m=e[10];let f;e[11]!==a||e[12]!==r||e[13]!==t?(f=(a||r)&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=r,e[13]=t,e[14]=f):f=e[14];let d;return e[15]!==u||e[16]!==m||e[17]!==f?(d=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[u,m,f]}),e[15]=u,e[16]=m,e[17]=f,e[18]=d):d=e[18],d}function Hc(s){const e=L.c(51),{usage:t,totalTokens:l,contextWindow:o,onOpenContextPanel:a}=s,r=Math.min(l/o*100,100),c=ct-r/100*ct,i=t?.cost??0,u=t?.inputTokens??0,m=t?.outputTokens??0;let f;e[0]!==r?(f=r.toFixed(0),e[0]=r,e[1]=f):f=e[1];let d;e[2]!==i?(d=i>0?`, $${i.toFixed(2)}`:"",e[2]=i,e[3]=d):d=e[3];const p=`Context usage: ${f}%${d}`,x=a?"cursor-pointer":"cursor-default";let h;e[4]!==x?(h=K("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=h):h=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,className:"opacity-15"}),e[6]=g):g=e[6];const y=r>90?"text-destructive":r>70?"text-warning":"text-muted-foreground";let b;e[7]!==y?(b=K(y),e[7]=y,e[8]=b):b=e[8];let v;e[9]!==c||e[10]!==b?(v=n.jsxs("svg",{width:Te,height:Te,className:"-rotate-90",children:[g,n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,strokeDasharray:ct,strokeDashoffset:c,strokeLinecap:"round",className:b})]}),e[9]=c,e[10]=b,e[11]=v):v=e[11];let j;e[12]!==r?(j=r.toFixed(0),e[12]=r,e[13]=j):j=e[13];let T;e[14]!==i?(T=i>0?` · $${i.toFixed(2)}`:"",e[14]=i,e[15]=T):T=e[15];let S;e[16]!==j||e[17]!==T?(S=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[j,"%",T]}),e[16]=j,e[17]=T,e[18]=S):S=e[18];let N;e[19]!==a||e[20]!==S||e[21]!==p||e[22]!==h||e[23]!==v?(N=n.jsx(Ie,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":p,className:h,children:[v,S]})}),e[19]=a,e[20]=S,e[21]=p,e[22]=h,e[23]=v,e[24]=N):N=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=w):w=e[25];let k;e[26]!==l?(k=l.toLocaleString(),e[26]=l,e[27]=k):k=e[27];let _;e[28]!==o?(_=o.toLocaleString(),e[28]=o,e[29]=_):_=e[29];let C;e[30]!==r?(C=r.toFixed(1),e[30]=r,e[31]=C):C=e[31];let I;e[32]!==k||e[33]!==_||e[34]!==C?(I=n.jsxs("span",{className:"text-right tabular-nums",children:[k," / ",_," (",C,"%)"]}),e[32]=k,e[33]=_,e[34]=C,e[35]=I):I=e[35];let E;e[36]!==i||e[37]!==u||e[38]!==m?(E=i>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",i.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:u.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=i,e[37]=u,e[38]=m,e[39]=E):E=e[39];let P;e[40]!==u||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(P=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:u>0?`${((t?.cacheReadTokens??0)/u*100).toFixed(0)}%`:"0%"})]}),e[40]=u,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=P):P=e[43];let $;e[44]!==I||e[45]!==E||e[46]!==P?($=n.jsx($e,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[w,I,E,P]})}),e[44]=I,e[45]=E,e[46]=P,e[47]=$):$=e[47];let A;return e[48]!==N||e[49]!==$?(A=n.jsxs(Re,{children:[N,$]}),e[48]=N,e[49]=$,e[50]=A):A=e[50],A}var st="Collapsible",[vo,Wc]=hs(st),[So,Ft]=vo(st),Xs=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:a,onOpenChange:r,...c}=s,[i,u]=Ln({prop:l,defaultProp:o??!1,onChange:r,caller:st});return n.jsx(So,{scope:t,disabled:a,contentId:Mn(),open:i,onOpenToggle:R.useCallback(()=>u(m=>!m),[u]),children:n.jsx(we.div,{"data-state":Ut(i),"data-disabled":a?"":void 0,...c,ref:e})})});Xs.displayName=st;var Ys="CollapsibleTrigger",zt=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,...l}=s,o=Ft(Ys,t);return n.jsx(we.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ut(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:e,onClick:Se(s.onClick,o.onOpenToggle)})});zt.displayName=Ys;var Ot="CollapsibleContent",Bt=R.forwardRef((s,e)=>{const{forceMount:t,...l}=s,o=Ft(Ot,s.__scopeCollapsible);return n.jsx(Be,{present:t||o.open,children:({present:a})=>n.jsx(No,{...l,ref:e,present:a})})});Bt.displayName=Ot;var No=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,present:l,children:o,...a}=s,r=Ft(Ot,t),[c,i]=R.useState(l),u=R.useRef(null),m=Pe(e,u),f=R.useRef(0),d=f.current,p=R.useRef(0),x=p.current,h=r.open||c,g=R.useRef(h),y=R.useRef(void 0);return R.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),xs(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const v=b.getBoundingClientRect();f.current=v.height,p.current=v.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),i(l)}},[r.open,l]),n.jsx(we.div,{"data-state":Ut(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!h,...a,ref:m,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...s.style},children:h&&o})});function Ut(s){return s?"open":"closed"}var wo=Xs,Vc=zt,qc=Bt;function ko(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(wo,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function To(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(zt,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function _o(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(Bt,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function Y({icon:s,title:e,usage:t,summary:l,state:o,detail:a,detailVariant:r="code",forceOpen:c,variant:i="default",trailing:u,iconDestructive:m,alwaysChevron:f,defaultOpen:d,children:p}){const x=V(),[h,g]=R.useState(d??!1),{handleCopy:y,copied:b}=Ls(),v=o==="loading",j=o==="error",S=!!(a&&a.trim())||!!p,N=i==="subtask",w=(c??!1)||h,k=co({initial:v?"instant":!1}),_=n.jsxs(ko,{open:w,onOpenChange:c?void 0:g,className:"min-w-0",children:[n.jsxs(To,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",v&&"shimmer"),"aria-disabled":!S,children:[n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:f?n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(w?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",w?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")})})]})}),n.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):n.jsx("div",{className:"flex-1"}),u&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:u}),n.jsx(Gs,{usage:t})]}),S&&n.jsx(_o,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(r==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsx("div",{ref:k.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:n.jsx("p",{ref:k.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:a})})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsx("div",{ref:k.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:n.jsxs("div",{ref:k.contentRef,className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:a})}),n.jsx("button",{type:"button",onClick:()=>y(a),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":x("common.copy"),children:b?n.jsx(Rt,{className:"size-3.5"}):n.jsx(Es,{className:"size-3.5"})})]})})}))})]});return N?n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:_}):_}function ue(s){const e=L.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=Ne(t),e[0]=t,e[1]=l):l=e[1];let o;return e[2]!==l?(o=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=o):o=e[3],o}const Ks=4;function Js(s){const e=L.c(8),{count:t,noun:l,onClick:o}=s,a=V();let r;e[0]!==t||e[1]!==l||e[2]!==a?(r=a("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=a,e[3]=r):r=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(As,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=c):c=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsxs("button",{type:"button",onClick:o,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[r,c]}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function Qs(s){const e=L.c(12),{message:t,className:l}=s,o=t.created_at??t.metadata?.created_at??null;let a,r,c,i;if(e[0]!==l||e[1]!==o){i=Symbol.for("react.early_return_sentinel");e:{const m=Pt(o);if(m===null){i=null;break e}const f=new Date(m);a=f.toLocaleString(),e[6]!==l?(r=K("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=r):r=e[7],c=f.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=o,e[2]=a,e[3]=r,e[4]=c,e[5]=i}else a=e[2],r=e[3],c=e[4],i=e[5];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;return e[8]!==a||e[9]!==r||e[10]!==c?(u=n.jsx("span",{title:a,className:r,children:c}),e[8]=a,e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function bt(s){const e=L.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>os(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[o,a]=R.useState(l);let r,c;e[2]!==t?(r=()=>{const f=setInterval(()=>a(os(t,Date.now())),100);return()=>clearInterval(f)},c=[t],e[2]=t,e[3]=r,e[4]=c):(r=e[3],c=e[4]),R.useEffect(r,c);const i=o/1e3;let u;e[5]!==i?(u=Ne(i),e[5]=i,e[6]=u):u=e[6];let m;return e[7]!==u?(m=n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:u}),e[7]=u,e[8]=m):m=e[8],m}const Zs=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Co(){const s=L.c(5),[e]=R.useState(Io);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Zs.map((a,r)=>{const{delay:c}=a;return n.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[r],animation:"grid-ripple 1s ease infinite",animationDelay:`${c}ms`}},r)}),s[1]=e,s[2]=l):l=s[2];let o;return s[3]!==l?(o=n.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=o):o=s[4],o}function Io(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Zs.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function $o(s){return{planning:{icon:n.jsx(sl,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:n.jsx(Ze,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Ro=1200;function yt(s){const e=L.c(8),{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:c,trailing:i}=s,u=c===void 0?"prose":c;let m;return e[0]!==a||e[1]!==u||e[2]!==t||e[3]!==r||e[4]!==o||e[5]!==l||e[6]!==i?(m=n.jsx(Y,{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:u,trailing:i}),e[0]=a,e[1]=u,e[2]=t,e[3]=r,e[4]=o,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Po(s){const e=L.c(22),{startedAt:t}=s,l=V(),o=Fe()?.runStatusStage??null,[a,r]=R.useState("planning");let c,i;if(e[0]!==o?(c=()=>{if(o!==null)return;const h=setTimeout(()=>{r("thinking")},Ro);return()=>{clearTimeout(h)}},i=[o],e[0]=o,e[1]=c,e[2]=i):(c=e[1],i=e[2]),R.useEffect(c,i),o!==null){let h;e[3]!==o||e[4]!==l?(h=Nl(l,o),e[3]=o,e[4]=l,e[5]=h):h=e[5];const g=h;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ze,{className:"size-4"}),e[6]=y):y=e[6];const b=`${g.label}...`;let v;e[7]!==t?(v=t!==null&&n.jsx(bt,{since:t}),e[7]=t,e[8]=v):v=e[8];let j;return e[9]!==g.detail||e[10]!==b||e[11]!==v?(j=n.jsx(yt,{icon:y,title:b,summary:g.detail,state:"loading",trailing:v}),e[9]=g.detail,e[10]=b,e[11]=v,e[12]=j):j=e[12],j}let u;e[13]!==l?(u=$o(l),e[13]=l,e[14]=u):u=e[14];const f=u[a],d=`${f.label}...`;let p;e[15]!==t?(p=t!==null&&n.jsx(bt,{since:t}),e[15]=t,e[16]=p):p=e[16];let x;return e[17]!==f.detail||e[18]!==f.icon||e[19]!==d||e[20]!==p?(x=n.jsx(yt,{icon:f.icon,title:d,summary:f.detail,state:"loading",trailing:p}),e[17]=f.detail,e[18]=f.icon,e[19]=d,e[20]=p,e[21]=x):x=e[21],x}function Ao(s){const e=L.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Co,{}),e[0]=l):l=e[0];let o;return e[1]!==t?(o=n.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,n.jsx(bt,{since:t})]}),e[1]=t,e[2]=o):o=e[2],o}const Eo=2e4;function Lo(s){const e=L.c(9),{startedAt:t}=s,l=V();Ts(1e3);const o=Fe(),r=(t!==null?Date.now()-t:0)>=Eo;let c;e[0]!==t?(c=n.jsx(Po,{startedAt:t}),e[0]=t,e[1]=c):c=e[1];let i;e[2]!==r||e[3]!==o||e[4]!==l?(i=r&&o?.stop&&n.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[n.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),n.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=r,e[3]=o,e[4]=l,e[5]=i):i=e[5];let u;return e[6]!==c||e[7]!==i?(u=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,i]}),e[6]=c,e[7]=i,e[8]=u):u=e[8],u}function Mo(s){const e=L.c(24),{duration:t,parts:l,isStreaming:o}=s,a=V();let r;e[0]!==l?(r=l.every(zo),e[0]=l,e[1]=r):r=e[1];const c=r;let i;e[2]!==t||e[3]!==a?(i=t&&t/1e3>1?a("chat.thinkingIndicator.thoughtFor",{duration:Ne(t/1e3)}):a("chat.thinkingIndicator.thought"),e[2]=t,e[3]=a,e[4]=i):i=e[4];const u=i;let m;if(e[5]!==c||e[6]!==o||e[7]!==l){const v=l.map(Fo).join(`
|
|
1
|
+
import{r as R,c as L,b as V,_ as Rn,j as n,B as Ce,Z as ss,Y as Pn,$ as An,m as K,p as En,aB as Ln,ay as we,aF as Mn,aE as Se,bM as Be,aC as Pe,bN as xs,aA as hs,F as je,o as Dn,e as Fn,K as pe,t as ft,n as Ue,d as Me,E as gs,aw as bs,bO as kt,aD as zn,bP as _e}from"./index-DBW7-LLJ.js";import{e as On}from"./select-p5o_Bt0F.js";import{u as ys}from"./useInfiniteQuery-yZBiNKu9.js";import{a as js,u as Bn}from"./use-connection-DJ0b1gTC.js";import{k as Un,u as Tt,f as Hn,i as Wn,a as Vn,S as qn}from"./use-mcp-client-YC9HMu6y.js";import{a as Gn}from"./use-virtual-mcp-Czn5fHtD.js";import{C as Xn}from"./card-Djqe431m.js";import{o as vs,m as Ss,p as _t,q as Ct}from"./sidebar-BBmlF4Le.js";import{c as Ns,e as ws,a as Qe,d as fe,b as ks,T as me}from"./table-CUPzY57H.js";import{E as mt}from"./empty-state-Jijm8Zjj.js";import{u as It}from"./use-infinite-scroll-BLH47khU.js";import{u as Yn}from"./use-members-BOo6SBZf.js";import{u as Ts,S as Ee}from"./use-clock-tick-Cso4aNFM.js";import{e as Kn}from"./use-automations-BebUXKcQ.js";import{u as _s}from"./studio-tools-eC6fCmF6.js";import{u as Jn}from"./useSuspenseInfiniteQuery-CdZRM8uM.js";import{A as Cs}from"./avatar-CG1sYMC3.js";import{t as Ge}from"./ChevronDown-DSAcD82u.js";import{n as pt}from"./ChevronUp-BqqaHKfG.js";import{n as Is,t as Qn,c as $s,i as Zn,a as $t}from"./Tool02-8rf_PPrb.js";import{h as el,aN as tl,aO as sl,a6 as nl,E as ll,aP as ol,ad as rl,i as ns,at as al,C as il,m as cl,aQ as ul,aL as Rs,aR as dl,A as Ps,aS as be,aT as fl,n as ml}from"./agent-icon-bqP8cd4A.js";import{t as Ze}from"./Stars01-BkoB-Q1B.js";import{i as As,b as He}from"./XCircle-Bdipnf78.js";import{i as Rt}from"./Check-CK_e8wdj.js";import{i as ls}from"./ChevronRight-D02mIW0w.js";import{a as Es}from"./Copy01-CbmbpqVa.js";import{b as Ne,t as Pt,c as os}from"./format-time-BnbuEtat.js";import{u as Ls}from"./use-copy-BNgRyC_N.js";import{T as Ie,a as $e,c as Re}from"./tooltip-fkTa7gIG.js";import{j as At,I as pl,R as xl,J as hl,t as gl,U as he,V as Ms,W as De,c as bl,u as yl,M as jl,e as vl,f as Sl}from"./calendar-CSYSRHan.js";import{d as Nl,c as wl,r as kl,e as Tl}from"./hooks-Bl53PFCW.js";import{j as Fe,F as _l,k as Et,b as Ds,a as Cl}from"./chat-context-B9IMqX9H.js";import{c as Il}from"./monaco-editor-DJSyif3I.js";import{g as Fs,M as $l}from"./index-DS1dPTBr.js";import{f as Rl,o as Pl,q as Al}from"./tab-id-ts2R-IK7.js";import{i as zs}from"./AlertCircle-Cd8M35Wb.js";import{s as El}from"./Eye-CgfUY2cN.js";import{s as Xe,t as Os}from"./Star01-DGK3WnVL.js";import{s as Ll}from"./XClose-BXyOmw6P.js";import{n as xt}from"./ZapSquare-DRAXQQVP.js";import{d as Ml,c as Dl,a as We}from"./Tool01-BPkNcjLe.js";import{i as ze}from"./Monitor01-8S0W2w5U.js";import{i as Fl}from"./SearchMd-bzt4kP0K.js";import{i as zl}from"./Upload01-C74iA_2l.js";import{u as Ol,a as Bl}from"./shell-layout-CvSnv4Ng.js";import{n as Bs}from"./LinkExternal01-CXa8wVjc.js";import{I as ke}from"./integration-icon-BjR4OGAx.js";import{i as Ul}from"./ArrowUpRight-CCEVlmCI.js";import{a as Lt}from"./Users03-C0TiA5ig.js";import{a as ye}from"./Palette-BQLbJJdf.js";import{c as Us}from"./use-navigate-to-agent-CwseQD-z.js";import{a as Hl}from"./Stars02-Cx4R-W4T.js";import{g as Wl}from"./AreaChart-C78nqQQF.js";import{b as Vl,a as ql,c as Gl,d as Xl,e as Yl}from"./dialog-BNEf4h73.js";import{a as Kl,F as Jl,b as Ql,c as Zl,d as eo,e as to}from"./form-BoZJqj_8.js";import{I as so}from"./input-DM14QBHx.js";import{S as no}from"./spinner-D09NsuWH.js";const lo={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Hs(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(lo)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function Ws(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Vs(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+Hs(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function Bc(s){return s.reduce((e,t)=>Vs(e,t.metadata?.usage),Ws())}const oo={damping:.7,stiffness:.05,mass:1.25},ro=70,ao=1e3/60,io=350;let et=!1;globalThis.document?.addEventListener("mousedown",()=>{et=!0});globalThis.document?.addEventListener("mouseup",()=>{et=!1});globalThis.document?.addEventListener("click",()=>{et=!1});const co=(s={})=>{const[e,t]=R.useState(!1),[l,o]=R.useState(s.initial!==!1),[a,r]=R.useState(!1),c=R.useRef(null);c.current=s;const i=R.useCallback(()=>{if(!et)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const v=b.getRangeAt(0);return v.commonAncestorContainer.contains(g.current)||g.current?.contains(v.commonAncestorContainer)},[]),u=R.useCallback(b=>{f.isAtBottom=b,o(b)},[]),m=R.useCallback(b=>{f.escapedFromLock=b,t(b)},[]),f=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(v){if(g.current){const{scrollBehavior:j}=getComputedStyle(g.current);j!=="auto"&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=v,f.ignoreScrollToTop=g.current.scrollTop,j!=="auto"&&(g.current.style.scrollBehavior=j)}},get targetScrollTop(){return!g.current||!y.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!y.current)return 0;const{targetScrollTop:v}=this;if(!s.targetScrollTop)return v;if(b?.targetScrollTop===v)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(v,{scrollElement:g.current,contentElement:y.current}),v),0);return b={targetScrollTop:v,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ro}}},[]),d=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||u(!0);const v=Date.now()+(Number(b.wait)||0),j=it(c.current,b.animation),{ignoreEscapes:T=!1}=b;let S,N=f.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=v+(b.duration??0);const w=async()=>{const k=new Promise(requestAnimationFrame).then(()=>{if(!f.isAtBottom)return f.animation=void 0,!1;const{scrollTop:_}=f,C=performance.now(),I=(C-(f.lastTick??C))/ao;if(f.animation||(f.animation={behavior:j,promise:k,ignoreEscapes:T}),f.animation.behavior===j&&(f.lastTick=C),i()||v>Date.now())return w();if(_<Math.min(N,f.calculatedTargetScrollTop)){if(f.animation?.behavior===j){if(j==="instant")return f.scrollTop=f.calculatedTargetScrollTop,w();f.velocity=(j.damping*f.velocity+j.stiffness*f.scrollDifference)/j.mass,f.accumulated+=f.velocity*I,f.scrollTop+=f.accumulated,f.scrollTop!==_&&(f.accumulated=0)}return w()}return S>Date.now()?(N=f.calculatedTargetScrollTop,w()):(f.animation=void 0,f.scrollTop<f.calculatedTargetScrollTop?d({animation:it(c.current,c.current.resize),ignoreEscapes:T,duration:Math.max(0,S-Date.now())||void 0}):f.isAtBottom)});return k.then(_=>(requestAnimationFrame(()=>{f.animation||(f.lastTick=void 0,f.velocity=0)}),_))};return b.wait!==!0&&(f.animation=void 0),f.animation?.behavior===j?f.animation.promise:w()},[u,i,f]),p=R.useCallback(()=>{m(!0),u(!1)},[m,u]),x=R.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:v,ignoreScrollToTop:j}=f;let{lastScrollTop:T=v}=f;f.lastScrollTop=v,f.ignoreScrollToTop=void 0,j&&j>v&&(T=j),r(f.isNearBottom),setTimeout(()=>{if(f.resizeDifference||v===j)return;if(i()){m(!0),u(!1);return}const S=v>T,N=v<T;if(f.animation?.ignoreEscapes){f.scrollTop=T;return}N&&(m(!0),u(!1)),S&&m(!1),!f.escapedFromLock&&f.isNearBottom&&u(!0)},1)},[m,u,i,f]),h=R.useCallback(({target:b,deltaY:v})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===g.current&&v<0&&g.current.scrollHeight>g.current.clientHeight&&!f.animation?.ignoreEscapes&&(m(!0),u(!1))},[m,u,f]),g=rs(b=>{g.current?.removeEventListener("scroll",x),g.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",x,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),y=rs(b=>{if(f.resizeObserver?.disconnect(),f.resizeObserver=void 0,!b)return;let v;f.resizeObserver=new ResizeObserver(([j])=>{const{height:T}=j.contentRect,S=T-(v??T);if(f.resizeDifference=S,f.scrollTop>f.targetScrollTop&&(f.scrollTop=f.targetScrollTop),r(f.isNearBottom),S>=0){const N=it(c.current,v?c.current.resize:c.current.initial);d({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:io})}else f.isNearBottom&&(m(!1),u(!0));v=T,requestAnimationFrame(()=>{setTimeout(()=>{f.resizeDifference===S&&(f.resizeDifference=0)},1)})}),f.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:g,scrollToBottom:d,stopScroll:p,isAtBottom:l||a,isNearBottom:a,escapedFromLock:e,state:f}};function rs(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const at=new Map;function it(...s){const e={...oo};let t=!1;for(const o of s){if(o==="instant"){t=!0;continue}typeof o=="object"&&(t=!1,e.damping=o.damping??e.damping,e.stiffness=o.stiffness??e.stiffness,e.mass=o.mass??e.mass)}const l=JSON.stringify(e);return at.has(l)||at.set(l,Object.freeze(e)),t?"instant":at.get(l)}function uo(s){let e=2166136261;for(let t=0;t<s.length;t++)e=Math.imul(e^s.charCodeAt(t),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function Mt(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Dt(s,e){if(!e)return s;const t=`${uo(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function fo(s,e){return Dt(s,e).replace(/[_-]/g," ").toLowerCase()}function mo(s,e){const t={};for(const l of s?.arguments??[])t[l.name]=l.required?ss().min(1,e):ss();return Pn(t)}function po(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function xo(s){const e=L.c(74),{prompt:t,setPrompt:l,onSubmit:o,defaultValues:a}=s,r=R.useId(),c=V();let i,u;if(e[0]!==t||e[1]!==c){const D=mo(t,c("chat.dialogPromptArguments.required"));u=An,i=Rn(D),e[0]=t,e[1]=c,e[2]=i,e[3]=u}else i=e[2],u=e[3];let m;e[4]!==a||e[5]!==t?(m=t?po(t,a):{},e[4]=a,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f={resolver:i,defaultValues:m,mode:"onChange"},e[7]=i,e[8]=m,e[9]=f):f=e[9];const d=u(f);let p;e[10]!==t?.arguments?(p=t?.arguments??[],e[10]=t?.arguments,e[11]=p):p=e[11];const x=p;let h;e[12]!==d||e[13]!==o||e[14]!==l?(h=async D=>{await o(D),l(null),d.reset()},e[12]=d,e[13]=o,e[14]=l,e[15]=h):h=e[15];const g=h;let y;e[16]!==d||e[17]!==l?(y=D=>{D||(d.reset(),l(null))},e[16]=d,e[17]=l,e[18]=y):y=e[18];const b=y;if(!t)return null;let v;e[19]!==t._meta||e[20]!==t.name||e[21]!==t.title?(v=t.title||fo(t.name,Mt(t._meta)),e[19]=t._meta,e[20]=t.name,e[21]=t.title,e[22]=v):v=e[22];let j;e[23]!==v?(j=n.jsx(Vl,{children:n.jsx("span",{className:"capitalize",children:v})}),e[23]=v,e[24]=j):j=e[24];let T;e[25]!==t.description?(T=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[25]=t.description,e[26]=T):T=e[26];let S;e[27]!==T||e[28]!==j?(S=n.jsxs(ql,{children:[j,T]}),e[27]=T,e[28]=j,e[29]=S):S=e[29];let N;e[30]!==d||e[31]!==g?(N=D=>{D.stopPropagation(),d.handleSubmit(g)(D)},e[30]=d,e[31]=g,e[32]=N):N=e[32];let w;if(e[33]!==x||e[34]!==d.control||e[35]!==d.formState.isSubmitting||e[36]!==c){let D;e[38]!==d.control||e[39]!==d.formState.isSubmitting||e[40]!==c?(D=O=>n.jsx(Jl,{control:d.control,name:O.name,render:B=>{const{field:U}=B;return n.jsxs(Ql,{children:[n.jsxs(Zl,{className:"text-xs",children:[O.name,O.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",c("chat.dialogPromptArguments.optional")]})]}),n.jsx(eo,{children:n.jsx(so,{...U,value:U.value??"",required:O.required,placeholder:O.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),n.jsx(to,{})]})}},O.name),e[38]=d.control,e[39]=d.formState.isSubmitting,e[40]=c,e[41]=D):D=e[41],w=x.map(D),e[33]=x,e[34]=d.control,e[35]=d.formState.isSubmitting,e[36]=c,e[37]=w}else w=e[37];let k;e[42]!==b?(k=()=>b(!1),e[42]=b,e[43]=k):k=e[43];const _=d.formState.isSubmitting;let C;e[44]!==c?(C=c("chat.dialogPromptArguments.cancel"),e[44]=c,e[45]=C):C=e[45];let I;e[46]!==d.formState.isSubmitting||e[47]!==k||e[48]!==C?(I=n.jsx(Ce,{type:"button",variant:"ghost",onClick:k,disabled:_,children:C}),e[46]=d.formState.isSubmitting,e[47]=k,e[48]=C,e[49]=I):I=e[49];let E;e[50]!==d.formState.isSubmitting||e[51]!==c?(E=d.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(no,{size:"xs"}),c("chat.dialogPromptArguments.loading")]}):c("chat.dialogPromptArguments.usePrompt"),e[50]=d.formState.isSubmitting,e[51]=c,e[52]=E):E=e[52];let P;e[53]!==d.formState.isSubmitting||e[54]!==r||e[55]!==E?(P=n.jsx(Ce,{type:"submit",form:r,disabled:d.formState.isSubmitting,children:E}),e[53]=d.formState.isSubmitting,e[54]=r,e[55]=E,e[56]=P):P=e[56];let $;e[57]!==I||e[58]!==P?($=n.jsxs(Gl,{children:[I,P]}),e[57]=I,e[58]=P,e[59]=$):$=e[59];let A;e[60]!==r||e[61]!==N||e[62]!==w||e[63]!==$?(A=n.jsxs("form",{id:r,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[w,$]}),e[60]=r,e[61]=N,e[62]=w,e[63]=$,e[64]=A):A=e[64];let M;e[65]!==d||e[66]!==A?(M=n.jsx(Kl,{...d,children:A}),e[65]=d,e[66]=A,e[67]=M):M=e[67];let F;e[68]!==S||e[69]!==M?(F=n.jsxs(Xl,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,M]}),e[68]=S,e[69]=M,e[70]=F):F=e[70];let z;return e[71]!==b||e[72]!==F?(z=n.jsx(Yl,{open:!0,onOpenChange:b,children:F}),e[71]=b,e[72]=F,e[73]=z):z=e[73],z}const ho=/^mcp__[a-zA-Z0-9_-]+__/;function qs(s){return s.replace(ho,"")}function tt(s){const e=L.c(19),{id:t,part:l,copyable:o,extraActions:a,alwaysShowActions:r,animate:c}=s,i=o===void 0?!1:o,u=r===void 0?!1:r,m=c===void 0?!1:c,{handleCopy:f}=Ls(),d=V(),[p,x]=R.useState(!1);let h;e[0]!==f||e[1]!==t||e[2]!==l.text?(h=async()=>{En("chat_message_copied",{message_id:t,chars:l.text.length}),await f(l.text),x(!0),setTimeout(()=>x(!1),2e3)},e[0]=f,e[1]=t,e[2]=l.text,e[3]=h):h=e[3];const g=h,y=i&&a,b=y||a;let v;e[4]!==m||e[5]!==t||e[6]!==l.text?(v=n.jsx(At,{id:t,text:l.text,animate:m}),e[4]=m,e[5]=t,e[6]=l.text,e[7]=v):v=e[7];let j;e[8]!==u||e[9]!==a||e[10]!==g||e[11]!==p||e[12]!==b||e[13]!==y||e[14]!==d?(j=b&&n.jsxs("div",{className:K("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",u?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,y&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),y&&n.jsx("button",{type:"button",onClick:g,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":d("chat.textPart.copyMessage"),children:p?n.jsx(Rt,{className:"size-4"}):n.jsx(Es,{className:"size-4"})})]}),e[8]=u,e[9]=a,e[10]=g,e[11]=p,e[12]=b,e[13]=y,e[14]=d,e[15]=j):j=e[15];let T;return e[16]!==v||e[17]!==j?(T=n.jsxs("div",{className:"group/part relative",children:[v,j]}),e[16]=v,e[17]=j,e[18]=T):T=e[18],T}function Uc(s,e,t){s.chain().focus().insertContentAt(e,[go(t),{type:"text",text:" "}]).run()}function go(s){return{type:"file",attrs:s}}function bo(s){const e=L.c(17),{node:t,selected:l,view:o}=s,{name:a,mimeType:r,data:c}=t.attrs,i=l&&o.editable;let u;e[0]!==r?(u=r.startsWith("image/"),e[0]=r,e[1]=u):u=e[1];const m=u,f=i&&"outline-2 outline-blue-300 outline-offset-0";let d;e[2]!==f?(d=K("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",f),e[2]=f,e[3]=d):d=e[3];let p;e[4]!==a?(p=n.jsx(Ie,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=p):p=e[5];let x;e[6]!==c||e[7]!==m||e[8]!==r||e[9]!==a?(x=n.jsx($e,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${r};base64,${c}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:r})]})}),e[6]=c,e[7]=m,e[8]=r,e[9]=a,e[10]=x):x=e[10];let h;e[11]!==p||e[12]!==x?(h=n.jsxs(Re,{children:[p,x]}),e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;return e[14]!==d||e[15]!==h?(g=n.jsx(hl,{className:d,children:h}),e[14]=d,e[15]=h,e[16]=g):g=e[16],g}const yo=pl.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return xl(bo)}}),Te=16,ht=2.5,gt=(Te-ht)/2,ct=2*Math.PI*gt;function Gs(s){const e=L.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:o,outputTokens:a,cost:r}=t;if(!l&&!o&&!a)return null;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(el,{size:12}),e[0]=c):c=e[0];let i;e[1]!==r||e[2]!==l?(i=r>0?`$${r.toFixed(4)}`:l.toLocaleString(),e[1]=r,e[2]=l,e[3]=i):i=e[3];let u;e[4]!==i?(u=n.jsx(Ie,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[c,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:i})]})}),e[4]=i,e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=f):f=e[7];let d;e[8]!==o?(d=o.toLocaleString(),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"text-right tabular-nums",children:d}),e[10]=d,e[11]=p):p=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const h=a-(t.reasoningTokens??0);let g;e[13]!==h?(g=h.toLocaleString(),e[13]=h,e[14]=g):g=e[14];let y;e[15]!==g?(y=n.jsx("span",{className:"text-right tabular-nums",children:g}),e[15]=g,e[16]=y):y=e[16];let b;e[17]!==o||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(b=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:o>0?`${(t.cacheReadTokens/o*100).toFixed(0)}%`:"0%"})]}),e[17]=o,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=b):b=e[20];let v;e[21]!==r?(v=r>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",r.toFixed(4)]})]}),e[21]=r,e[22]=v):v=e[22];let j;e[23]!==y||e[24]!==b||e[25]!==v||e[26]!==p?(j=n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[f,p,x,y,b,v]})]}),e[23]=y,e[24]=b,e[25]=v,e[26]=p,e[27]=j):j=e[27];let T;return e[28]!==j||e[29]!==u?(T=n.jsxs(Re,{children:[u,j]}),e[28]=j,e[29]=u,e[30]=T):T=e[30],T}function jo(s){const e=L.c(19),{usage:t,duration:l}=s,o=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,r=t!=null&&(t.totalTokens??0)>0;if(!o&&!a&&!r)return null;let c;e[0]!==l||e[1]!==o?(c=o?Ne(l/1e3):null,e[0]=l,e[1]=o,e[2]=c):c=e[2];const i=c;let u;e[3]!==l||e[4]!==i||e[5]!==t?(u=i&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:Ne(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=i,e[5]=t,e[6]=u):u=e[6];let m;e[7]!==a||e[8]!==o||e[9]!==r?(m=o&&(a||r)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=o,e[9]=r,e[10]=m):m=e[10];let f;e[11]!==a||e[12]!==r||e[13]!==t?(f=(a||r)&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=r,e[13]=t,e[14]=f):f=e[14];let d;return e[15]!==u||e[16]!==m||e[17]!==f?(d=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[u,m,f]}),e[15]=u,e[16]=m,e[17]=f,e[18]=d):d=e[18],d}function Hc(s){const e=L.c(51),{usage:t,totalTokens:l,contextWindow:o,onOpenContextPanel:a}=s,r=Math.min(l/o*100,100),c=ct-r/100*ct,i=t?.cost??0,u=t?.inputTokens??0,m=t?.outputTokens??0;let f;e[0]!==r?(f=r.toFixed(0),e[0]=r,e[1]=f):f=e[1];let d;e[2]!==i?(d=i>0?`, $${i.toFixed(2)}`:"",e[2]=i,e[3]=d):d=e[3];const p=`Context usage: ${f}%${d}`,x=a?"cursor-pointer":"cursor-default";let h;e[4]!==x?(h=K("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=h):h=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,className:"opacity-15"}),e[6]=g):g=e[6];const y=r>90?"text-destructive":r>70?"text-warning":"text-muted-foreground";let b;e[7]!==y?(b=K(y),e[7]=y,e[8]=b):b=e[8];let v;e[9]!==c||e[10]!==b?(v=n.jsxs("svg",{width:Te,height:Te,className:"-rotate-90",children:[g,n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,strokeDasharray:ct,strokeDashoffset:c,strokeLinecap:"round",className:b})]}),e[9]=c,e[10]=b,e[11]=v):v=e[11];let j;e[12]!==r?(j=r.toFixed(0),e[12]=r,e[13]=j):j=e[13];let T;e[14]!==i?(T=i>0?` · $${i.toFixed(2)}`:"",e[14]=i,e[15]=T):T=e[15];let S;e[16]!==j||e[17]!==T?(S=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[j,"%",T]}),e[16]=j,e[17]=T,e[18]=S):S=e[18];let N;e[19]!==a||e[20]!==S||e[21]!==p||e[22]!==h||e[23]!==v?(N=n.jsx(Ie,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":p,className:h,children:[v,S]})}),e[19]=a,e[20]=S,e[21]=p,e[22]=h,e[23]=v,e[24]=N):N=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=w):w=e[25];let k;e[26]!==l?(k=l.toLocaleString(),e[26]=l,e[27]=k):k=e[27];let _;e[28]!==o?(_=o.toLocaleString(),e[28]=o,e[29]=_):_=e[29];let C;e[30]!==r?(C=r.toFixed(1),e[30]=r,e[31]=C):C=e[31];let I;e[32]!==k||e[33]!==_||e[34]!==C?(I=n.jsxs("span",{className:"text-right tabular-nums",children:[k," / ",_," (",C,"%)"]}),e[32]=k,e[33]=_,e[34]=C,e[35]=I):I=e[35];let E;e[36]!==i||e[37]!==u||e[38]!==m?(E=i>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",i.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:u.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=i,e[37]=u,e[38]=m,e[39]=E):E=e[39];let P;e[40]!==u||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(P=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:u>0?`${((t?.cacheReadTokens??0)/u*100).toFixed(0)}%`:"0%"})]}),e[40]=u,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=P):P=e[43];let $;e[44]!==I||e[45]!==E||e[46]!==P?($=n.jsx($e,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[w,I,E,P]})}),e[44]=I,e[45]=E,e[46]=P,e[47]=$):$=e[47];let A;return e[48]!==N||e[49]!==$?(A=n.jsxs(Re,{children:[N,$]}),e[48]=N,e[49]=$,e[50]=A):A=e[50],A}var st="Collapsible",[vo,Wc]=hs(st),[So,Ft]=vo(st),Xs=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:a,onOpenChange:r,...c}=s,[i,u]=Ln({prop:l,defaultProp:o??!1,onChange:r,caller:st});return n.jsx(So,{scope:t,disabled:a,contentId:Mn(),open:i,onOpenToggle:R.useCallback(()=>u(m=>!m),[u]),children:n.jsx(we.div,{"data-state":Ut(i),"data-disabled":a?"":void 0,...c,ref:e})})});Xs.displayName=st;var Ys="CollapsibleTrigger",zt=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,...l}=s,o=Ft(Ys,t);return n.jsx(we.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ut(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:e,onClick:Se(s.onClick,o.onOpenToggle)})});zt.displayName=Ys;var Ot="CollapsibleContent",Bt=R.forwardRef((s,e)=>{const{forceMount:t,...l}=s,o=Ft(Ot,s.__scopeCollapsible);return n.jsx(Be,{present:t||o.open,children:({present:a})=>n.jsx(No,{...l,ref:e,present:a})})});Bt.displayName=Ot;var No=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,present:l,children:o,...a}=s,r=Ft(Ot,t),[c,i]=R.useState(l),u=R.useRef(null),m=Pe(e,u),f=R.useRef(0),d=f.current,p=R.useRef(0),x=p.current,h=r.open||c,g=R.useRef(h),y=R.useRef(void 0);return R.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),xs(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const v=b.getBoundingClientRect();f.current=v.height,p.current=v.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),i(l)}},[r.open,l]),n.jsx(we.div,{"data-state":Ut(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!h,...a,ref:m,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...s.style},children:h&&o})});function Ut(s){return s?"open":"closed"}var wo=Xs,Vc=zt,qc=Bt;function ko(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(wo,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function To(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(zt,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function _o(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(Bt,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function Y({icon:s,title:e,usage:t,summary:l,state:o,detail:a,detailVariant:r="code",forceOpen:c,variant:i="default",trailing:u,iconDestructive:m,alwaysChevron:f,defaultOpen:d,children:p}){const x=V(),[h,g]=R.useState(d??!1),{handleCopy:y,copied:b}=Ls(),v=o==="loading",j=o==="error",S=!!(a&&a.trim())||!!p,N=i==="subtask",w=(c??!1)||h,k=co({initial:v?"instant":!1}),_=n.jsxs(ko,{open:w,onOpenChange:c?void 0:g,className:"min-w-0",children:[n.jsxs(To,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",v&&"shimmer"),"aria-disabled":!S,children:[n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:f?n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(w?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",w?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")})})]})}),n.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):n.jsx("div",{className:"flex-1"}),u&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:u}),n.jsx(Gs,{usage:t})]}),S&&n.jsx(_o,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(r==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsx("div",{ref:k.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:n.jsx("p",{ref:k.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:a})})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsx("div",{ref:k.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:n.jsxs("div",{ref:k.contentRef,className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:a})}),n.jsx("button",{type:"button",onClick:()=>y(a),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":x("common.copy"),children:b?n.jsx(Rt,{className:"size-3.5"}):n.jsx(Es,{className:"size-3.5"})})]})})}))})]});return N?n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:_}):_}function ue(s){const e=L.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=Ne(t),e[0]=t,e[1]=l):l=e[1];let o;return e[2]!==l?(o=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=o):o=e[3],o}const Ks=4;function Js(s){const e=L.c(8),{count:t,noun:l,onClick:o}=s,a=V();let r;e[0]!==t||e[1]!==l||e[2]!==a?(r=a("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=a,e[3]=r):r=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(As,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=c):c=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsxs("button",{type:"button",onClick:o,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[r,c]}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function Qs(s){const e=L.c(12),{message:t,className:l}=s,o=t.created_at??t.metadata?.created_at??null;let a,r,c,i;if(e[0]!==l||e[1]!==o){i=Symbol.for("react.early_return_sentinel");e:{const m=Pt(o);if(m===null){i=null;break e}const f=new Date(m);a=f.toLocaleString(),e[6]!==l?(r=K("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=r):r=e[7],c=f.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=o,e[2]=a,e[3]=r,e[4]=c,e[5]=i}else a=e[2],r=e[3],c=e[4],i=e[5];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;return e[8]!==a||e[9]!==r||e[10]!==c?(u=n.jsx("span",{title:a,className:r,children:c}),e[8]=a,e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function bt(s){const e=L.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>os(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[o,a]=R.useState(l);let r,c;e[2]!==t?(r=()=>{const f=setInterval(()=>a(os(t,Date.now())),100);return()=>clearInterval(f)},c=[t],e[2]=t,e[3]=r,e[4]=c):(r=e[3],c=e[4]),R.useEffect(r,c);const i=o/1e3;let u;e[5]!==i?(u=Ne(i),e[5]=i,e[6]=u):u=e[6];let m;return e[7]!==u?(m=n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:u}),e[7]=u,e[8]=m):m=e[8],m}const Zs=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Co(){const s=L.c(5),[e]=R.useState(Io);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Zs.map((a,r)=>{const{delay:c}=a;return n.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[r],animation:"grid-ripple 1s ease infinite",animationDelay:`${c}ms`}},r)}),s[1]=e,s[2]=l):l=s[2];let o;return s[3]!==l?(o=n.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=o):o=s[4],o}function Io(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Zs.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function $o(s){return{planning:{icon:n.jsx(sl,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:n.jsx(Ze,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Ro=1200;function yt(s){const e=L.c(8),{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:c,trailing:i}=s,u=c===void 0?"prose":c;let m;return e[0]!==a||e[1]!==u||e[2]!==t||e[3]!==r||e[4]!==o||e[5]!==l||e[6]!==i?(m=n.jsx(Y,{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:u,trailing:i}),e[0]=a,e[1]=u,e[2]=t,e[3]=r,e[4]=o,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Po(s){const e=L.c(22),{startedAt:t}=s,l=V(),o=Fe()?.runStatusStage??null,[a,r]=R.useState("planning");let c,i;if(e[0]!==o?(c=()=>{if(o!==null)return;const h=setTimeout(()=>{r("thinking")},Ro);return()=>{clearTimeout(h)}},i=[o],e[0]=o,e[1]=c,e[2]=i):(c=e[1],i=e[2]),R.useEffect(c,i),o!==null){let h;e[3]!==o||e[4]!==l?(h=Nl(l,o),e[3]=o,e[4]=l,e[5]=h):h=e[5];const g=h;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ze,{className:"size-4"}),e[6]=y):y=e[6];const b=`${g.label}...`;let v;e[7]!==t?(v=t!==null&&n.jsx(bt,{since:t}),e[7]=t,e[8]=v):v=e[8];let j;return e[9]!==g.detail||e[10]!==b||e[11]!==v?(j=n.jsx(yt,{icon:y,title:b,summary:g.detail,state:"loading",trailing:v}),e[9]=g.detail,e[10]=b,e[11]=v,e[12]=j):j=e[12],j}let u;e[13]!==l?(u=$o(l),e[13]=l,e[14]=u):u=e[14];const f=u[a],d=`${f.label}...`;let p;e[15]!==t?(p=t!==null&&n.jsx(bt,{since:t}),e[15]=t,e[16]=p):p=e[16];let x;return e[17]!==f.detail||e[18]!==f.icon||e[19]!==d||e[20]!==p?(x=n.jsx(yt,{icon:f.icon,title:d,summary:f.detail,state:"loading",trailing:p}),e[17]=f.detail,e[18]=f.icon,e[19]=d,e[20]=p,e[21]=x):x=e[21],x}function Ao(s){const e=L.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Co,{}),e[0]=l):l=e[0];let o;return e[1]!==t?(o=n.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,n.jsx(bt,{since:t})]}),e[1]=t,e[2]=o):o=e[2],o}const Eo=2e4;function Lo(s){const e=L.c(9),{startedAt:t}=s,l=V();Ts(1e3);const o=Fe(),r=(t!==null?Date.now()-t:0)>=Eo;let c;e[0]!==t?(c=n.jsx(Po,{startedAt:t}),e[0]=t,e[1]=c):c=e[1];let i;e[2]!==r||e[3]!==o||e[4]!==l?(i=r&&o?.stop&&n.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[n.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),n.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=r,e[3]=o,e[4]=l,e[5]=i):i=e[5];let u;return e[6]!==c||e[7]!==i?(u=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,i]}),e[6]=c,e[7]=i,e[8]=u):u=e[8],u}function Mo(s){const e=L.c(24),{duration:t,parts:l,isStreaming:o}=s,a=V();let r;e[0]!==l?(r=l.every(zo),e[0]=l,e[1]=r):r=e[1];const c=r;let i;e[2]!==t||e[3]!==a?(i=t&&t/1e3>1?a("chat.thinkingIndicator.thoughtFor",{duration:Ne(t/1e3)}):a("chat.thinkingIndicator.thought"),e[2]=t,e[3]=a,e[4]=i):i=e[4];const u=i;let m;if(e[5]!==c||e[6]!==o||e[7]!==l){const v=l.map(Fo).join(`
|
|
2
2
|
`).trim().split(`
|
|
3
3
|
`).filter(Boolean),j=o?v[v.length-1]??"":v[0]??"";m=!c&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=c,e[6]=o,e[7]=l,e[8]=m}else m=e[8];const f=m;let d;if(e[9]!==c||e[10]!==l){const b=l.map(Do).join(`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-
|
|
1
|
+
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-DBW7-LLJ.js";import{s as V}from"./Plus-BApQaxo5.js";import{i as S}from"./Zap-DJXvF0rz.js";import{S as G}from"./search-input-Cav-R6u1.js";import{P as d}from"./index-CzdD7w68.js";import{E as T}from"./empty-state-Jijm8Zjj.js";import{c as H}from"./use-automations-BebUXKcQ.js";import{c as J}from"./use-navigate-to-agent-CwseQD-z.js";import{A as K}from"./automation-list-row-BkrA0C81.js";import{r as O}from"./use-mcp-client-YC9HMu6y.js";import{a as Q}from"./use-virtual-mcp-Czn5fHtD.js";import{R as U}from"./require-capability-94N1MpBW.js";import"./SearchMd-bzt4kP0K.js";import"./sidebar-BBmlF4Le.js";import"./LayoutLeft-CaOxvIEl.js";import"./use-mobile-DaXh9iB4.js";import"./X-D-SXXNOh.js";import"./tooltip-fkTa7gIG.js";import"./studio-tools-eC6fCmF6.js";import"./hooks-Bl53PFCW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DJTs5v3B.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-fWZE2eoL.js";import"./dropdown-menu-B0OSBqF5.js";import"./Check-CK_e8wdj.js";import"./ChevronRight-D02mIW0w.js";import"./DotsVertical-DD9vI7XN.js";import"./Stars02-Cx4R-W4T.js";import"./Trash01-CjLF47KG.js";import"./agent-icon-bqP8cd4A.js";import"./AlertCircle-Cd8M35Wb.js";import"./Tool01-BPkNcjLe.js";import"./ArrowUp-4BHUZHFD.js";import"./Settings02-Cslfpi0u.js";import"./Tool02-8rf_PPrb.js";import"./XCircle-Bdipnf78.js";import"./ArrowUpRight-CCEVlmCI.js";import"./TrendUp01-B3nbKtR5.js";import"./ZapSquare-DRAXQQVP.js";import"./Users03-C0TiA5ig.js";import"./CheckCircle-D31c9Zko.js";import"./ChevronDown-DSAcD82u.js";import"./ChevronUp-BqqaHKfG.js";import"./Copy01-CbmbpqVa.js";import"./CpuChip01-DHX1tpE2.js";import"./Eye-CgfUY2cN.js";import"./FilterLines-BVMJKn0q.js";import"./Star01-DGK3WnVL.js";import"./Palette-BQLbJJdf.js";import"./SwitchHorizontal01-B1yag0Lu.js";import"./HardDrive-2n4L-vNW.js";import"./Key01-T5YNQBm2.js";import"./LinkExternal01-CXa8wVjc.js";import"./LogOut01-CM9eugyU.js";import"./Monitor01-8S0W2w5U.js";import"./Sun-Cno0ZL2K.js";import"./Play-CuYQk1-M.js";import"./SearchLg-BSb_OzKH.js";import"./Shield01-vx0tzuE8.js";import"./Stars01-BkoB-Q1B.js";import"./Upload01-C74iA_2l.js";import"./User01-gol1gjVG.js";import"./Users01-ConkK5Hy.js";import"./XClose-BXyOmw6P.js";import"./auth-B6-JmtGV.js";import"./use-capability-D9H3t7HP.js";import"./access-gate-BKMOmBMY.js";import"./capability-load-error-CI7JffNO.js";function W(){const t=B.c(20),e=D(),{org:c}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=A.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(i,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+i}})};let l;t[0]!==f||t[1]!==c.slug?(l=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=l):l=t[2];const L=l,j=d,v=d,w=d;let s;t[3]!==e?(s=e("settings.automations.pageTitle"),t[3]=e,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:e("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.emptyTitle"),description:e("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),e("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.noResultsTitle"),description:e("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(i=>o.jsx(K,{automation:i,showAgent:!0,onClick:()=>z(i.id,i.virtual_mcp_id)},i.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function go(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,m as f,
|
|
1
|
+
import{c as k,j as i,m as f,bC as R,cV as S,cW as I,cX as $}from"./index-DBW7-LLJ.js";import{s as O}from"./User01-gol1gjVG.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(S,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const V=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),W=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),_=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function D(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const m=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(V({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==m||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:_(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(W({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:m})]}),e[22]=z,e[23]=m,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function X(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let m;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(m=i.jsx(D,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=m):m=e[17],m}X.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(V({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{X as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,m as l,j as g,
|
|
1
|
+
import{c as u,m as l,j as g,be as v,bC as b}from"./index-DBW7-LLJ.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as E,b as F,r as K,m as Q,j as s,K as ve,n as je,B as at}from"./index-B1INhWoo.js";import{i as ct,L as me,R as dt,o as De,p as ue,K as Re,P as Oe,A as ze,B as Fe,x as Ue,_ as ut,D as qe,v as He,z as Ve,C as Me,y as ft}from"./index-LnErdRrl.js";import{Y as mt,Z as pt,_ as xt,$ as gt,a0 as ht,S as bt,a1 as yt}from"./index-Bg79Fd9u.js";import{a1 as vt,I as jt,af as kt,ag as Nt,ah as Ct,f as ke,w as Bt,x as Ge}from"./agent-icon-Dx4NCRpv.js";import{s as Ke}from"./Plus-Bi2kvuIY.js";import{b as Be,c as St,d as wt,a as Pt,C as Tt,e as It}from"./command-BaN3HpzD.js";import{a as $t,b as Lt,P as At}from"./popover-PONP-IrS.js";import{a as _t}from"./Copy01-CAqSjpf_.js";import{s as he}from"./Trash01-BB8WWZkr.js";import{u as Et,e as Dt,n as Rt,f as Ot}from"./calendar-CyEY0jbs.js";import{F as Ne,T as ae,I as X,s as A,p as ne,R as te,A as le}from"./primitives-D8K2Kshy.js";import{i as Je}from"./Check-lBHxT1HX.js";import{a as zt}from"./Tool01-BgrN_XhB.js";import{d as Ft}from"./TrendUp01-cPdEBjok.js";import{s as Ut}from"./XClose-DCuiifka.js";import{L as de}from"./label-BxyuqrG3.js";import{S as Ye}from"./spinner-CeQixqey.js";import{a as qt,b as Ht,d as Vt,e as Mt}from"./dialog-1l6V_AO-.js";import{I as be}from"./input-DkjdpI9N.js";const fe=p=>typeof p=="string"?p:"",Gt=/\/blog\.tsx?$/;function We(p,e){for(const[t,i]of Object.entries(p)){if(t.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const l=i;if(typeof l.__resolveType!="string"||!Gt.test(l.__resolveType))continue;const r=fe(l[e]);if(r)return r}return null}function Kt(p){return We(p,"pageSlug")}function Jt(p){return We(p,"categorySlug")}function Yt(p){const e=p.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return fe(t?.slug)}function Wt(p,e){let t=p;if(/:category\??/.test(t)){if(!e.category)return null;t=t.replace(/:category\??/g,encodeURIComponent(e.category))}if(/:slug\??/.test(t)){if(!e.slug)return null;t=t.replace(/:slug\??/g,encodeURIComponent(e.slug))}return t}const Qt=/:(?:categorySlug|category|slug)\??/,Xt=/:(?:categorySlug|category|slug)\??/g;function Zt(p,e){return Qt.test(p)?e?p.replace(Xt,encodeURIComponent(e)):null:p}function Ss({decofile:p,category:e,previewBaseUrl:t}){if(!t)return null;const i=Jt(p);if(!i)return null;const l=Zt(i,fe(e.slug));if(!l)return null;try{return new URL(l,t).href}catch{return null}}function ws({decofile:p,post:e,previewBaseUrl:t}){if(!t)return null;const i=Kt(p);if(!i)return null;const l=Wt(i,{category:Yt(e),slug:fe(e.slug)});if(!l)return null;try{return new URL(l,t).href}catch{return null}}const Se={app:"sandbox.blockPicker.blocksLabel",site:"sandbox.blockPicker.customBlocksLabel"};function el(p){const e=E.c(6),{iconName:t,iconUrl:i,alt:l}=p;let r;e[0]!==t?(r=jt(t)??vt,e[0]=t,e[1]=r):r=e[1];const o=r;let a;return e[2]!==o||e[3]!==l||e[4]!==i?(a=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",children:i?s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}):s.jsx(o,{size:16,className:"text-muted-foreground"})}),e[2]=o,e[3]=l,e[4]=i,e[5]=a):a=e[5],a}function we(p){const e=E.c(19),{type:t,onInsert:i}=p,l=`${t.title} ${t.resolveType} ${t.description??""}`;let r;e[0]!==i||e[1]!==t.resolveType?(r=()=>i(t.resolveType),e[0]=i,e[1]=t.resolveType,e[2]=r):r=e[2];let o;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(o=s.jsx(el,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=o):o=e[6];let a;e[7]!==t.title?(a=s.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=a):a=e[8];let m;e[9]!==t.description?(m=t.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=m):m=e[10];let d;e[11]!==a||e[12]!==m?(d=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a,m]}),e[11]=a,e[12]=m,e[13]=d):d=e[13];let f;return e[14]!==l||e[15]!==r||e[16]!==o||e[17]!==d?(f=s.jsxs(St,{value:l,onSelect:r,className:"flex items-center gap-2.5",children:[o,d]}),e[14]=l,e[15]=r,e[16]=o,e[17]=d,e[18]=f):f=e[18],f}function Pe(p){const e=E.c(45),{blockTypes:t,onInsert:i,alwaysShow:l}=p,r=l===void 0?!1:l,o=F(),[a,m]=K.useState(!1);let d,f;if(e[0]!==t){d=[],f=[];for(const $ of t)($.source==="site"?f:d).push($);e[0]=t,e[1]=d,e[2]=f}else d=e[1],f=e[2];let g;e[3]!==i?(g=$=>{i($),m(!1)},e[3]=i,e[4]=g):g=e[4];const b=g,h=d.length>0&&f.length>0,n=r?"h-10":"";let c;e[5]!==n?(c=Q("group/insert relative flex h-6 items-center justify-center",n),e[5]=n,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border"}),e[7]=u):u=e[7];let x;e[8]!==o?(x=o("sandbox.blockPicker.insertBlockButton"),e[8]=o,e[9]=x):x=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ke,{size:14}),e[10]=y):y=e[10];let j;e[11]!==x?(j=s.jsx($t,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":x,className:"relative z-10 flex h-6 w-6 items-center justify-center rounded-full border bg-background text-muted-foreground transition-all hover:border-primary hover:text-primary cursor-pointer",children:y})}),e[11]=x,e[12]=j):j=e[12];let v;e[13]!==o?(v=o("sandbox.blockPicker.searchPlaceholder"),e[13]=o,e[14]=v):v=e[14];let C;e[15]!==v?(C=s.jsx(wt,{placeholder:v}),e[15]=v,e[16]=C):C=e[16];let k;e[17]!==o?(k=o("sandbox.blockPicker.noBlocksFound"),e[17]=o,e[18]=k):k=e[18];let N;e[19]!==k?(N=s.jsx(Pt,{children:k}),e[19]=k,e[20]=N):N=e[20];let B;e[21]!==b||e[22]!==h||e[23]!==f||e[24]!==o?(B=f.length>0&&s.jsx(Be,{heading:h?o(Se.site):void 0,children:f.map($=>s.jsx(we,{type:$,onInsert:b},$.resolveType))}),e[21]=b,e[22]=h,e[23]=f,e[24]=o,e[25]=B):B=e[25];let S;e[26]!==d||e[27]!==b||e[28]!==h||e[29]!==o?(S=d.length>0&&s.jsx(Be,{heading:h?o(Se.app):void 0,children:d.map($=>s.jsx(we,{type:$,onInsert:b},$.resolveType))}),e[26]=d,e[27]=b,e[28]=h,e[29]=o,e[30]=S):S=e[30];let w;e[31]!==N||e[32]!==B||e[33]!==S?(w=s.jsxs(Tt,{className:"max-h-80",children:[N,B,S]}),e[31]=N,e[32]=B,e[33]=S,e[34]=w):w=e[34];let T;e[35]!==C||e[36]!==w?(T=s.jsx(Lt,{className:"w-80 p-0",align:"center",children:s.jsxs(It,{children:[C,w]})}),e[35]=C,e[36]=w,e[37]=T):T=e[37];let I;e[38]!==a||e[39]!==T||e[40]!==j?(I=s.jsxs(At,{open:a,onOpenChange:m,children:[j,T]}),e[38]=a,e[39]=T,e[40]=j,e[41]=I):I=e[41];let P;return e[42]!==I||e[43]!==c?(P=s.jsxs("div",{className:c,children:[u,I]}),e[42]=I,e[43]=c,e[44]=P):P=e[44],P}function tl({html:p,placeholder:e,onChange:t}){const i=K.useRef(t);i.current=t;const[l,r]=K.useState(!1),o=Et({extensions:[Dt.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),ct.configure({placeholder:e??"Write something…"})],content:p||"",editorProps:{attributes:{class:Q("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0")}},onUpdate:({editor:m})=>{const d=m.getHTML();i.current(d==="<p></p>"?"":d)}}),a=Rt({editor:o,selector:({editor:m})=>({isFocused:m?.isFocused??!1,bold:m?.isActive("bold")??!1,italic:m?.isActive("italic")??!1,underline:m?.isActive("underline")??!1,link:m?.isActive("link")??!1})});return o?s.jsxs("div",{className:"relative",children:[(a.isFocused||l)&&s.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:[s.jsx(me,{active:a.bold,label:"Bold",onClick:()=>o.chain().focus().toggleBold().run(),children:s.jsx(kt,{size:14})}),s.jsx(me,{active:a.italic,label:"Italic",onClick:()=>o.chain().focus().toggleItalic().run(),children:s.jsx(Nt,{size:14})}),s.jsx(me,{active:a.underline,label:"Underline",onClick:()=>o.chain().focus().toggleUnderline().run(),children:s.jsx(Ct,{size:14})}),s.jsx(dt,{editor:o,active:a.link,open:l,onOpenChange:r})]}),s.jsx(Ot,{editor:o,className:"text-[15px] text-foreground"})]}):null}const ll=["1","2","3"],Te={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function sl(p){const e=E.c(23),{text:t,level:i,onChange:l}=p,[r,o]=K.useState(!1),a=F(),m=i||"2";let d;e[0]!==r||e[1]!==m||e[2]!==l||e[3]!==a||e[4]!==t?(d=r&&s.jsx(Ne,{children:ll.map(y=>s.jsxs(ae,{active:m===y,label:a(`sandbox.plainBlocks.headingLevel${y}`),onClick:()=>l({text:t,level:y}),children:["H",y]},y))}),e[0]=r,e[1]=m,e[2]=l,e[3]=a,e[4]=t,e[5]=d):d=e[5];let f;e[6]!==m||e[7]!==l?(f=y=>l({text:y,level:m}),e[6]=m,e[7]=l,e[8]=f):f=e[8];let g,b;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>o(!0),b=()=>o(!1),e[9]=g,e[10]=b):(g=e[9],b=e[10]);let h;e[11]!==a?(h=a("sandbox.plainBlocks.headingPlaceholder"),e[11]=a,e[12]=h):h=e[12];const n=Te[m]??Te[2];let c;e[13]!==n?(c=Q("text-foreground",n),e[13]=n,e[14]=c):c=e[14];let u;e[15]!==f||e[16]!==h||e[17]!==c||e[18]!==t?(u=s.jsx(X,{value:t,onChange:f,onFocus:g,onBlur:b,placeholder:h,className:c}),e[15]=f,e[16]=h,e[17]=c,e[18]=t,e[19]=u):u=e[19];let x;return e[20]!==d||e[21]!==u?(x=s.jsxs("div",{className:"relative",children:[d,u]}),e[20]=d,e[21]=u,e[22]=x):x=e[22],x}function ol(p){const e=E.c(6),{quote:t,onChange:i}=p,l=F();let r;e[0]!==l?(r=l("sandbox.plainBlocks.quotePlaceholder"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==i||e[3]!==t||e[4]!==r?(o=s.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:s.jsx(X,{value:t,onChange:i,placeholder:r,className:"text-lg italic text-foreground/90"})}),e[2]=i,e[3]=t,e[4]=r,e[5]=o):o=e[5],o}function rl(p){const e=E.c(21),{code:t,language:i,onChange:l}=p,r=F();let o;e[0]!==t||e[1]!==l?(o=h=>l({code:t,language:h.target.value}),e[0]=t,e[1]=l,e[2]=o):o=e[2];let a;e[3]!==r?(a=r("sandbox.plainBlocks.languagePlaceholder"),e[3]=r,e[4]=a):a=e[4];let m;e[5]!==i||e[6]!==o||e[7]!==a?(m=s.jsx("input",{value:i,onChange:o,placeholder:a,className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[5]=i,e[6]=o,e[7]=a,e[8]=m):m=e[8];let d;e[9]!==i||e[10]!==l?(d=h=>l({code:h,language:i}),e[9]=i,e[10]=l,e[11]=d):d=e[11];let f;e[12]!==r?(f=r("sandbox.plainBlocks.codePlaceholder"),e[12]=r,e[13]=f):f=e[13];let g;e[14]!==t||e[15]!==d||e[16]!==f?(g=s.jsx(X,{value:t,onChange:d,placeholder:f,spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[14]=t,e[15]=d,e[16]=f,e[17]=g):g=e[17];let b;return e[18]!==m||e[19]!==g?(b=s.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[m,g]}),e[18]=m,e[19]=g,e[20]=b):b=e[20],b}function nl(p){const e=E.c(18),{items:t,style:i,onChange:l}=p,r=i==="ordered",o=t.length?t.split(`
|
|
1
|
+
import{c as E,b as F,r as K,m as Q,j as s,K as ve,n as je,B as at}from"./index-DBW7-LLJ.js";import{i as ct,L as me,R as dt,o as De,p as ue,K as Re,P as Oe,A as ze,B as Fe,x as Ue,_ as ut,D as qe,v as He,z as Ve,C as Me,y as ft}from"./index-D7iPCSni.js";import{Y as mt,Z as pt,_ as xt,$ as gt,a0 as ht,S as bt,a1 as yt}from"./index-DFVpce2g.js";import{a1 as vt,I as jt,af as kt,ag as Nt,ah as Ct,f as ke,w as Bt,x as Ge}from"./agent-icon-bqP8cd4A.js";import{s as Ke}from"./Plus-BApQaxo5.js";import{b as Be,c as St,d as wt,a as Pt,C as Tt,e as It}from"./command-D8VZgYcp.js";import{a as $t,b as Lt,P as At}from"./popover-13d1_Ydy.js";import{a as _t}from"./Copy01-CbmbpqVa.js";import{s as he}from"./Trash01-CjLF47KG.js";import{u as Et,e as Dt,n as Rt,f as Ot}from"./calendar-CSYSRHan.js";import{F as Ne,T as ae,I as X,s as A,p as ne,R as te,A as le}from"./primitives-CWnjtxmC.js";import{i as Je}from"./Check-CK_e8wdj.js";import{a as zt}from"./Tool01-BPkNcjLe.js";import{d as Ft}from"./TrendUp01-B3nbKtR5.js";import{s as Ut}from"./XClose-BXyOmw6P.js";import{L as de}from"./label-BEcprhix.js";import{S as Ye}from"./spinner-D09NsuWH.js";import{a as qt,b as Ht,d as Vt,e as Mt}from"./dialog-BNEf4h73.js";import{I as be}from"./input-DM14QBHx.js";const fe=p=>typeof p=="string"?p:"",Gt=/\/blog\.tsx?$/;function We(p,e){for(const[t,i]of Object.entries(p)){if(t.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const l=i;if(typeof l.__resolveType!="string"||!Gt.test(l.__resolveType))continue;const r=fe(l[e]);if(r)return r}return null}function Kt(p){return We(p,"pageSlug")}function Jt(p){return We(p,"categorySlug")}function Yt(p){const e=p.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return fe(t?.slug)}function Wt(p,e){let t=p;if(/:category\??/.test(t)){if(!e.category)return null;t=t.replace(/:category\??/g,encodeURIComponent(e.category))}if(/:slug\??/.test(t)){if(!e.slug)return null;t=t.replace(/:slug\??/g,encodeURIComponent(e.slug))}return t}const Qt=/:(?:categorySlug|category|slug)\??/,Xt=/:(?:categorySlug|category|slug)\??/g;function Zt(p,e){return Qt.test(p)?e?p.replace(Xt,encodeURIComponent(e)):null:p}function Ss({decofile:p,category:e,previewBaseUrl:t}){if(!t)return null;const i=Jt(p);if(!i)return null;const l=Zt(i,fe(e.slug));if(!l)return null;try{return new URL(l,t).href}catch{return null}}function ws({decofile:p,post:e,previewBaseUrl:t}){if(!t)return null;const i=Kt(p);if(!i)return null;const l=Wt(i,{category:Yt(e),slug:fe(e.slug)});if(!l)return null;try{return new URL(l,t).href}catch{return null}}const Se={app:"sandbox.blockPicker.blocksLabel",site:"sandbox.blockPicker.customBlocksLabel"};function el(p){const e=E.c(6),{iconName:t,iconUrl:i,alt:l}=p;let r;e[0]!==t?(r=jt(t)??vt,e[0]=t,e[1]=r):r=e[1];const o=r;let a;return e[2]!==o||e[3]!==l||e[4]!==i?(a=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",children:i?s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}):s.jsx(o,{size:16,className:"text-muted-foreground"})}),e[2]=o,e[3]=l,e[4]=i,e[5]=a):a=e[5],a}function we(p){const e=E.c(19),{type:t,onInsert:i}=p,l=`${t.title} ${t.resolveType} ${t.description??""}`;let r;e[0]!==i||e[1]!==t.resolveType?(r=()=>i(t.resolveType),e[0]=i,e[1]=t.resolveType,e[2]=r):r=e[2];let o;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(o=s.jsx(el,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=o):o=e[6];let a;e[7]!==t.title?(a=s.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=a):a=e[8];let m;e[9]!==t.description?(m=t.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=m):m=e[10];let d;e[11]!==a||e[12]!==m?(d=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a,m]}),e[11]=a,e[12]=m,e[13]=d):d=e[13];let f;return e[14]!==l||e[15]!==r||e[16]!==o||e[17]!==d?(f=s.jsxs(St,{value:l,onSelect:r,className:"flex items-center gap-2.5",children:[o,d]}),e[14]=l,e[15]=r,e[16]=o,e[17]=d,e[18]=f):f=e[18],f}function Pe(p){const e=E.c(45),{blockTypes:t,onInsert:i,alwaysShow:l}=p,r=l===void 0?!1:l,o=F(),[a,m]=K.useState(!1);let d,f;if(e[0]!==t){d=[],f=[];for(const $ of t)($.source==="site"?f:d).push($);e[0]=t,e[1]=d,e[2]=f}else d=e[1],f=e[2];let g;e[3]!==i?(g=$=>{i($),m(!1)},e[3]=i,e[4]=g):g=e[4];const b=g,h=d.length>0&&f.length>0,n=r?"h-10":"";let c;e[5]!==n?(c=Q("group/insert relative flex h-6 items-center justify-center",n),e[5]=n,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border"}),e[7]=u):u=e[7];let x;e[8]!==o?(x=o("sandbox.blockPicker.insertBlockButton"),e[8]=o,e[9]=x):x=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ke,{size:14}),e[10]=y):y=e[10];let j;e[11]!==x?(j=s.jsx($t,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":x,className:"relative z-10 flex h-6 w-6 items-center justify-center rounded-full border bg-background text-muted-foreground transition-all hover:border-primary hover:text-primary cursor-pointer",children:y})}),e[11]=x,e[12]=j):j=e[12];let v;e[13]!==o?(v=o("sandbox.blockPicker.searchPlaceholder"),e[13]=o,e[14]=v):v=e[14];let C;e[15]!==v?(C=s.jsx(wt,{placeholder:v}),e[15]=v,e[16]=C):C=e[16];let k;e[17]!==o?(k=o("sandbox.blockPicker.noBlocksFound"),e[17]=o,e[18]=k):k=e[18];let N;e[19]!==k?(N=s.jsx(Pt,{children:k}),e[19]=k,e[20]=N):N=e[20];let B;e[21]!==b||e[22]!==h||e[23]!==f||e[24]!==o?(B=f.length>0&&s.jsx(Be,{heading:h?o(Se.site):void 0,children:f.map($=>s.jsx(we,{type:$,onInsert:b},$.resolveType))}),e[21]=b,e[22]=h,e[23]=f,e[24]=o,e[25]=B):B=e[25];let S;e[26]!==d||e[27]!==b||e[28]!==h||e[29]!==o?(S=d.length>0&&s.jsx(Be,{heading:h?o(Se.app):void 0,children:d.map($=>s.jsx(we,{type:$,onInsert:b},$.resolveType))}),e[26]=d,e[27]=b,e[28]=h,e[29]=o,e[30]=S):S=e[30];let w;e[31]!==N||e[32]!==B||e[33]!==S?(w=s.jsxs(Tt,{className:"max-h-80",children:[N,B,S]}),e[31]=N,e[32]=B,e[33]=S,e[34]=w):w=e[34];let T;e[35]!==C||e[36]!==w?(T=s.jsx(Lt,{className:"w-80 p-0",align:"center",children:s.jsxs(It,{children:[C,w]})}),e[35]=C,e[36]=w,e[37]=T):T=e[37];let I;e[38]!==a||e[39]!==T||e[40]!==j?(I=s.jsxs(At,{open:a,onOpenChange:m,children:[j,T]}),e[38]=a,e[39]=T,e[40]=j,e[41]=I):I=e[41];let P;return e[42]!==I||e[43]!==c?(P=s.jsxs("div",{className:c,children:[u,I]}),e[42]=I,e[43]=c,e[44]=P):P=e[44],P}function tl({html:p,placeholder:e,onChange:t}){const i=K.useRef(t);i.current=t;const[l,r]=K.useState(!1),o=Et({extensions:[Dt.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),ct.configure({placeholder:e??"Write something…"})],content:p||"",editorProps:{attributes:{class:Q("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0")}},onUpdate:({editor:m})=>{const d=m.getHTML();i.current(d==="<p></p>"?"":d)}}),a=Rt({editor:o,selector:({editor:m})=>({isFocused:m?.isFocused??!1,bold:m?.isActive("bold")??!1,italic:m?.isActive("italic")??!1,underline:m?.isActive("underline")??!1,link:m?.isActive("link")??!1})});return o?s.jsxs("div",{className:"relative",children:[(a.isFocused||l)&&s.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:[s.jsx(me,{active:a.bold,label:"Bold",onClick:()=>o.chain().focus().toggleBold().run(),children:s.jsx(kt,{size:14})}),s.jsx(me,{active:a.italic,label:"Italic",onClick:()=>o.chain().focus().toggleItalic().run(),children:s.jsx(Nt,{size:14})}),s.jsx(me,{active:a.underline,label:"Underline",onClick:()=>o.chain().focus().toggleUnderline().run(),children:s.jsx(Ct,{size:14})}),s.jsx(dt,{editor:o,active:a.link,open:l,onOpenChange:r})]}),s.jsx(Ot,{editor:o,className:"text-[15px] text-foreground"})]}):null}const ll=["1","2","3"],Te={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function sl(p){const e=E.c(23),{text:t,level:i,onChange:l}=p,[r,o]=K.useState(!1),a=F(),m=i||"2";let d;e[0]!==r||e[1]!==m||e[2]!==l||e[3]!==a||e[4]!==t?(d=r&&s.jsx(Ne,{children:ll.map(y=>s.jsxs(ae,{active:m===y,label:a(`sandbox.plainBlocks.headingLevel${y}`),onClick:()=>l({text:t,level:y}),children:["H",y]},y))}),e[0]=r,e[1]=m,e[2]=l,e[3]=a,e[4]=t,e[5]=d):d=e[5];let f;e[6]!==m||e[7]!==l?(f=y=>l({text:y,level:m}),e[6]=m,e[7]=l,e[8]=f):f=e[8];let g,b;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>o(!0),b=()=>o(!1),e[9]=g,e[10]=b):(g=e[9],b=e[10]);let h;e[11]!==a?(h=a("sandbox.plainBlocks.headingPlaceholder"),e[11]=a,e[12]=h):h=e[12];const n=Te[m]??Te[2];let c;e[13]!==n?(c=Q("text-foreground",n),e[13]=n,e[14]=c):c=e[14];let u;e[15]!==f||e[16]!==h||e[17]!==c||e[18]!==t?(u=s.jsx(X,{value:t,onChange:f,onFocus:g,onBlur:b,placeholder:h,className:c}),e[15]=f,e[16]=h,e[17]=c,e[18]=t,e[19]=u):u=e[19];let x;return e[20]!==d||e[21]!==u?(x=s.jsxs("div",{className:"relative",children:[d,u]}),e[20]=d,e[21]=u,e[22]=x):x=e[22],x}function ol(p){const e=E.c(6),{quote:t,onChange:i}=p,l=F();let r;e[0]!==l?(r=l("sandbox.plainBlocks.quotePlaceholder"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==i||e[3]!==t||e[4]!==r?(o=s.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:s.jsx(X,{value:t,onChange:i,placeholder:r,className:"text-lg italic text-foreground/90"})}),e[2]=i,e[3]=t,e[4]=r,e[5]=o):o=e[5],o}function rl(p){const e=E.c(21),{code:t,language:i,onChange:l}=p,r=F();let o;e[0]!==t||e[1]!==l?(o=h=>l({code:t,language:h.target.value}),e[0]=t,e[1]=l,e[2]=o):o=e[2];let a;e[3]!==r?(a=r("sandbox.plainBlocks.languagePlaceholder"),e[3]=r,e[4]=a):a=e[4];let m;e[5]!==i||e[6]!==o||e[7]!==a?(m=s.jsx("input",{value:i,onChange:o,placeholder:a,className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[5]=i,e[6]=o,e[7]=a,e[8]=m):m=e[8];let d;e[9]!==i||e[10]!==l?(d=h=>l({code:h,language:i}),e[9]=i,e[10]=l,e[11]=d):d=e[11];let f;e[12]!==r?(f=r("sandbox.plainBlocks.codePlaceholder"),e[12]=r,e[13]=f):f=e[13];let g;e[14]!==t||e[15]!==d||e[16]!==f?(g=s.jsx(X,{value:t,onChange:d,placeholder:f,spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[14]=t,e[15]=d,e[16]=f,e[17]=g):g=e[17];let b;return e[18]!==m||e[19]!==g?(b=s.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[m,g]}),e[18]=m,e[19]=g,e[20]=b):b=e[20],b}function nl(p){const e=E.c(18),{items:t,style:i,onChange:l}=p,r=i==="ordered",o=t.length?t.split(`
|
|
2
2
|
`):[""],[a,m]=K.useState(!1),d=F(),f=K.useRef([]);let g;e[0]!==l||e[1]!==i?(g=k=>l({items:k.join(`
|
|
3
3
|
`),style:i}),e[0]=l,e[1]=i,e[2]=g):g=e[2];const b=g,h=(k,N)=>requestAnimationFrame(()=>{const B=f.current[k];if(!B)return;B.focus();const S=N==="end"?B.value.length:0;B.setSelectionRange(S,S)}),n="relative";let c,u;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=()=>m(!0),u=k=>{k.currentTarget.contains(k.relatedTarget)||m(!1)},e[3]=c,e[4]=u):(c=e[3],u=e[4]);let x;e[5]!==a||e[6]!==t||e[7]!==l||e[8]!==r||e[9]!==d?(x=a&&s.jsxs(Ne,{children:[s.jsx(ae,{active:!r,label:d("sandbox.plainBlocks.bulletedLabel"),onClick:()=>l({items:t,style:"unordered"}),children:"•"}),s.jsx(ae,{active:r,label:d("sandbox.plainBlocks.numberedLabel"),onClick:()=>l({items:t,style:"ordered"}),children:"1."})]}),e[5]=a,e[6]=t,e[7]=l,e[8]=r,e[9]=d,e[10]=x):x=e[10];const y="space-y-1",j=o.map((k,N)=>s.jsxs("li",{className:"flex items-start gap-2.5",children:[s.jsx("span",{className:"min-w-5 shrink-0 select-none pt-px text-right text-[15px] leading-relaxed text-muted-foreground tabular-nums",children:r?`${N+1}.`:"•"}),s.jsx(X,{inputRef:B=>{f.current[N]=B},value:k,onChange:B=>{const S=[...o];S[N]=B,b(S)},onKeyDown:B=>{const S=B.currentTarget;if(B.key==="Enter"){B.preventDefault();const w=[...o];w.splice(N+1,0,""),b(w),h(N+1,"start")}else B.key==="Backspace"&&k===""&&o.length>1?(B.preventDefault(),b(o.filter((w,T)=>T!==N)),h(Math.max(0,N-1),"end")):B.key==="ArrowUp"&&S.selectionStart===0&&N>0?(B.preventDefault(),h(N-1,"end")):B.key==="ArrowDown"&&S.selectionEnd===k.length&&N<o.length-1&&(B.preventDefault(),h(N+1,"end"))},placeholder:d("sandbox.plainBlocks.listItemPlaceholder"),className:"text-[15px] leading-relaxed text-foreground"})]},N));let v;e[11]!==j?(v=s.jsx("ul",{className:y,children:j}),e[11]=j,e[12]=v):v=e[12];let C;return e[13]!==c||e[14]!==u||e[15]!==x||e[16]!==v?(C=s.jsxs("div",{className:n,onFocus:c,onBlur:u,children:[x,v]}),e[13]=c,e[14]=u,e[15]=x,e[16]=v,e[17]=C):C=e[17],C}function il(p){const e=E.c(51),{block:t,onChange:i}=p,l=F();let r;e[0]!==t.size?(r=A(t.size)||"normal",e[0]=t.size,e[1]=r):r=e[1];const o=r;let a;e[2]!==l?(a=l("sandbox.mediaBlocks.image"),e[2]=l,e[3]=a):a=e[3];let m;e[4]!==a?(m={type:"string",format:"image-uri",title:a},e[4]=a,e[5]=m):m=e[5];const d=t.url;let f;e[6]!==t||e[7]!==i?(f=S=>i({...t,url:S}),e[6]=t,e[7]=i,e[8]=f):f=e[8];let g;e[9]!==l?(g=l("sandbox.mediaBlocks.image"),e[9]=l,e[10]=g):g=e[10];let b;e[11]!==t.url||e[12]!==m||e[13]!==f||e[14]!==g?(b=s.jsx(mt,{schema:m,value:d,onChange:f,path:"block-image-url",label:g}),e[11]=t.url,e[12]=m,e[13]=f,e[14]=g,e[15]=b):b=e[15];let h;e[16]!==t.caption?(h=A(t.caption),e[16]=t.caption,e[17]=h):h=e[17];let n;e[18]!==t||e[19]!==i?(n=S=>i({...t,caption:S}),e[18]=t,e[19]=i,e[20]=n):n=e[20];let c;e[21]!==l?(c=l("sandbox.mediaBlocks.addCaption"),e[21]=l,e[22]=c):c=e[22];let u;e[23]!==c||e[24]!==h||e[25]!==n?(u=s.jsx(X,{value:h,onChange:n,placeholder:c,className:"text-center text-sm italic text-muted-foreground"}),e[23]=c,e[24]=h,e[25]=n,e[26]=u):u=e[26];let x;e[27]===Symbol.for("react.memo_cache_sentinel")?(x=["normal","full"],e[27]=x):x=e[27];let y;e[28]!==t||e[29]!==i||e[30]!==o||e[31]!==l?(y=s.jsx("div",{className:"flex items-center gap-1",children:x.map(S=>s.jsx("button",{type:"button",onClick:()=>i({...t,size:S}),className:Q("rounded px-2 py-0.5 transition-colors cursor-pointer",o===S?"bg-accent text-accent-foreground":"hover:bg-muted"),children:l(S==="full"?"sandbox.mediaBlocks.fullWidth":"sandbox.mediaBlocks.normal")},S))}),e[28]=t,e[29]=i,e[30]=o,e[31]=l,e[32]=y):y=e[32];let j;e[33]!==t.alt?(j=A(t.alt),e[33]=t.alt,e[34]=j):j=e[34];let v;e[35]!==t||e[36]!==i?(v=S=>i({...t,alt:S.target.value}),e[35]=t,e[36]=i,e[37]=v):v=e[37];let C;e[38]!==l?(C=l("sandbox.mediaBlocks.altText"),e[38]=l,e[39]=C):C=e[39];let k;e[40]!==j||e[41]!==v||e[42]!==C?(k=s.jsx("input",{value:j,onChange:v,placeholder:C,className:"flex-1 border-0 bg-transparent p-0 text-xs outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[40]=j,e[41]=v,e[42]=C,e[43]=k):k=e[43];let N;e[44]!==y||e[45]!==k?(N=s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[y,k]}),e[44]=y,e[45]=k,e[46]=N):N=e[46];let B;return e[47]!==u||e[48]!==N||e[49]!==b?(B=s.jsxs("div",{className:"space-y-2",children:[b,u,N]}),e[47]=u,e[48]=N,e[49]=b,e[50]=B):B=e[50],B}function al(p){const e=p.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]{11})/);if(e)return`https://www.youtube.com/embed/${e[1]}`;const t=p.match(/vimeo\.com\/(\d+)/);return t?`https://player.vimeo.com/video/${t[1]}`:null}function cl(p){const e=E.c(28),{url:t,caption:i,onChange:l}=p,r=F();let o;e[0]!==t?(o=al(t),e[0]=t,e[1]=o):o=e[1];const a=o;let m;e[2]!==i||e[3]!==a||e[4]!==r?(m=a?s.jsx("div",{className:"relative aspect-video overflow-hidden rounded-md border bg-muted",children:s.jsx("iframe",{src:a,title:i||r("sandbox.mediaBlocks.video"),className:"absolute inset-0 h-full w-full border-0",allowFullScreen:!0})}):s.jsx("div",{className:"flex aspect-video items-center justify-center rounded-md border border-dashed bg-muted/40 text-xs text-muted-foreground",children:r("sandbox.mediaBlocks.pasteVideoUrl")}),e[2]=i,e[3]=a,e[4]=r,e[5]=m):m=e[5];let d;e[6]!==i||e[7]!==l?(d=u=>l({url:u.target.value,caption:i}),e[6]=i,e[7]=l,e[8]=d):d=e[8];let f;e[9]!==r?(f=r("sandbox.mediaBlocks.videoUrlPlaceholder"),e[9]=r,e[10]=f):f=e[10];let g;e[11]!==d||e[12]!==f||e[13]!==t?(g=s.jsx("input",{value:t,onChange:d,placeholder:f,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[11]=d,e[12]=f,e[13]=t,e[14]=g):g=e[14];let b;e[15]!==l||e[16]!==t?(b=u=>l({url:t,caption:u}),e[15]=l,e[16]=t,e[17]=b):b=e[17];let h;e[18]!==r?(h=r("sandbox.mediaBlocks.addCaption"),e[18]=r,e[19]=h):h=e[19];let n;e[20]!==i||e[21]!==b||e[22]!==h?(n=s.jsx(X,{value:i,onChange:b,placeholder:h,className:"text-center text-sm italic text-muted-foreground"}),e[20]=i,e[21]=b,e[22]=h,e[23]=n):n=e[23];let c;return e[24]!==m||e[25]!==g||e[26]!==n?(c=s.jsxs("div",{className:"space-y-2",children:[m,g,n]}),e[24]=m,e[25]=g,e[26]=n,e[27]=c):c=e[27],c}function dl(){const p=E.c(5),e=F();let t;p[0]!==e?(t=e("sandbox.mediaBlocks.divider"),p[0]=e,p[1]=t):t=p[1];let i;p[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"h-px flex-1 bg-border"}),p[2]=i):i=p[2];let l;return p[3]!==t?(l=s.jsx("div",{className:"flex items-center py-3","aria-label":t,children:i}),p[3]=t,p[4]=l):l=p[4],l}function ul(p){const e=E.c(22),{text:t,href:i,onChange:l}=p,r=F();let o;e[0]!==i||e[1]!==l?(o=n=>l({text:n.target.value,href:i}),e[0]=i,e[1]=l,e[2]=o):o=e[2];let a;e[3]!==r?(a=r("sandbox.mediaBlocks.buttonLabel"),e[3]=r,e[4]=a):a=e[4];const m=Math.max(t.length||11,8);let d;e[5]!==o||e[6]!==a||e[7]!==m||e[8]!==t?(d=s.jsx("div",{className:"inline-flex items-center rounded-full bg-primary px-6 py-2 text-sm font-semibold text-primary-foreground",children:s.jsx("input",{value:t,onChange:o,placeholder:a,size:m,className:"border-0 bg-transparent p-0 text-center text-sm font-semibold text-primary-foreground outline-none placeholder:text-primary-foreground/60 focus:ring-0"})}),e[5]=o,e[6]=a,e[7]=m,e[8]=t,e[9]=d):d=e[9];let f;e[10]!==l||e[11]!==t?(f=n=>l({text:t,href:n.target.value}),e[10]=l,e[11]=t,e[12]=f):f=e[12];let g;e[13]!==r?(g=r("sandbox.mediaBlocks.destinationUrlPlaceholder"),e[13]=r,e[14]=g):g=e[14];let b;e[15]!==i||e[16]!==f||e[17]!==g?(b=s.jsx("input",{value:i,onChange:f,placeholder:g,className:"w-full max-w-sm border-0 bg-transparent p-0 text-center text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[15]=i,e[16]=f,e[17]=g,e[18]=b):b=e[18];let h;return e[19]!==d||e[20]!==b?(h=s.jsxs("div",{className:"flex flex-col items-center gap-2 py-2",children:[d,b]}),e[19]=d,e[20]=b,e[21]=h):h=e[21],h}const pe=[{value:"info",icon:"ℹ",color:"oklch(0.62 0.19 250)"},{value:"tip",icon:"✓",color:"oklch(0.65 0.17 150)"},{value:"warning",icon:"⚠",color:"oklch(0.75 0.15 75)"},{value:"product",icon:"★",color:"oklch(0.62 0.21 300)"}];function fl(p){const e=E.c(51),{title:t,body:i,variant:l,onChange:r}=p,o=F(),[a,m]=K.useState(!1);let d;e[0]!==l?(d=pe.find(P=>P.value===l)??pe[0],e[0]=l,e[1]=d):d=e[1];const f=d;let g,b;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=()=>m(!0),b=P=>{P.currentTarget.contains(P.relatedTarget)||m(!1)},e[2]=g,e[3]=b):(g=e[2],b=e[3]);let h;e[4]!==i||e[5]!==a||e[6]!==r||e[7]!==t||e[8]!==f.value?(h=a&&s.jsx(Ne,{children:pe.map(P=>s.jsx(ae,{active:f.value===P.value,label:P.value,onClick:()=>r({title:t,body:i,variant:P.value}),children:s.jsx("span",{style:{color:P.color},children:P.icon})},P.value))}),e[4]=i,e[5]=a,e[6]=r,e[7]=t,e[8]=f.value,e[9]=h):h=e[9];const n=`3px solid ${f.color}`,c=`color-mix(in oklch, ${f.color} 8%, transparent)`;let u;e[10]!==n||e[11]!==c?(u={borderLeft:n,backgroundColor:c},e[10]=n,e[11]=c,e[12]=u):u=e[12];let x;e[13]!==f.color?(x={color:f.color},e[13]=f.color,e[14]=x):x=e[14];let y;e[15]!==f.icon?(y=s.jsx("span",{"aria-hidden":!0,className:"text-sm font-bold leading-none",children:f.icon}),e[15]=f.icon,e[16]=y):y=e[16];let j;e[17]!==i||e[18]!==r||e[19]!==l?(j=P=>r({title:P.target.value,body:i,variant:l}),e[17]=i,e[18]=r,e[19]=l,e[20]=j):j=e[20];let v;e[21]!==o?(v=o("sandbox.mediaBlocks.calloutTitle"),e[21]=o,e[22]=v):v=e[22];let C;e[23]!==f.color?(C={color:f.color},e[23]=f.color,e[24]=C):C=e[24];let k;e[25]!==j||e[26]!==v||e[27]!==C||e[28]!==t?(k=s.jsx("input",{value:t,onChange:j,placeholder:v,className:"flex-1 border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none focus:ring-0",style:C}),e[25]=j,e[26]=v,e[27]=C,e[28]=t,e[29]=k):k=e[29];let N;e[30]!==k||e[31]!==x||e[32]!==y?(N=s.jsxs("div",{className:"mb-1.5 flex items-center gap-2",style:x,children:[y,k]}),e[30]=k,e[31]=x,e[32]=y,e[33]=N):N=e[33];let B;e[34]!==r||e[35]!==t||e[36]!==l?(B=P=>r({title:t,body:P,variant:l}),e[34]=r,e[35]=t,e[36]=l,e[37]=B):B=e[37];let S;e[38]!==o?(S=o("sandbox.mediaBlocks.calloutText"),e[38]=o,e[39]=S):S=e[39];let w;e[40]!==i||e[41]!==B||e[42]!==S?(w=s.jsx(X,{value:i,onChange:B,placeholder:S,className:"text-[15px] leading-relaxed text-foreground"}),e[40]=i,e[41]=B,e[42]=S,e[43]=w):w=e[43];let T;e[44]!==N||e[45]!==w||e[46]!==u?(T=s.jsxs("div",{className:"rounded-md py-4 pl-5 pr-4",style:u,children:[N,w]}),e[44]=N,e[45]=w,e[46]=u,e[47]=T):T=e[47];let I;return e[48]!==T||e[49]!==h?(I=s.jsxs("div",{className:"relative",onFocus:g,onBlur:b,children:[h,T]}),e[48]=T,e[49]=h,e[50]=I):I=e[50],I}function ml(p){const e=E.c(34),{value:t,label:i,description:l,onChange:r}=p,o=F();let a;e[0]!==l||e[1]!==i||e[2]!==r?(a=x=>r({value:x.target.value,label:i,description:l}),e[0]=l,e[1]=i,e[2]=r,e[3]=a):a=e[3];let m;e[4]!==o?(m=o("sandbox.mediaBlocks.statValuePlaceholder"),e[4]=o,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==m||e[8]!==t?(d=s.jsx("input",{value:t,onChange:a,placeholder:m,className:"w-full border-0 bg-transparent p-0 text-center text-4xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[6]=a,e[7]=m,e[8]=t,e[9]=d):d=e[9];let f;e[10]!==l||e[11]!==r||e[12]!==t?(f=x=>r({value:t,label:x.target.value,description:l}),e[10]=l,e[11]=r,e[12]=t,e[13]=f):f=e[13];let g;e[14]!==o?(g=o("sandbox.mediaBlocks.label"),e[14]=o,e[15]=g):g=e[15];let b;e[16]!==i||e[17]!==f||e[18]!==g?(b=s.jsx("input",{value:i,onChange:f,placeholder:g,className:"w-full border-0 bg-transparent p-0 text-center text-xs font-semibold uppercase tracking-wide text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[16]=i,e[17]=f,e[18]=g,e[19]=b):b=e[19];let h;e[20]!==i||e[21]!==r||e[22]!==t?(h=x=>r({value:t,label:i,description:x}),e[20]=i,e[21]=r,e[22]=t,e[23]=h):h=e[23];let n;e[24]!==o?(n=o("sandbox.mediaBlocks.optionalDescription"),e[24]=o,e[25]=n):n=e[25];let c;e[26]!==l||e[27]!==h||e[28]!==n?(c=s.jsx(X,{value:l,onChange:h,placeholder:n,className:"max-w-md text-center text-sm text-muted-foreground"}),e[26]=l,e[27]=h,e[28]=n,e[29]=c):c=e[29];let u;return e[30]!==d||e[31]!==b||e[32]!==c?(u=s.jsxs("div",{className:"flex flex-col items-center gap-1.5 border-y border-border/60 py-8 text-center",children:[d,b,c]}),e[30]=d,e[31]=b,e[32]=c,e[33]=u):u=e[33],u}function pl(p){const e=E.c(21),{cards:t,onChange:i}=p,l=F();let r,o,a,m,d;if(e[0]!==t||e[1]!==i||e[2]!==l){o=ne(t);let h;e[8]!==i?(h=c=>i(JSON.stringify(c)),e[8]=i,e[9]=h):h=e[9],r=h;const n=(c,u)=>r(o.map((x,y)=>y===c?{...x,...u}:x));d="space-y-2",a="grid grid-cols-1 gap-3 sm:grid-cols-3",m=o.slice(0,3).map((c,u)=>s.jsxs("div",{className:"group/item relative flex flex-col gap-2 rounded-lg border bg-card p-4",children:[s.jsx("div",{className:"absolute right-1 top-1",children:s.jsx(te,{label:l("sandbox.listBlocks.removeCard"),onClick:()=>r(o.filter((x,y)=>y!==u))})}),s.jsx("input",{value:A(c.icon),onChange:x=>n(u,{icon:x.target.value}),placeholder:"🎴",className:"flex h-9 w-9 items-center justify-center rounded-md border bg-background text-center text-lg outline-none focus:ring-0"}),s.jsx("input",{value:A(c.title),onChange:x=>n(u,{title:x.target.value}),placeholder:l("sandbox.listBlocks.cardTitle"),className:"border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(X,{value:A(c.body),onChange:x=>n(u,{body:x}),placeholder:l("sandbox.listBlocks.cardBody"),className:"text-sm text-muted-foreground"})]},u)),e[0]=t,e[1]=i,e[2]=l,e[3]=r,e[4]=o,e[5]=a,e[6]=m,e[7]=d}else r=e[3],o=e[4],a=e[5],m=e[6],d=e[7];let f;e[10]!==a||e[11]!==m?(f=s.jsx("div",{className:a,children:m}),e[10]=a,e[11]=m,e[12]=f):f=e[12];let g;e[13]!==r||e[14]!==o||e[15]!==l?(g=o.length<3&&s.jsx(le,{label:l("sandbox.listBlocks.addCard"),onClick:()=>r([...o,{title:"",body:""}])}),e[13]=r,e[14]=o,e[15]=l,e[16]=g):g=e[16];let b;return e[17]!==d||e[18]!==f||e[19]!==g?(b=s.jsxs("div",{className:d,children:[f,g]}),e[17]=d,e[18]=f,e[19]=g,e[20]=b):b=e[20],b}function xl(p){const e=E.c(36),{title:t,items:i,onChange:l}=p,r=F();let o,a,m,d,f;if(e[0]!==i||e[1]!==l||e[2]!==r||e[3]!==t){a=ne(i);let u;e[9]!==l||e[10]!==t?(u=j=>l({title:t,items:JSON.stringify(j)}),e[9]=l,e[10]=t,e[11]=u):u=e[11],o=u,d="space-y-2";let x;e[12]!==i||e[13]!==l?(x=j=>l({title:j.target.value,items:i}),e[12]=i,e[13]=l,e[14]=x):x=e[14];let y;e[15]!==r?(y=r("sandbox.listBlocks.checklistTitle"),e[15]=r,e[16]=y):y=e[16],e[17]!==x||e[18]!==y||e[19]!==t?(f=s.jsx("input",{value:t,onChange:x,placeholder:y,className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[17]=x,e[18]=y,e[19]=t,e[20]=f):f=e[20],m=a.map((j,v)=>s.jsxs("li",{className:"group/item flex items-start gap-3 border-b border-border/50 py-2.5",children:[s.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center text-primary",children:s.jsx(Je,{size:15})}),s.jsx(X,{value:j,onChange:C=>o(a.map((k,N)=>N===v?C:k)),placeholder:r("sandbox.listBlocks.checklistItem"),className:"text-[15px] text-foreground"}),s.jsx(te,{label:r("sandbox.listBlocks.removeItem"),onClick:()=>o(a.filter((C,k)=>k!==v))})]},v)),e[0]=i,e[1]=l,e[2]=r,e[3]=t,e[4]=o,e[5]=a,e[6]=m,e[7]=d,e[8]=f}else o=e[4],a=e[5],m=e[6],d=e[7],f=e[8];let g;e[21]!==m?(g=s.jsx("ul",{children:m}),e[21]=m,e[22]=g):g=e[22];let b;e[23]!==r?(b=r("sandbox.listBlocks.addItem"),e[23]=r,e[24]=b):b=e[24];let h;e[25]!==o||e[26]!==a?(h=()=>o([...a,""]),e[25]=o,e[26]=a,e[27]=h):h=e[27];let n;e[28]!==b||e[29]!==h?(n=s.jsx(le,{label:b,onClick:h}),e[28]=b,e[29]=h,e[30]=n):n=e[30];let c;return e[31]!==d||e[32]!==f||e[33]!==g||e[34]!==n?(c=s.jsxs("div",{className:d,children:[f,g,n]}),e[31]=d,e[32]=f,e[33]=g,e[34]=n,e[35]=c):c=e[35],c}function gl(p){const e=E.c(21),{stats:t,onChange:i}=p,l=F();let r,o,a,m,d;if(e[0]!==i||e[1]!==t||e[2]!==l){o=ne(t);let h;e[8]!==i?(h=c=>i(JSON.stringify(c)),e[8]=i,e[9]=h):h=e[9],r=h;const n=(c,u)=>r(o.map((x,y)=>y===c?{...x,...u}:x));d="space-y-2",a="grid grid-cols-1 gap-3 sm:grid-cols-3",m=o.slice(0,3).map((c,u)=>s.jsxs("div",{className:"group/item relative rounded-lg border p-5 text-center",children:[s.jsx("div",{className:"absolute right-1 top-1",children:s.jsx(te,{label:l("sandbox.listBlocks.removeStat"),onClick:()=>r(o.filter((x,y)=>y!==u))})}),s.jsx("input",{value:A(c.value),onChange:x=>n(u,{value:x.target.value}),placeholder:l("sandbox.listBlocks.statValuePlaceholder"),className:"w-full border-0 bg-transparent p-0 text-center text-3xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),s.jsx("input",{value:A(c.label),onChange:x=>n(u,{label:x.target.value}),placeholder:l("sandbox.listBlocks.label"),className:"mt-1 w-full border-0 bg-transparent p-0 text-center text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"})]},u)),e[0]=i,e[1]=t,e[2]=l,e[3]=r,e[4]=o,e[5]=a,e[6]=m,e[7]=d}else r=e[3],o=e[4],a=e[5],m=e[6],d=e[7];let f;e[10]!==a||e[11]!==m?(f=s.jsx("div",{className:a,children:m}),e[10]=a,e[11]=m,e[12]=f):f=e[12];let g;e[13]!==r||e[14]!==o||e[15]!==l?(g=o.length<3&&s.jsx(le,{label:l("sandbox.listBlocks.addStat"),onClick:()=>r([...o,{value:"",label:""}])}),e[13]=r,e[14]=o,e[15]=l,e[16]=g):g=e[16];let b;return e[17]!==d||e[18]!==f||e[19]!==g?(b=s.jsxs("div",{className:d,children:[f,g]}),e[17]=d,e[18]=f,e[19]=g,e[20]=b):b=e[20],b}function hl(p){const e=E.c(38),{title:t,steps:i,onChange:l}=p,r=F();let o,a,m,d,f,g;if(e[0]!==l||e[1]!==i||e[2]!==r||e[3]!==t){a=ne(i);let x;e[10]!==l||e[11]!==t?(x=C=>l({title:t,steps:JSON.stringify(C)}),e[10]=l,e[11]=t,e[12]=x):x=e[12],o=x;const y=(C,k)=>o(a.map((N,B)=>B===C?{...N,...k}:N));f="space-y-2";let j;e[13]!==l||e[14]!==i?(j=C=>l({title:C.target.value,steps:i}),e[13]=l,e[14]=i,e[15]=j):j=e[15];let v;e[16]!==r?(v=r("sandbox.listBlocks.stepsTitle"),e[16]=r,e[17]=v):v=e[17],e[18]!==j||e[19]!==v||e[20]!==t?(g=s.jsx("input",{value:t,onChange:j,placeholder:v,className:"w-full border-0 bg-transparent p-0 text-lg font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[18]=j,e[19]=v,e[20]=t,e[21]=g):g=e[21],m="space-y-3",d=a.map((C,k)=>s.jsxs("li",{className:"group/item flex gap-4",children:[s.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold text-muted-foreground",children:k+1}),s.jsxs("div",{className:"min-w-0 flex-1 space-y-1 pt-0.5",children:[s.jsx("input",{value:A(C.title),onChange:N=>y(k,{title:N.target.value}),placeholder:r("sandbox.listBlocks.stepTitle"),className:"w-full border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(X,{value:A(C.description),onChange:N=>y(k,{description:N}),placeholder:r("sandbox.listBlocks.stepDescription"),className:"text-sm text-muted-foreground"})]}),s.jsx(te,{label:r("sandbox.listBlocks.removeStep"),onClick:()=>o(a.filter((N,B)=>B!==k))})]},k)),e[0]=l,e[1]=i,e[2]=r,e[3]=t,e[4]=o,e[5]=a,e[6]=m,e[7]=d,e[8]=f,e[9]=g}else o=e[4],a=e[5],m=e[6],d=e[7],f=e[8],g=e[9];let b;e[22]!==m||e[23]!==d?(b=s.jsx("ol",{className:m,children:d}),e[22]=m,e[23]=d,e[24]=b):b=e[24];let h;e[25]!==r?(h=r("sandbox.listBlocks.addStep"),e[25]=r,e[26]=h):h=e[26];let n;e[27]!==o||e[28]!==a?(n=()=>o([...a,{title:"",description:""}]),e[27]=o,e[28]=a,e[29]=n):n=e[29];let c;e[30]!==h||e[31]!==n?(c=s.jsx(le,{label:h,onClick:n}),e[30]=h,e[31]=n,e[32]=c):c=e[32];let u;return e[33]!==f||e[34]!==g||e[35]!==b||e[36]!==c?(u=s.jsxs("div",{className:f,children:[g,b,c]}),e[33]=f,e[34]=g,e[35]=b,e[36]=c,e[37]=u):u=e[37],u}function Ie(p,e){try{const t=JSON.parse(p||"{}");return{title:typeof t?.title=="string"?t.title:e,items:Array.isArray(t?.items)?t.items:[]}}catch{return{title:e,items:[]}}}function bl(p){const e=E.c(13),{left:t,right:i,onChange:l}=p,r=F();let o;if(e[0]!==t||e[1]!==l||e[2]!==i||e[3]!==r){const a={left:Ie(t,r("sandbox.listBlocks.optionA")),right:Ie(i,r("sandbox.listBlocks.optionB"))};let m;e[5]!==t||e[6]!==l||e[7]!==i?(m=(h,n)=>l({left:h==="left"?JSON.stringify(n):t,right:h==="right"?JSON.stringify(n):i}),e[5]=t,e[6]=l,e[7]=i,e[8]=m):m=e[8];const d=m;let f;e[9]!==d||e[10]!==r?(f=(h,n,c)=>{const u=n.items??[];return s.jsxs("div",{className:"space-y-2 rounded-lg border p-4",children:[s.jsx("input",{value:A(n.title),onChange:x=>d(h,{...n,title:x.target.value}),placeholder:r("sandbox.listBlocks.columnTitle"),className:"w-full border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx("ul",{className:"space-y-1.5",children:u.map((x,y)=>s.jsxs("li",{className:"group/item flex items-start gap-2",children:[s.jsx("span",{"aria-hidden":!0,className:"mt-0.5 shrink-0 text-sm font-bold",style:{color:c},children:"✓"}),s.jsx(X,{value:x,onChange:j=>d(h,{...n,items:u.map((v,C)=>C===y?j:v)}),placeholder:r("sandbox.listBlocks.item"),className:"text-sm text-foreground"}),s.jsx(te,{label:r("sandbox.listBlocks.removeItem"),onClick:()=>d(h,{...n,items:u.filter((j,v)=>v!==y)})})]},y))}),s.jsx(le,{label:r("sandbox.listBlocks.addItem"),onClick:()=>d(h,{...n,items:[...u,""]})})]})},e[9]=d,e[10]=r,e[11]=f):f=e[11];const g=f;let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=Q("grid grid-cols-1 gap-3 sm:grid-cols-2"),e[12]=b):b=e[12],o=s.jsxs("div",{className:b,children:[g("left",a.left,"oklch(0.65 0.17 150)"),g("right",a.right,"oklch(0.75 0.15 75)")]}),e[0]=t,e[1]=l,e[2]=i,e[3]=r,e[4]=o}else o=e[4];return o}const yl="vtex/loaders/intelligentSearch/productList.ts";function ee(p){return p&&typeof p=="object"&&!Array.isArray(p)?p:null}function xe(p){return typeof p=="string"||typeof p=="number"?String(p):""}function ge(p){const e=ee(p);return!!e&&typeof e.__resolveType=="string"&&"productId"in e}function Qe(p){if(Array.isArray(p))return p.map(i=>xe(ee(i)?.productId));const e=ee(p),t=ee(e?.props);return t&&Array.isArray(t.ids)?t.ids.map(xe):e&&"productId"in e?[xe(e.productId)]:[]}function vl(p){const e=ee(p)??{};return typeof e.__resolveType=="string"?e.__resolveType:yl}function Xe(p,e){if(Array.isArray(p)){const r=p.find(ge);if(r)return e.map((o,a)=>{const m=ee(p[a]);return{...ge(m)?m:{__resolveType:r.__resolveType},productId:o}})}const t=ee(p);if(ge(t)&&!ee(t.props)?.ids)return{...t,productId:e[0]??""};const i=ee(t?.props)??{},l=vl(p);return{...t??{},__resolveType:l,props:{...i,ids:e,simulationBehavior:i.simulationBehavior??"default"}}}const Ze="vtex/loaders/intelligentSearch/productList.ts",jl="vtex/loaders/categories/tree.ts",kl=24;function ie(p){return p&&typeof p=="object"&&!Array.isArray(p)?p:null}function Nl(p){return p.split("/").filter(Boolean).map((t,i)=>`category-${i+1}/${t}`).join("/")}function Cl(p,e){const t=e.trim();if(!t)return[];const i=Ze,l=kl;if(p==="cluster")return[{resolveType:i,props:{collection:t,count:l}}];if(p==="category"){const m=Nl(t);return m?[{resolveType:i,props:{facets:m,count:l}}]:[]}const r=[];/^\d+$/.test(t)&&r.push({resolveType:i,props:{ids:[t]}});const a=t.includes("-")&&!/\s/.test(t)?t.replace(/-+/g," "):t;return r.push({resolveType:i,props:{query:a,count:l}}),r}function Bl(){return{resolveType:jl,props:{}}}function Sl(p){return{resolveType:Ze,props:{ids:p}}}function $e(p){return typeof p=="string"||typeof p=="number"?String(p):""}function et(p){const e=ie(p),t=Array.isArray(p)?p:Array.isArray(e?.products)?e.products:[],i=[],l=new Set;for(const r of t){const o=ie(r);if(!o)continue;const a=$e(o.productID)||$e(o.sku);if(!a||l.has(a))continue;l.add(a);const m=ie(o.isVariantOf),d=typeof m?.name=="string"&&m.name||typeof o.name=="string"&&o.name||a,f=Array.isArray(o.image)?ie(o.image[0]):null,g=typeof f?.url=="string"?f.url:void 0;i.push({id:a,label:d,image:g})}return i}function wl(p){if(typeof p!="string"||!p)return null;let e;try{e=new URL(p,"https://placeholder.invalid").pathname}catch{return null}return e.replace(/^\/+|\/+$/g,"")||null}function Pl(p){const e=[],t=new Set,i=(l,r)=>{const o=ie(l);if(!o)return;const a=typeof o.name=="string"&&o.name?o.name:"",m=a?[...r,a]:r,d=wl(o.url);if(d&&!t.has(d)&&(t.add(d),e.push({path:d,label:m.join(" › ")||d})),Array.isArray(o.children))for(const f of o.children)i(f,m)};if(Array.isArray(p))for(const l of p)i(l,[]);return e}function Tl(p,e,t=50){const i=e.trim().toLowerCase();return(i?p.filter(r=>r.label.toLowerCase().includes(i)||r.path.toLowerCase().includes(i)):p).slice(0,t)}const Il=1e4;async function Ce(p,{resolveType:e,props:t}){const i=await fetch(pt(p),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...t}),signal:AbortSignal.timeout(Il)});if(!i.ok)throw new Error(`Failed to fetch (${i.status})`);return i.json()}function tt(p,e){const t=E.c(20);let i;t[0]!==e?(i=new Set(e.filter(Boolean)),t[0]=e,t[1]=i):i=t[1];let l;t[2]!==i?(l=[...i],t[2]=i,t[3]=l):l=t[3];const r=l;let o;t[4]!==r||t[5]!==p?(o=ve.sandboxInvoke(p?`${p.orgSlug}/${p.virtualMcpId}/${p.branch}`:"none",`blog-products-by-ids:${r.join(",")}`),t[4]=r,t[5]=p,t[6]=o):o=t[6];let a;t[7]!==r||t[8]!==p?(a=()=>Ce(p,Sl(r)).then(et),t[7]=r,t[8]=p,t[9]=a):a=t[9];const m=!!p&&r.length>0;let d;t[10]!==o||t[11]!==a||t[12]!==m?(d={queryKey:o,queryFn:a,enabled:m,staleTime:6e4,retry:1},t[10]=o,t[11]=a,t[12]=m,t[13]=d):d=t[13];const f=je(d);let g;if(t[14]!==f.data){g=new Map;for(const h of f.data??[])g.set(h.id,h);t[14]=f.data,t[15]=g}else g=t[15];let b;return t[16]!==g||t[17]!==f.isError||t[18]!==f.isLoading?(b={byId:g,isLoading:f.isLoading,isError:f.isError},t[16]=g,t[17]=f.isError,t[18]=f.isLoading,t[19]=b):b=t[19],b}const $l=[{id:"search",labelKey:"sandbox.productPickerDialog.modeSearch"},{id:"category",labelKey:"sandbox.productPickerDialog.modeCategory"},{id:"cluster",labelKey:"sandbox.productPickerDialog.modeClusterId"}];async function Ll(p,e){if(e.length===0)return[];const t=await Promise.allSettled(e.map(o=>Ce(p,o))),i=t.filter(o=>o.status==="fulfilled").map(o=>o.value);if(i.length===0){const o=t.find(a=>a.status==="rejected");throw o?o.reason:new Error("Failed to fetch products")}const l=[],r=new Set;for(const o of i)for(const a of et(o))r.has(a.id)||(r.add(a.id),l.push(a));return l}function Le(p){const e=E.c(6),[t,i]=K.useState(""),[l,r]=K.useState(""),o=K.useRef(null);let a;e[0]!==p?(a=f=>{i(f),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r(f),p)},e[0]=p,e[1]=a):a=e[1];const m=a;let d;return e[2]!==l||e[3]!==m||e[4]!==t?(d={value:t,debounced:l,onChange:m},e[2]=l,e[3]=m,e[4]=t,e[5]=d):d=e[5],d}function Al(p){const e=E.c(23),{option:t,selected:i,onToggle:l}=p,r=i?"border-primary/40 bg-primary/5":"border-transparent hover:bg-muted/60";let o;e[0]!==r?(o=Q("flex w-full items-center gap-3 rounded-md border px-2 py-2 text-left transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==t.image?(a=s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:t.image?s.jsx("img",{src:t.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(ke,{size:14,className:"text-muted-foreground"})}),e[2]=t.image,e[3]=a):a=e[3];let m;e[4]!==t.label?(m=s.jsx("span",{className:"line-clamp-2 text-sm",children:t.label}),e[4]=t.label,e[5]=m):m=e[5];let d;e[6]!==t.id?(d=s.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:["ID ",t.id]}),e[6]=t.id,e[7]=d):d=e[7];let f;e[8]!==m||e[9]!==d?(f=s.jsxs("span",{className:"min-w-0 flex-1",children:[m,d]}),e[8]=m,e[9]=d,e[10]=f):f=e[10];const g=i?"border-primary bg-primary text-primary-foreground":"border-border text-transparent";let b;e[11]!==g?(b=Q("flex h-5 w-5 shrink-0 items-center justify-center rounded-full border",g),e[11]=g,e[12]=b):b=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Je,{size:12}),e[13]=h):h=e[13];let n;e[14]!==b?(n=s.jsx("span",{className:b,children:h}),e[14]=b,e[15]=n):n=e[15];let c;return e[16]!==l||e[17]!==i||e[18]!==n||e[19]!==o||e[20]!==a||e[21]!==f?(c=s.jsxs("button",{type:"button",onClick:l,"aria-pressed":i,className:o,children:[a,f,n]}),e[16]=l,e[17]=i,e[18]=n,e[19]=o,e[20]=a,e[21]=f,e[22]=c):c=e[22],c}function lt(p){const e=E.c(9),{query:t,emptyLabel:i,loadingLabel:l}=p,r=F();if(t.isLoading){let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ye,{size:"xs"}),e[0]=a):a=e[0];let m;return e[1]!==l?(m=s.jsxs("div",{className:"flex items-center gap-2 px-2 py-6 text-sm text-muted-foreground",children:[a,l]}),e[1]=l,e[2]=m):m=e[2],m}if(t.isError){let a;e[3]!==r?(a=r("sandbox.productPickerDialog.couldNotLoad"),e[3]=r,e[4]=a):a=e[4];let m;return e[5]!==a?(m=s.jsx("p",{className:"px-2 py-6 text-sm text-muted-foreground",children:a}),e[5]=a,e[6]=m):m=e[6],m}let o;return e[7]!==i?(o=s.jsx("p",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=o):o=e[8],o}function st(p){return`${p.orgSlug}/${p.virtualMcpId}/${p.branch}`}function _l(p){const e=E.c(45),{sandboxRef:t,open:i,selected:l,onSelect:r}=p,o=F(),[a,m]=K.useState("");let d;e[0]!==t?(d=ve.sandboxInvoke(st(t),"blog-category-tree"),e[0]=t,e[1]=d):d=e[1];let f;e[2]!==t?(f=()=>Ce(t,Bl()).then(Pl),e[2]=t,e[3]=f):f=e[3];const g=i&&!l;let b;e[4]!==d||e[5]!==f||e[6]!==g?(b={queryKey:d,queryFn:f,enabled:g,staleTime:6e4,retry:1},e[4]=d,e[5]=f,e[6]=g,e[7]=b):b=e[7];const h=je(b);if(l){let v;e[8]!==r?(v=()=>r(null),e[8]=r,e[9]=v):v=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Bt,{size:14}),e[10]=C):C=e[10];let k;e[11]!==o?(k=o("sandbox.productPickerDialog.categoryLabel"),e[11]=o,e[12]=k):k=e[12];let N;e[13]!==l.label?(N=s.jsx("span",{className:"text-foreground",children:l.label}),e[13]=l.label,e[14]=N):N=e[14];let B;e[15]!==o?(B=o("sandbox.productPickerDialog.change"),e[15]=o,e[16]=B):B=e[16];let S;e[17]!==k||e[18]!==N||e[19]!==B?(S=s.jsxs("span",{className:"truncate",children:[k,N," —",B]}),e[17]=k,e[18]=N,e[19]=B,e[20]=S):S=e[20];let w;return e[21]!==S||e[22]!==v?(w=s.jsxs("button",{type:"button",onClick:v,className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[C,S]}),e[21]=S,e[22]=v,e[23]=w):w=e[23],w}let n,c,u,x;if(e[24]!==a||e[25]!==r||e[26]!==h||e[27]!==o){const v=Tl(h.data??[],a);u="space-y-2";let C;e[32]===Symbol.for("react.memo_cache_sentinel")?(C=N=>m(N.target.value),e[32]=C):C=e[32];let k;e[33]!==o?(k=o("sandbox.productPickerDialog.filterCategoriesPlaceholder"),e[33]=o,e[34]=k):k=e[34],e[35]!==a||e[36]!==k?(x=s.jsx(be,{value:a,onChange:C,placeholder:k,className:"h-9"}),e[35]=a,e[36]=k,e[37]=x):x=e[37],n="h-48 overflow-y-auto rounded-md border",c=v.length===0?s.jsx(lt,{query:h,loadingLabel:o("sandbox.productPickerDialog.loadingCategories"),emptyLabel:o("sandbox.productPickerDialog.noCategories")}):s.jsx("div",{className:"p-1",children:v.map(N=>s.jsx("button",{type:"button",onClick:()=>r(N),className:"block w-full truncate rounded px-2 py-1.5 text-left text-sm hover:bg-muted/60",children:N.label},N.path))}),e[24]=a,e[25]=r,e[26]=h,e[27]=o,e[28]=n,e[29]=c,e[30]=u,e[31]=x}else n=e[28],c=e[29],u=e[30],x=e[31];let y;e[38]!==n||e[39]!==c?(y=s.jsx("div",{className:n,children:c}),e[38]=n,e[39]=c,e[40]=y):y=e[40];let j;return e[41]!==u||e[42]!==x||e[43]!==y?(j=s.jsxs("div",{className:u,children:[x,y]}),e[41]=u,e[42]=x,e[43]=y,e[44]=j):j=e[44],j}function ot(p){const e=E.c(89),{open:t,onOpenChange:i,sandboxRef:l,selectedIds:r,onChange:o,multiple:a}=p,m=a===void 0?!0:a,d=F(),[f,g]=K.useState("search"),b=Le(300),h=Le(300),[n,c]=K.useState(null),u=f==="search"?b.debounced:f==="cluster"?h.debounced:n?.path??"";let x;e[0]!==f||e[1]!==u?(x=Cl(f,u),e[0]=f,e[1]=u,e[2]=x):x=e[2];const y=x;let j;e[3]!==f||e[4]!==l||e[5]!==u?(j=ve.sandboxInvoke(st(l),`blog-product:${f}:${u}`),e[3]=f,e[4]=l,e[5]=u,e[6]=j):j=e[6];let v;e[7]!==y||e[8]!==l?(v=()=>Ll(l,y),e[7]=y,e[8]=l,e[9]=v):v=e[9];const C=t&&y.length>0;let k;e[10]!==j||e[11]!==v||e[12]!==C?(k={queryKey:j,queryFn:v,enabled:C,staleTime:6e4,retry:1},e[10]=j,e[11]=v,e[12]=C,e[13]=k):k=e[13];const N=je(k);let B;e[14]!==r?(B=new Set(r.filter(Boolean)),e[14]=r,e[15]=B):B=e[15];const S=B;let w;e[16]!==m||e[17]!==o||e[18]!==S||e[19]!==r?(w=G=>{if(!m){o(S.has(G)?[]:[G]);return}S.has(G)?o(r.filter(it=>it!==G)):o([...r.filter(Boolean),G])},e[16]=m,e[17]=o,e[18]=S,e[19]=r,e[20]=w):w=e[20];const T=w;let I;e[21]!==N.data?(I=N.data??[],e[21]=N.data,e[22]=I):I=e[22];const P=I,$=y.length===0;let O;e[23]!==m||e[24]!==d?(O=d(m?"sandbox.productPickerDialog.addProducts":"sandbox.productPickerDialog.chooseProduct"),e[23]=m,e[24]=d,e[25]=O):O=e[25];let U;e[26]!==O?(U=s.jsx(qt,{className:"border-b border-border px-4 py-3",children:s.jsx(Ht,{className:"text-sm font-medium",children:O})}),e[26]=O,e[27]=U):U=e[27];let H;e[28]!==f||e[29]!==d?(H=$l.map(G=>s.jsx("button",{type:"button",onClick:()=>g(G.id),className:Q("rounded-md px-2.5 py-1 text-sm transition-colors",f===G.id?"bg-muted font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:d(G.labelKey)},G.id)),e[28]=f,e[29]=d,e[30]=H):H=e[30];let V;e[31]!==H?(V=s.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-4 py-2",children:H}),e[31]=H,e[32]=V):V=e[32];let _;e[33]!==f||e[34]!==b||e[35]!==d?(_=f==="search"&&s.jsx(be,{autoFocus:!0,value:b.value,onChange:G=>b.onChange(G.target.value),placeholder:d("sandbox.productPickerDialog.searchProductsPlaceholder"),className:"h-9"}),e[33]=f,e[34]=b,e[35]=d,e[36]=_):_=e[36];let L;e[37]!==h||e[38]!==f||e[39]!==d?(L=f==="cluster"&&s.jsx(be,{autoFocus:!0,value:h.value,onChange:G=>h.onChange(G.target.value),placeholder:d("sandbox.productPickerDialog.clusterIdPlaceholder"),className:"h-9"}),e[37]=h,e[38]=f,e[39]=d,e[40]=L):L=e[40];let D;e[41]!==n||e[42]!==f||e[43]!==t||e[44]!==l?(D=f==="category"&&s.jsx(_l,{sandboxRef:l,open:t,selected:n,onSelect:c}),e[41]=n,e[42]=f,e[43]=t,e[44]=l,e[45]=D):D=e[45];let R;e[46]!==_||e[47]!==L||e[48]!==D?(R=s.jsxs("div",{className:"shrink-0 space-y-2 px-4 py-3",children:[_,L,D]}),e[46]=_,e[47]=L,e[48]=D,e[49]=R):R=e[49];let J;e[50]!==P||e[51]!==N||e[52]!==S||e[53]!==$||e[54]!==d||e[55]!==T?(J=P.length>0?P.map(G=>s.jsx(Al,{option:G,selected:S.has(G.id),onToggle:()=>T(G.id)},G.id)):!$&&s.jsx(lt,{query:N,loadingLabel:d("sandbox.productPickerDialog.loadingProducts"),emptyLabel:d("sandbox.productPickerDialog.noProductsFound")}),e[50]=P,e[51]=N,e[52]=S,e[53]=$,e[54]=d,e[55]=T,e[56]=J):J=e[56];let z;e[57]!==f||e[58]!==$||e[59]!==d?(z=$&&s.jsx("p",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:d(f==="category"?"sandbox.productPickerDialog.pickCategoryPrompt":f==="cluster"?"sandbox.productPickerDialog.enterClusterPrompt":"sandbox.productPickerDialog.typeToSearchPrompt")}),e[57]=f,e[58]=$,e[59]=d,e[60]=z):z=e[60];let M;e[61]!==J||e[62]!==z?(M=s.jsxs("div",{className:"min-h-0 flex-1 space-y-1 overflow-y-auto border-t border-border px-3 py-2",children:[J,z]}),e[61]=J,e[62]=z,e[63]=M):M=e[63];let q;e[64]!==S.size||e[65]!==d?(q=S.size===0?d("sandbox.productPickerDialog.noneSelected"):d("sandbox.productPickerDialog.selectedCount",{count:String(S.size)}),e[64]=S.size,e[65]=d,e[66]=q):q=e[66];let Y;e[67]!==q?(Y=s.jsx("span",{className:"text-xs text-muted-foreground",children:q}),e[67]=q,e[68]=Y):Y=e[68];let Z;e[69]!==i?(Z=()=>i(!1),e[69]=i,e[70]=Z):Z=e[70];let W;e[71]!==d?(W=d("sandbox.productPickerDialog.done"),e[71]=d,e[72]=W):W=e[72];let se;e[73]!==Z||e[74]!==W?(se=s.jsx(at,{size:"sm",onClick:Z,children:W}),e[73]=Z,e[74]=W,e[75]=se):se=e[75];let oe;e[76]!==Y||e[77]!==se?(oe=s.jsxs("div",{className:"flex shrink-0 items-center justify-between border-t border-border px-4 py-3",children:[Y,se]}),e[76]=Y,e[77]=se,e[78]=oe):oe=e[78];let re;e[79]!==U||e[80]!==V||e[81]!==R||e[82]!==M||e[83]!==oe?(re=s.jsxs(Vt,{className:"flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[560px] sm:max-w-[560px]",children:[U,V,R,M,oe]}),e[79]=U,e[80]=V,e[81]=R,e[82]=M,e[83]=oe,e[84]=re):re=e[84];let ce;return e[85]!==i||e[86]!==t||e[87]!==re?(ce=s.jsx(Mt,{open:t,onOpenChange:i,children:re}),e[85]=i,e[86]=t,e[87]=re,e[88]=ce):ce=e[88],ce}const El=["normal","h1","h2","h3"],Dl=/^<(h[1-3])>([\s\S]*)<\/\1>$/i;function Rl(p){const e=p.match(Dl);return e?{level:e[1].toLowerCase(),text:e[2]}:{level:"normal",text:p}}function Ae(p,e){return e?p==="normal"?e:`<${p}>${e}</${p}>`:""}const _e={normal:"sandbox.productBlocks.headingNormal",h1:"sandbox.productBlocks.headingH1",h2:"sandbox.productBlocks.headingH2",h3:"sandbox.productBlocks.headingH3"},Ol={normal:"text-lg font-semibold",h1:"text-3xl font-bold",h2:"text-2xl font-bold",h3:"text-xl font-semibold"};function zl(p){const e=E.c(27),{value:t,onChange:i}=p,l=F();let r,o,a,m,d;e[0]!==i||e[1]!==l||e[2]!==t?({level:r,text:d}=Rl(t),m="space-y-1.5",o="flex items-center gap-0.5",a=El.map(x=>s.jsx(ae,{active:r===x,label:l(_e[x]),onClick:()=>i(Ae(x,d)),children:l(_e[x])},x)),e[0]=i,e[1]=l,e[2]=t,e[3]=r,e[4]=o,e[5]=a,e[6]=m,e[7]=d):(r=e[3],o=e[4],a=e[5],m=e[6],d=e[7]);let f;e[8]!==o||e[9]!==a?(f=s.jsx("div",{className:o,children:a}),e[8]=o,e[9]=a,e[10]=f):f=e[10];let g;e[11]!==r||e[12]!==i?(g=x=>i(Ae(r,x.target.value)),e[11]=r,e[12]=i,e[13]=g):g=e[13];let b;e[14]!==l?(b=l("sandbox.productBlocks.shelfTitlePlaceholder"),e[14]=l,e[15]=b):b=e[15];const h=Ol[r];let n;e[16]!==h?(n=Q("w-full border-0 bg-transparent p-0 outline-none placeholder:text-muted-foreground/50 focus:ring-0",h),e[16]=h,e[17]=n):n=e[17];let c;e[18]!==g||e[19]!==b||e[20]!==n||e[21]!==d?(c=s.jsx("input",{value:d,onChange:g,placeholder:b,className:n}),e[18]=g,e[19]=b,e[20]=n,e[21]=d,e[22]=c):c=e[22];let u;return e[23]!==m||e[24]!==f||e[25]!==c?(u=s.jsxs("div",{className:m,children:[f,c]}),e[23]=m,e[24]=f,e[25]=c,e[26]=u):u=e[26],u}function rt(p){const e=E.c(4),{label:t,onClick:i}=p;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ke,{size:13}),e[0]=l):l=e[0];let r;return e[1]!==t||e[2]!==i?(r=s.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[l,t]}),e[1]=t,e[2]=i,e[3]=r):r=e[3],r}function nt(p){const e=E.c(9),{option:t,loading:i,className:l,iconSize:r}=p,o=r===void 0?18:r;let a;e[0]!==l?(a=Q("flex items-center justify-center overflow-hidden bg-muted text-muted-foreground",l),e[0]=l,e[1]=a):a=e[1];let m;e[2]!==o||e[3]!==i||e[4]!==t?(m=t?.image?s.jsx("img",{src:t.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-contain p-1.5"}):i?s.jsx(Ye,{size:"xs"}):s.jsx(zt,{size:o}),e[2]=o,e[3]=i,e[4]=t,e[5]=m):m=e[5];let d;return e[6]!==a||e[7]!==m?(d=s.jsx("span",{className:a,children:m}),e[6]=a,e[7]=m,e[8]=d):d=e[8],d}function Fl(p){const e=E.c(50),{id:t,option:i,loading:l,onRemove:r}=p,o=F();let a;e[0]!==t?(a={id:t},e[0]=t,e[1]=a):a=e[1];const{attributes:m,listeners:d,setNodeRef:f,transform:g,transition:b,isDragging:h}=Ve(a);let n;e[2]!==g?(n=Me.Transform.toString(g),e[2]=g,e[3]=n):n=e[3];let c;e[4]!==n||e[5]!==b?(c={transform:n,transition:b},e[4]=n,e[5]=b,e[6]=c):c=e[6];const u=h&&"z-10 opacity-60";let x;e[7]!==u?(x=Q("group/card relative flex flex-col overflow-hidden rounded-md border bg-background",u),e[7]=u,e[8]=x):x=e[8];let y;e[9]!==l||e[10]!==i?(y=s.jsx(nt,{option:i,loading:l,className:"h-full w-full"}),e[9]=l,e[10]=i,e[11]=y):y=e[11];let j;e[12]!==o?(j=o("sandbox.productBlocks.dragToReorderLabel"),e[12]=o,e[13]=j):j=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ge,{size:13}),e[14]=v):v=e[14];let C;e[15]!==m||e[16]!==d||e[17]!==j?(C=s.jsx("button",{type:"button","aria-label":j,...m,...d,className:"absolute left-1 top-1 flex h-6 w-6 cursor-grab items-center justify-center rounded bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-foreground active:cursor-grabbing group-hover/card:opacity-100",children:v}),e[15]=m,e[16]=d,e[17]=j,e[18]=C):C=e[18];let k;e[19]!==o?(k=o("sandbox.productBlocks.removeProductLabel"),e[19]=o,e[20]=k):k=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ut,{size:13}),e[21]=N):N=e[21];let B;e[22]!==r||e[23]!==k?(B=s.jsx("button",{type:"button","aria-label":k,onClick:r,className:"absolute right-1 top-1 flex h-6 w-6 items-center justify-center rounded bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-destructive group-hover/card:opacity-100 cursor-pointer",children:N}),e[22]=r,e[23]=k,e[24]=B):B=e[24];let S;e[25]!==B||e[26]!==y||e[27]!==C?(S=s.jsxs("div",{className:"relative aspect-square",children:[y,C,B]}),e[25]=B,e[26]=y,e[27]=C,e[28]=S):S=e[28];let w;e[29]!==t||e[30]!==l||e[31]!==i?.label||e[32]!==o?(w=i?.label??(l?o("sandbox.productBlocks.loadingEllipsis"):o("sandbox.productBlocks.productWithId",{id:t})),e[29]=t,e[30]=l,e[31]=i?.label,e[32]=o,e[33]=w):w=e[33];let T;e[34]!==w?(T=s.jsx("p",{className:"line-clamp-2 text-xs leading-tight text-foreground",children:w}),e[34]=w,e[35]=T):T=e[35];let I;e[36]!==t||e[37]!==o?(I=o("sandbox.productBlocks.idLabel",{id:t}),e[36]=t,e[37]=o,e[38]=I):I=e[38];let P;e[39]!==I?(P=s.jsx("p",{className:"text-[11px] text-muted-foreground",children:I}),e[39]=I,e[40]=P):P=e[40];let $;e[41]!==T||e[42]!==P?($=s.jsxs("div",{className:"flex flex-col gap-0.5 p-2",children:[T,P]}),e[41]=T,e[42]=P,e[43]=$):$=e[43];let O;return e[44]!==f||e[45]!==S||e[46]!==$||e[47]!==c||e[48]!==x?(O=s.jsxs("div",{ref:f,style:c,className:x,children:[S,$]}),e[44]=f,e[45]=S,e[46]=$,e[47]=c,e[48]=x,e[49]=O):O=e[49],O}function Ul(p){const e=E.c(21),{ids:t,lookup:i,onReorder:l,onRemove:r}=p;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={activationConstraint:{distance:6}},e[0]=o):o=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={coordinateGetter:ze},e[1]=a):a=e[1];const m=De(ue(Oe,o),ue(Re,a));let d;e[2]!==t||e[3]!==l?(d=c=>{const{active:u,over:x}=c;if(!x||u.id===x.id)return;const y=t.indexOf(String(u.id)),j=t.indexOf(String(x.id));y===-1||j===-1||l(Fe(t,y,j))},e[2]=t,e[3]=l,e[4]=d):d=e[4];const f=d;let g;if(e[5]!==t||e[6]!==i||e[7]!==r){let c;e[9]!==i||e[10]!==r?(c=u=>s.jsx(Fl,{id:u,option:i.byId.get(u),loading:i.isLoading&&!i.byId.get(u),onRemove:()=>r(u)},u),e[9]=i,e[10]=r,e[11]=c):c=e[11],g=t.map(c),e[5]=t,e[6]=i,e[7]=r,e[8]=g}else g=e[8];let b;e[12]!==g?(b=s.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:g}),e[12]=g,e[13]=b):b=e[13];let h;e[14]!==t||e[15]!==b?(h=s.jsx(Ue,{items:t,strategy:ut,children:b}),e[14]=t,e[15]=b,e[16]=h):h=e[16];let n;return e[17]!==f||e[18]!==m||e[19]!==h?(n=s.jsx(qe,{sensors:m,collisionDetection:He,onDragEnd:f,children:h}),e[17]=f,e[18]=m,e[19]=h,e[20]=n):n=e[20],n}function ql(p){const e=E.c(13),{onBrowse:t}=p,i=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(Ft,{size:16})}),e[0]=l):l=e[0];let r;e[1]!==i?(r=i("sandbox.productBlocks.addProductsButton"),e[1]=i,e[2]=r):r=e[2];let o;e[3]!==r?(o=s.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),e[3]=r,e[4]=o):o=e[4];let a;e[5]!==i?(a=i("sandbox.productBlocks.addProductsDescription"),e[5]=i,e[6]=a):a=e[6];let m;e[7]!==a?(m=s.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[7]=a,e[8]=m):m=e[8];let d;return e[9]!==t||e[10]!==o||e[11]!==m?(d=s.jsxs("button",{type:"button",onClick:t,className:"flex w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed py-8 text-center transition-colors hover:border-foreground/30 hover:bg-muted/40 cursor-pointer",children:[l,o,m]}),e[9]=t,e[10]=o,e[11]=m,e[12]=d):d=e[12],d}function Hl(p){const e=E.c(30),{ids:t,onChange:i}=p,l=F();let r;e[0]!==t||e[1]!==i?(r=(u,x)=>i(t.map((y,j)=>j===u?x:y)),e[0]=t,e[1]=i,e[2]=r):r=e[2];const o=r;let a;e[3]!==l?(a=l("sandbox.productBlocks.vtexProductIds"),e[3]=l,e[4]=a):a=e[4];let m;e[5]!==a?(m=s.jsx(de,{className:"text-xs text-muted-foreground",children:a}),e[5]=a,e[6]=m):m=e[6];let d;e[7]!==t.length||e[8]!==l?(d=t.length===0&&s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.productBlocks.startDevServerDescription")}),e[7]=t.length,e[8]=l,e[9]=d):d=e[9];let f;e[10]!==t||e[11]!==i||e[12]!==o||e[13]!==l?(f=t.map((u,x)=>s.jsxs("li",{className:"group/item flex items-center gap-3",children:[s.jsx("input",{value:u,onChange:y=>o(x,y.target.value),placeholder:l("sandbox.productBlocks.skuIdPlaceholder"),className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(te,{label:l("sandbox.productBlocks.removeProductIdButton"),onClick:()=>i(t.filter((y,j)=>j!==x))})]},x)),e[10]=t,e[11]=i,e[12]=o,e[13]=l,e[14]=f):f=e[14];let g;e[15]!==f?(g=s.jsx("ul",{className:"space-y-2",children:f}),e[15]=f,e[16]=g):g=e[16];let b;e[17]!==l?(b=l("sandbox.productBlocks.addProductIdButton"),e[17]=l,e[18]=b):b=e[18];let h;e[19]!==t||e[20]!==i?(h=()=>i([...t,""]),e[19]=t,e[20]=i,e[21]=h):h=e[21];let n;e[22]!==b||e[23]!==h?(n=s.jsx(le,{label:b,onClick:h}),e[22]=b,e[23]=h,e[24]=n):n=e[24];let c;return e[25]!==m||e[26]!==d||e[27]!==g||e[28]!==n?(c=s.jsxs("div",{className:"space-y-2",children:[m,d,g,n]}),e[25]=m,e[26]=d,e[27]=g,e[28]=n,e[29]=c):c=e[29],c}function Vl(p){const e=E.c(32),{block:t,onChange:i,sandboxRef:l}=p,r=F();let o,a;e[0]!==t.products?(o=Qe(t.products),a=new Set(o.filter(Boolean)),e[0]=t.products,e[1]=o,e[2]=a):(o=e[1],a=e[2]);let m;e[3]!==a?(m=[...a],e[3]=a,e[4]=m):m=e[4];const d=m,[f,g]=K.useState(!1),b=tt(l,d);let h;e[5]!==t||e[6]!==i?(h=C=>i({...t,products:Xe(t.products,C)}),e[5]=t,e[6]=i,e[7]=h):h=e[7];const n=h;let c;e[8]!==t.title?(c=A(t.title),e[8]=t.title,e[9]=c):c=e[9];let u;e[10]!==t||e[11]!==i?(u=C=>i({...t,title:C}),e[10]=t,e[11]=i,e[12]=u):u=e[12];let x;e[13]!==c||e[14]!==u?(x=s.jsx(zl,{value:c,onChange:u}),e[13]=c,e[14]=u,e[15]=x):x=e[15];let y;e[16]!==d||e[17]!==b||e[18]!==o||e[19]!==l||e[20]!==n||e[21]!==r?(y=l?s.jsxs("div",{className:"space-y-3",children:[d.length>0&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[d.length," ",r(d.length===1?"sandbox.productBlocks.productSingular":"sandbox.productBlocks.productPlural")]}),s.jsx(rt,{label:r("sandbox.productBlocks.browseProductsButton"),onClick:()=>g(!0)})]}),d.length===0?s.jsx(ql,{onBrowse:()=>g(!0)}):s.jsx(Ul,{ids:d,lookup:b,onReorder:n,onRemove:C=>n(d.filter(k=>k!==C))})]}):s.jsx(Hl,{ids:o,onChange:n}),e[16]=d,e[17]=b,e[18]=o,e[19]=l,e[20]=n,e[21]=r,e[22]=y):y=e[22];let j;e[23]!==d||e[24]!==f||e[25]!==l||e[26]!==n?(j=l&&s.jsx(ot,{open:f,onOpenChange:g,sandboxRef:l,selectedIds:d,onChange:n}),e[23]=d,e[24]=f,e[25]=l,e[26]=n,e[27]=j):j=e[27];let v;return e[28]!==x||e[29]!==y||e[30]!==j?(v=s.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[x,y,j]}),e[28]=x,e[29]=y,e[30]=j,e[31]=v):v=e[31],v}function Ml(p){const e=E.c(27),{id:t,option:i,loading:l,onRemove:r}=p,o=F();let a;e[0]!==l||e[1]!==i?(a=s.jsx(nt,{option:i,loading:l,className:"h-11 w-11 shrink-0 rounded",iconSize:16}),e[0]=l,e[1]=i,e[2]=a):a=e[2];let m;e[3]!==t||e[4]!==l||e[5]!==i?.label||e[6]!==o?(m=i?.label??(l?o("sandbox.productBlocks.loadingEllipsis"):o("sandbox.productBlocks.productWithId",{id:t})),e[3]=t,e[4]=l,e[5]=i?.label,e[6]=o,e[7]=m):m=e[7];let d;e[8]!==m?(d=s.jsx("p",{className:"truncate text-sm text-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let f;e[10]!==t||e[11]!==o?(f=o("sandbox.productBlocks.idLabel",{id:t}),e[10]=t,e[11]=o,e[12]=f):f=e[12];let g;e[13]!==f?(g=s.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=g):g=e[14];let b;e[15]!==d||e[16]!==g?(b=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,g]}),e[15]=d,e[16]=g,e[17]=b):b=e[17];let h;e[18]!==o?(h=o("sandbox.productBlocks.removeProductButton"),e[18]=o,e[19]=h):h=e[19];let n;e[20]!==r||e[21]!==h?(n=s.jsx(te,{label:h,onClick:r}),e[20]=r,e[21]=h,e[22]=n):n=e[22];let c;return e[23]!==a||e[24]!==b||e[25]!==n?(c=s.jsxs("div",{className:"group/item flex items-center gap-3 rounded-md border bg-background p-2",children:[a,b,n]}),e[23]=a,e[24]=b,e[25]=n,e[26]=c):c=e[26],c}function Gl(p){const e=E.c(78),{block:t,onChange:i,sandboxRef:l}=p,r=F();let o;e[0]!==t.product?(o=Qe(t.product).filter(Boolean)[0]??"",e[0]=t.product,e[1]=o):o=e[1];const a=o,[m,d]=K.useState(!1);let f;e[2]!==a?(f=a?[a]:[],e[2]=a,e[3]=f):f=e[3];const g=tt(l,f);let b;e[4]!==t||e[5]!==i?(b=R=>i({...t,product:Xe(t.product,R)}),e[4]=t,e[5]=i,e[6]=b):b=e[6];const h=b;let n;e[7]!==r?(n=r("sandbox.productBlocks.productCardLabel"),e[7]=r,e[8]=n):n=e[8];let c;e[9]!==n?(c=s.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:n}),e[9]=n,e[10]=c):c=e[10];let u;e[11]!==r?(u=r("sandbox.productBlocks.ctaLabelField"),e[11]=r,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx(de,{htmlFor:"product-card-cta",className:"text-xs text-muted-foreground",children:u}),e[13]=u,e[14]=x):x=e[14];let y;e[15]!==t.textCta?(y=A(t.textCta),e[15]=t.textCta,e[16]=y):y=e[16];let j;e[17]!==t||e[18]!==i?(j=R=>i({...t,textCta:R.target.value}),e[17]=t,e[18]=i,e[19]=j):j=e[19];let v;e[20]!==r?(v=r("sandbox.productBlocks.ctaLabelPlaceholder"),e[20]=r,e[21]=v):v=e[21];let C;e[22]!==v||e[23]!==y||e[24]!==j?(C=s.jsx("input",{id:"product-card-cta",value:y,onChange:j,placeholder:v,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[22]=v,e[23]=y,e[24]=j,e[25]=C):C=e[25];let k;e[26]!==C||e[27]!==x?(k=s.jsxs("div",{className:"space-y-2",children:[x,C]}),e[26]=C,e[27]=x,e[28]=k):k=e[28];let N;e[29]!==r?(N=r("sandbox.productBlocks.productSlugField"),e[29]=r,e[30]=N):N=e[30];let B;e[31]!==N?(B=s.jsx(de,{htmlFor:"product-card-slug",className:"text-xs text-muted-foreground",children:N}),e[31]=N,e[32]=B):B=e[32];let S;e[33]!==t.productSlug?(S=A(t.productSlug),e[33]=t.productSlug,e[34]=S):S=e[34];let w;e[35]!==t||e[36]!==i?(w=R=>i({...t,productSlug:R.target.value}),e[35]=t,e[36]=i,e[37]=w):w=e[37];let T;e[38]!==r?(T=r("sandbox.productBlocks.productSlugPlaceholder"),e[38]=r,e[39]=T):T=e[39];let I;e[40]!==S||e[41]!==w||e[42]!==T?(I=s.jsx("input",{id:"product-card-slug",value:S,onChange:w,placeholder:T,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[40]=S,e[41]=w,e[42]=T,e[43]=I):I=e[43];let P;e[44]!==B||e[45]!==I?(P=s.jsxs("div",{className:"space-y-2",children:[B,I]}),e[44]=B,e[45]=I,e[46]=P):P=e[46];let $;e[47]!==r?($=r("sandbox.productBlocks.productField"),e[47]=r,e[48]=$):$=e[48];let O;e[49]!==$?(O=s.jsx(de,{className:"text-xs text-muted-foreground",children:$}),e[49]=$,e[50]=O):O=e[50];let U;e[51]!==a||e[52]!==l||e[53]!==r?(U=l&&a&&s.jsx(rt,{label:r("sandbox.productBlocks.changeButton"),onClick:()=>d(!0)}),e[51]=a,e[52]=l,e[53]=r,e[54]=U):U=e[54];let H;e[55]!==O||e[56]!==U?(H=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[O,U]}),e[55]=O,e[56]=U,e[57]=H):H=e[57];let V;e[58]!==g||e[59]!==a||e[60]!==l||e[61]!==h||e[62]!==r?(V=l?a?s.jsx(Ml,{id:a,option:g.byId.get(a),loading:g.isLoading,onRemove:()=>h([])}):s.jsxs("button",{type:"button",onClick:()=>d(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-md border border-dashed py-3 text-sm text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[s.jsx(ke,{size:14}),r("sandbox.productBlocks.chooseProductButton")]}):s.jsx("input",{value:a,onChange:R=>h(R.target.value?[R.target.value]:[]),placeholder:r("sandbox.productBlocks.vtexProductIdPlaceholder"),className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[58]=g,e[59]=a,e[60]=l,e[61]=h,e[62]=r,e[63]=V):V=e[63];let _;e[64]!==H||e[65]!==V?(_=s.jsxs("div",{className:"space-y-2",children:[H,V]}),e[64]=H,e[65]=V,e[66]=_):_=e[66];let L;e[67]!==m||e[68]!==a||e[69]!==l||e[70]!==h?(L=l&&s.jsx(ot,{open:m,onOpenChange:d,sandboxRef:l,selectedIds:a?[a]:[],onChange:h,multiple:!1}),e[67]=m,e[68]=a,e[69]=l,e[70]=h,e[71]=L):L=e[71];let D;return e[72]!==k||e[73]!==P||e[74]!==_||e[75]!==L||e[76]!==c?(D=s.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[c,k,P,_,L]}),e[72]=k,e[73]=P,e[74]=_,e[75]=L,e[76]=c,e[77]=D):D=e[77],D}const Kl=2,Jl=2;function Yl(p){return ne(p).map(A)}function Wl(p){return ne(p).map(e=>Array.isArray(e)?e.map(A):[])}function Ee(p){return Array.from({length:p},()=>"")}function Ql(p){const e=E.c(42),{headers:t,rows:i,onChange:l}=p;let r,o,a,m,d,f,g,b,h;if(e[0]!==t||e[1]!==l||e[2]!==i){const N=Yl(t),B=Wl(i),S=N.length===0&&B.length===0;a=S?Kl:Math.max(N.length,...B.map(es),1);const w=Array.from({length:a},(_,L)=>N[L]??"");m=S?Array.from({length:Jl},()=>Ee(a)):B.map(_=>Array.from({length:a},(L,D)=>_[D]??""));let T;e[12]!==l?(T=(_,L)=>l({headers:JSON.stringify(_.some(Zl)?_:[]),rows:JSON.stringify(L)}),e[12]=l,e[13]=T):T=e[13];const I=T,P=(_,L)=>I(w.map((D,R)=>R===_?L:D),m),$=(_,L,D)=>I(w,m.map((R,J)=>J===_?R.map((z,M)=>M===L?D:z):R));o=()=>I(w,[...m,Ee(a)]);const O=_=>I(w,m.filter((L,D)=>D!==_));r=()=>I([...w,""],m.map(Xl));const U=_=>I(w.filter((L,D)=>D!==_),m.map(L=>L.filter((D,R)=>R!==_)));h="space-y-2",b="overflow-x-auto rounded-lg border",f="w-full border-collapse";let H;e[14]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx("th",{className:"w-8 border-b"}),e[14]=H):H=e[14];const V=s.jsxs("tr",{className:"bg-muted/40",children:[w.map((_,L)=>s.jsxs("th",{className:"group/col relative border-b border-r p-0 last:border-r-0",children:[s.jsx("input",{value:_,onChange:D=>P(L,D.target.value),placeholder:`Header ${L+1}`,className:"w-full border-0 bg-transparent py-2 pl-7 pr-3 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/40 focus:bg-background focus:ring-0"}),a>1&&s.jsx("button",{type:"button","aria-label":`Remove column ${L+1}`,onClick:()=>U(L),className:"absolute left-0.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded text-muted-foreground/50 opacity-0 transition-opacity hover:text-destructive group-hover/col:opacity-100 cursor-pointer",children:s.jsx(he,{size:12})})]},L)),H]});e[15]!==V?(g=s.jsx("thead",{children:V}),e[15]=V,e[16]=g):g=e[16],d=m.map((_,L)=>s.jsxs("tr",{className:"group/item border-b last:border-b-0",children:[_.map((D,R)=>s.jsx("td",{className:"border-r p-0 last:border-r-0",children:s.jsx("input",{value:D,onChange:J=>$(L,R,J.target.value),placeholder:"—",className:"w-full border-0 bg-transparent px-3 py-2 text-sm outline-none placeholder:text-muted-foreground/30 focus:bg-muted/30 focus:ring-0"})},R)),s.jsx("td",{className:"w-8 text-center align-middle",children:m.length>1&&s.jsx("button",{type:"button","aria-label":`Remove row ${L+1}`,onClick:()=>O(L),className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s.jsx(he,{size:13})})})]},L)),e[0]=t,e[1]=l,e[2]=i,e[3]=r,e[4]=o,e[5]=a,e[6]=m,e[7]=d,e[8]=f,e[9]=g,e[10]=b,e[11]=h}else r=e[3],o=e[4],a=e[5],m=e[6],d=e[7],f=e[8],g=e[9],b=e[10],h=e[11];let n;e[17]!==a||e[18]!==m.length?(n=m.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:a+1,className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No rows yet — add one below."})}),e[17]=a,e[18]=m.length,e[19]=n):n=e[19];let c;e[20]!==d||e[21]!==n?(c=s.jsxs("tbody",{children:[d,n]}),e[20]=d,e[21]=n,e[22]=c):c=e[22];let u;e[23]!==f||e[24]!==g||e[25]!==c?(u=s.jsxs("table",{className:f,children:[g,c]}),e[23]=f,e[24]=g,e[25]=c,e[26]=u):u=e[26];let x;e[27]!==b||e[28]!==u?(x=s.jsx("div",{className:b,children:u}),e[27]=b,e[28]=u,e[29]=x):x=e[29];let y;e[30]!==o?(y=s.jsx(le,{label:"Add row",onClick:o}),e[30]=o,e[31]=y):y=e[31];let j;e[32]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ke,{size:13}),e[32]=j):j=e[32];let v;e[33]!==r?(v=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[j,"Add column"]}),e[33]=r,e[34]=v):v=e[34];let C;e[35]!==y||e[36]!==v?(C=s.jsxs("div",{className:"flex gap-2",children:[y,v]}),e[35]=y,e[36]=v,e[37]=C):C=e[37];let k;return e[38]!==C||e[39]!==h||e[40]!==x?(k=s.jsxs("div",{className:h,children:[x,C]}),e[38]=C,e[39]=h,e[40]=x,e[41]=k):k=e[41],k}function Xl(p){return[...p,""]}function Zl(p){return p.trim()!==""}function es(p){return p.length}function ts(p){const e=E.c(188),{block:t,meta:i,onChange:l,sandboxRef:r}=p,o=F(),a=t.__resolveType??"",m=xt(a);if(gt(a))switch(m){case"Paragraph":{let n;e[0]!==t.html?(n=A(t.html),e[0]=t.html,e[1]=n):n=e[1];let c;e[2]!==o?(c=o("sandbox.blockRegistry.writeSomethingPlaceholder"),e[2]=o,e[3]=c):c=e[3];let u;e[4]!==t||e[5]!==l?(u=y=>l({...t,html:y}),e[4]=t,e[5]=l,e[6]=u):u=e[6];let x;return e[7]!==n||e[8]!==c||e[9]!==u?(x=s.jsx(tl,{html:n,placeholder:c,onChange:u}),e[7]=n,e[8]=c,e[9]=u,e[10]=x):x=e[10],x}case"Heading":{let n;e[11]!==t.text?(n=A(t.text),e[11]=t.text,e[12]=n):n=e[12];let c;e[13]!==t.level?(c=A(t.level),e[13]=t.level,e[14]=c):c=e[14];let u;e[15]!==t||e[16]!==l?(u=y=>l({...t,...y}),e[15]=t,e[16]=l,e[17]=u):u=e[17];let x;return e[18]!==n||e[19]!==c||e[20]!==u?(x=s.jsx(sl,{text:n,level:c,onChange:u}),e[18]=n,e[19]=c,e[20]=u,e[21]=x):x=e[21],x}case"Quote":{let n;e[22]!==t.quote?(n=A(t.quote),e[22]=t.quote,e[23]=n):n=e[23];let c;e[24]!==t||e[25]!==l?(c=x=>l({...t,quote:x}),e[24]=t,e[25]=l,e[26]=c):c=e[26];let u;return e[27]!==n||e[28]!==c?(u=s.jsx(ol,{quote:n,onChange:c}),e[27]=n,e[28]=c,e[29]=u):u=e[29],u}case"Code":{let n;e[30]!==t.code?(n=A(t.code),e[30]=t.code,e[31]=n):n=e[31];let c;e[32]!==t.language?(c=A(t.language),e[32]=t.language,e[33]=c):c=e[33];let u;e[34]!==t||e[35]!==l?(u=y=>l({...t,...y}),e[34]=t,e[35]=l,e[36]=u):u=e[36];let x;return e[37]!==n||e[38]!==c||e[39]!==u?(x=s.jsx(rl,{code:n,language:c,onChange:u}),e[37]=n,e[38]=c,e[39]=u,e[40]=x):x=e[40],x}case"List":{let n;e[41]!==t.items?(n=A(t.items),e[41]=t.items,e[42]=n):n=e[42];let c;e[43]!==t.style?(c=A(t.style),e[43]=t.style,e[44]=c):c=e[44];let u;e[45]!==t||e[46]!==l?(u=y=>l({...t,...y}),e[45]=t,e[46]=l,e[47]=u):u=e[47];let x;return e[48]!==n||e[49]!==c||e[50]!==u?(x=s.jsx(nl,{items:n,style:c,onChange:u}),e[48]=n,e[49]=c,e[50]=u,e[51]=x):x=e[51],x}case"BlockImage":{let n;return e[52]!==t||e[53]!==l?(n=s.jsx(il,{block:t,onChange:l}),e[52]=t,e[53]=l,e[54]=n):n=e[54],n}case"Video":{let n;e[55]!==t.url?(n=A(t.url),e[55]=t.url,e[56]=n):n=e[56];let c;e[57]!==t.caption?(c=A(t.caption),e[57]=t.caption,e[58]=c):c=e[58];let u;e[59]!==t||e[60]!==l?(u=y=>l({...t,...y}),e[59]=t,e[60]=l,e[61]=u):u=e[61];let x;return e[62]!==n||e[63]!==c||e[64]!==u?(x=s.jsx(cl,{url:n,caption:c,onChange:u}),e[62]=n,e[63]=c,e[64]=u,e[65]=x):x=e[65],x}case"Divider":{let n;return e[66]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(dl,{}),e[66]=n):n=e[66],n}case"Cta":{let n;e[67]!==t.text?(n=A(t.text),e[67]=t.text,e[68]=n):n=e[68];let c;e[69]!==t.href?(c=A(t.href),e[69]=t.href,e[70]=c):c=e[70];let u;e[71]!==t||e[72]!==l?(u=y=>l({...t,...y}),e[71]=t,e[72]=l,e[73]=u):u=e[73];let x;return e[74]!==n||e[75]!==c||e[76]!==u?(x=s.jsx(ul,{text:n,href:c,onChange:u}),e[74]=n,e[75]=c,e[76]=u,e[77]=x):x=e[77],x}case"Callout":{let n;e[78]!==t.title?(n=A(t.title),e[78]=t.title,e[79]=n):n=e[79];let c;e[80]!==t.body?(c=A(t.body),e[80]=t.body,e[81]=c):c=e[81];let u;e[82]!==t.variant?(u=A(t.variant),e[82]=t.variant,e[83]=u):u=e[83];let x;e[84]!==t||e[85]!==l?(x=j=>l({...t,...j}),e[84]=t,e[85]=l,e[86]=x):x=e[86];let y;return e[87]!==n||e[88]!==c||e[89]!==u||e[90]!==x?(y=s.jsx(fl,{title:n,body:c,variant:u,onChange:x}),e[87]=n,e[88]=c,e[89]=u,e[90]=x,e[91]=y):y=e[91],y}case"Stat":{let n;e[92]!==t.value?(n=A(t.value),e[92]=t.value,e[93]=n):n=e[93];let c;e[94]!==t.label?(c=A(t.label),e[94]=t.label,e[95]=c):c=e[95];let u;e[96]!==t.description?(u=A(t.description),e[96]=t.description,e[97]=u):u=e[97];let x;e[98]!==t||e[99]!==l?(x=j=>l({...t,...j}),e[98]=t,e[99]=l,e[100]=x):x=e[100];let y;return e[101]!==n||e[102]!==c||e[103]!==u||e[104]!==x?(y=s.jsx(ml,{value:n,label:c,description:u,onChange:x}),e[101]=n,e[102]=c,e[103]=u,e[104]=x,e[105]=y):y=e[105],y}case"StatGroup":{let n;e[106]!==t.stats?(n=A(t.stats),e[106]=t.stats,e[107]=n):n=e[107];let c;e[108]!==t||e[109]!==l?(c=x=>l({...t,stats:x}),e[108]=t,e[109]=l,e[110]=c):c=e[110];let u;return e[111]!==n||e[112]!==c?(u=s.jsx(gl,{stats:n,onChange:c}),e[111]=n,e[112]=c,e[113]=u):u=e[113],u}case"CardGroup":{let n;e[114]!==t.cards?(n=typeof t.cards=="string"?t.cards:JSON.stringify(t.cards??[]),e[114]=t.cards,e[115]=n):n=e[115];let c;e[116]!==t||e[117]!==l?(c=x=>l({...t,cards:x}),e[116]=t,e[117]=l,e[118]=c):c=e[118];let u;return e[119]!==n||e[120]!==c?(u=s.jsx(pl,{cards:n,onChange:c}),e[119]=n,e[120]=c,e[121]=u):u=e[121],u}case"Checklist":{let n;e[122]!==t.title?(n=A(t.title),e[122]=t.title,e[123]=n):n=e[123];let c;e[124]!==t.items?(c=A(t.items),e[124]=t.items,e[125]=c):c=e[125];let u;e[126]!==t||e[127]!==l?(u=y=>l({...t,...y}),e[126]=t,e[127]=l,e[128]=u):u=e[128];let x;return e[129]!==n||e[130]!==c||e[131]!==u?(x=s.jsx(xl,{title:n,items:c,onChange:u}),e[129]=n,e[130]=c,e[131]=u,e[132]=x):x=e[132],x}case"Steps":{let n;e[133]!==t.title?(n=A(t.title),e[133]=t.title,e[134]=n):n=e[134];let c;e[135]!==t.steps?(c=A(t.steps),e[135]=t.steps,e[136]=c):c=e[136];let u;e[137]!==t||e[138]!==l?(u=y=>l({...t,...y}),e[137]=t,e[138]=l,e[139]=u):u=e[139];let x;return e[140]!==n||e[141]!==c||e[142]!==u?(x=s.jsx(hl,{title:n,steps:c,onChange:u}),e[140]=n,e[141]=c,e[142]=u,e[143]=x):x=e[143],x}case"Comparison":{let n;e[144]!==t.left?(n=A(t.left),e[144]=t.left,e[145]=n):n=e[145];let c;e[146]!==t.right?(c=A(t.right),e[146]=t.right,e[147]=c):c=e[147];let u;e[148]!==t||e[149]!==l?(u=y=>l({...t,...y}),e[148]=t,e[149]=l,e[150]=u):u=e[150];let x;return e[151]!==n||e[152]!==c||e[153]!==u?(x=s.jsx(bl,{left:n,right:c,onChange:u}),e[151]=n,e[152]=c,e[153]=u,e[154]=x):x=e[154],x}case"Table":{let n;e[155]!==t.headers?(n=typeof t.headers=="string"?t.headers:JSON.stringify(t.headers??[]),e[155]=t.headers,e[156]=n):n=e[156];let c;e[157]!==t.rows?(c=typeof t.rows=="string"?t.rows:JSON.stringify(t.rows??[]),e[157]=t.rows,e[158]=c):c=e[158];let u;e[159]!==t||e[160]!==l?(u=y=>l({...t,...y}),e[159]=t,e[160]=l,e[161]=u):u=e[161];let x;return e[162]!==n||e[163]!==c||e[164]!==u?(x=s.jsx(Ql,{headers:n,rows:c,onChange:u}),e[162]=n,e[163]=c,e[164]=u,e[165]=x):x=e[165],x}case"ProductCard":{let n;return e[166]!==t||e[167]!==l||e[168]!==r?(n=s.jsx(Gl,{block:t,onChange:l,sandboxRef:r}),e[166]=t,e[167]=l,e[168]=r,e[169]=n):n=e[169],n}case"ProductShelf":{let n;return e[170]!==t||e[171]!==l||e[172]!==r?(n=s.jsx(Vl,{block:t,onChange:l,sandboxRef:r}),e[170]=t,e[171]=l,e[172]=r,e[173]=n):n=e[173],n}}let f;e[174]!==i||e[175]!==a?(f=a?ht(a,i):null,e[174]=i,e[175]=a,e[176]=f):f=e[176];const g=f;if(!g){const n=a??"";let c;e[177]!==o||e[178]!==n?(c=o("sandbox.blockRegistry.unknownBlockType",{type:n}),e[177]=o,e[178]=n,e[179]=c):c=e[179];let u;return e[180]!==c?(u=s.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[180]=c,e[181]=u):u=e[181],u}let b;e[182]!==l?(b=n=>l(n),e[182]=l,e[183]=b):b=e[183];let h;return e[184]!==t||e[185]!==g||e[186]!==b?(h=s.jsx(bt,{schema:g,value:t,onChange:b,basePath:""}),e[184]=t,e[185]=g,e[186]=b,e[187]=h):h=e[187],h}function ls(p){const e=E.c(43),{id:t,block:i,meta:l,onChange:r,onDelete:o,onDuplicate:a,sandboxRef:m}=p,d=F();let f;e[0]!==t?(f={id:t},e[0]=t,e[1]=f):f=e[1];const{attributes:g,listeners:b,setNodeRef:h,transform:n,transition:c,isDragging:u}=Ve(f);let x;e[2]!==n?(x=Me.Transform.toString(n),e[2]=n,e[3]=x):x=e[3];let y;e[4]!==x||e[5]!==c?(y={transform:x,transition:c},e[4]=x,e[5]=c,e[6]=y):y=e[6];const j=u&&"opacity-50";let v;e[7]!==j?(v=Q("group/row relative rounded-md py-1.5 pl-12 pr-2 transition-colors hover:bg-muted/40",j),e[7]=j,e[8]=v):v=e[8];let C;e[9]!==d?(C=d("sandbox.blockRow.dragToReorder"),e[9]=d,e[10]=C):C=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Ge,{size:14}),e[11]=k):k=e[11];let N;e[12]!==g||e[13]!==b||e[14]!==C?(N=s.jsx("button",{type:"button","aria-label":C,className:"absolute left-1 top-1.5 flex h-6 w-6 cursor-grab items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-foreground active:cursor-grabbing group-hover/row:opacity-100",...g,...b,children:k}),e[12]=g,e[13]=b,e[14]=C,e[15]=N):N=e[15];let B;e[16]!==d?(B=d("sandbox.blockRow.duplicateBlock"),e[16]=d,e[17]=B):B=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(_t,{size:14}),e[18]=S):S=e[18];let w;e[19]!==a||e[20]!==B?(w=s.jsx("button",{type:"button","aria-label":B,onClick:a,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer",children:S}),e[19]=a,e[20]=B,e[21]=w):w=e[21];let T;e[22]!==d?(T=d("sandbox.blockRow.deleteBlock"),e[22]=d,e[23]=T):T=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(he,{size:14}),e[24]=I):I=e[24];let P;e[25]!==o||e[26]!==T?(P=s.jsx("button",{type:"button","aria-label":T,onClick:o,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-destructive cursor-pointer",children:I}),e[25]=o,e[26]=T,e[27]=P):P=e[27];let $;e[28]!==w||e[29]!==P?($=s.jsxs("div",{className:"absolute right-1 top-1 z-10 flex flex-row gap-0.5 rounded-md bg-background/80 opacity-0 backdrop-blur-sm transition-opacity group-hover/row:opacity-100",children:[w,P]}),e[28]=w,e[29]=P,e[30]=$):$=e[30];let O;e[31]!==i||e[32]!==l||e[33]!==r||e[34]!==m?(O=s.jsx(ts,{block:i,meta:l,onChange:r,sandboxRef:m}),e[31]=i,e[32]=l,e[33]=r,e[34]=m,e[35]=O):O=e[35];let U;return e[36]!==h||e[37]!==$||e[38]!==O||e[39]!==y||e[40]!==v||e[41]!==N?(U=s.jsxs("div",{ref:h,style:y,className:v,children:[N,$,O]}),e[36]=h,e[37]=$,e[38]=O,e[39]=y,e[40]=v,e[41]=N,e[42]=U):U=e[42],U}function Ps(p){return Array.isArray(p)?p:[]}function Ts(p){const e=E.c(64),{value:t,onChange:i,meta:l,sandboxRef:r,emptyMessage:o}=p,a=o===void 0?"No content yet. Use ⊕ to add your first block.":o;let m;e[0]!==l?(m=yt(l),e[0]=l,e[1]=m):m=e[1];const d=m;let f;e[2]!==t?(f=()=>t.map(ns),e[2]=t,e[3]=f):f=e[3];const[g,b]=K.useState(f);let h;e[4]!==g?(h=g.map(rs),e[4]=g,e[5]=h):h=e[5];const n=h;let c;e[6]!==g?(c=g.map(os),e[6]=g,e[7]=c):c=e[7];const u=c;let x;e[8]!==i?(x=z=>{b(z),i(z.map(ss))},e[8]=i,e[9]=x):x=e[9];const y=x;let j;e[10]!==g||e[11]!==y?(j=(z,M)=>{const q=[...g];q.splice(z,0,{id:ye(),block:{__resolveType:M}}),y(q)},e[10]=g,e[11]=y,e[12]=j):j=e[12];const v=j;let C;e[13]!==g||e[14]!==y?(C=(z,M)=>{y(g.map((q,Y)=>Y===z?{...q,block:M}:q))},e[13]=g,e[14]=y,e[15]=C):C=e[15];const k=C;let N;e[16]!==g||e[17]!==y?(N=z=>{y(g.filter((M,q)=>q!==z))},e[16]=g,e[17]=y,e[18]=N):N=e[18];const B=N;let S;e[19]!==g||e[20]!==y?(S=z=>{const M=g[z];if(!M)return;const q=[...g];q.splice(z+1,0,{id:ye(),block:structuredClone(M.block)}),y(q)},e[19]=g,e[20]=y,e[21]=S):S=e[21];const w=S;let T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T={activationConstraint:{distance:6}},e[22]=T):T=e[22];let I;e[23]===Symbol.for("react.memo_cache_sentinel")?(I={coordinateGetter:ze},e[23]=I):I=e[23];const P=De(ue(Oe,T),ue(Re,I));let $;e[24]!==g||e[25]!==y?($=z=>{const{active:M,over:q}=z;if(!q||M.id===q.id)return;const Y=g.findIndex(W=>W.id===String(M.id)),Z=g.findIndex(W=>W.id===String(q.id));Y===-1||Z===-1||y(Fe(g,Y,Z))},e[24]=g,e[25]=y,e[26]=$):$=e[26];const O=$;let U;e[27]!==u.length||e[28]!==a?(U=u.length===0&&s.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e[27]=u.length,e[28]=a,e[29]=U):U=e[29];let H;e[30]!==v?(H=z=>v(0,z),e[30]=v,e[31]=H):H=e[31];const V=u.length===0;let _;e[32]!==d||e[33]!==H||e[34]!==V?(_=s.jsx(Pe,{blockTypes:d,onInsert:H,alwaysShow:V}),e[32]=d,e[33]=H,e[34]=V,e[35]=_):_=e[35];let L;if(e[36]!==g||e[37]!==d||e[38]!==w||e[39]!==v||e[40]!==l||e[41]!==B||e[42]!==r||e[43]!==k){let z;e[45]!==d||e[46]!==w||e[47]!==v||e[48]!==l||e[49]!==B||e[50]!==r||e[51]!==k?(z=(M,q)=>{const{id:Y,block:Z}=M;return s.jsxs("div",{children:[s.jsx(ls,{id:Y,block:Z,meta:l,onChange:W=>k(q,W),onDelete:()=>B(q),onDuplicate:()=>w(q),sandboxRef:r}),s.jsx(Pe,{blockTypes:d,onInsert:W=>v(q+1,W)})]},Y)},e[45]=d,e[46]=w,e[47]=v,e[48]=l,e[49]=B,e[50]=r,e[51]=k,e[52]=z):z=e[52],L=g.map(z),e[36]=g,e[37]=d,e[38]=w,e[39]=v,e[40]=l,e[41]=B,e[42]=r,e[43]=k,e[44]=L}else L=e[44];let D;e[53]!==n||e[54]!==_||e[55]!==L?(D=s.jsxs(Ue,{items:n,strategy:ft,children:[_,L]}),e[53]=n,e[54]=_,e[55]=L,e[56]=D):D=e[56];let R;e[57]!==O||e[58]!==P||e[59]!==D?(R=s.jsx(qe,{sensors:P,collisionDetection:He,onDragEnd:O,children:D}),e[57]=O,e[58]=P,e[59]=D,e[60]=R):R=e[60];let J;return e[61]!==U||e[62]!==R?(J=s.jsxs("div",{className:"mt-2",children:[U,R]}),e[61]=U,e[62]=R,e[63]=J):J=e[63],J}function ss(p){return p.block}function os(p){return p.block}function rs(p){return p.id}function ns(p){return{id:ye(),block:p}}function ye(){return crypto.randomUUID()}export{Ts as B,Ps as a,ws as b,Ss as c};
|