decocms 2.184.0 → 2.184.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DfkFFYqP.js → AlertCircle-DMV-rZ7e.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DileW_A_.js → ArrowLeft-GATQHvMN.js} +1 -1
- package/dist/client/assets/{ArrowUp-B5tgTd4G.js → ArrowUp-BfMoxxyJ.js} +1 -1
- package/dist/client/assets/{Check-Dz8BREkM.js → Check-Bma5KFCn.js} +1 -1
- package/dist/client/assets/{ChevronDown-Bc-hvBsT.js → ChevronDown-aN42FLyq.js} +1 -1
- package/dist/client/assets/{ChevronRight-CEdEYMkr.js → ChevronRight-C2FVB4C3.js} +1 -1
- package/dist/client/assets/{ChevronUp-C5Nt2Gpw.js → ChevronUp-BbircQRT.js} +1 -1
- package/dist/client/assets/{Container-BJQA0W3I.js → Container-HyFkyfBi.js} +1 -1
- package/dist/client/assets/{Dataflow03-DGKpbmxk.js → Dataflow03-B0pnz-uB.js} +1 -1
- package/dist/client/assets/{Download01-D2a2kEd2.js → Download01-vFqP5N3M.js} +1 -1
- package/dist/client/assets/{FolderClosed-BRqcluft.js → FolderClosed-C9Qktm7G.js} +1 -1
- package/dist/client/assets/{Grid01-Dup19Gky.js → Grid01-DAUX1pwR.js} +1 -1
- package/dist/client/assets/{List-CIVgrsQE.js → List-DyQi4WIa.js} +1 -1
- package/dist/client/assets/{Loading01-CUf91EYy.js → Loading01-DzzF1Xn7.js} +1 -1
- package/dist/client/assets/{Play-B4xMPlIu.js → Play-LM-itN1a.js} +1 -1
- package/dist/client/assets/{Plus-Djoj9rVk.js → Plus-B1MCV6m5.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-5hC9d6CT.js → RefreshCcw01-CxbGujDv.js} +1 -1
- package/dist/client/assets/{SearchMd-CDQ6AGxD.js → SearchMd-CQS6PDrb.js} +1 -1
- package/dist/client/assets/{Settings01-DCXT2JFw.js → Settings01-_rJgA268.js} +1 -1
- package/dist/client/assets/{Trash01-B4Huc5Zf.js → Trash01-5_SyecjT.js} +1 -1
- package/dist/client/assets/{Type01-CTx0gUPJ.js → Type01-CEUNNrON.js} +1 -1
- package/dist/client/assets/{Upload01-Dyt5Jyuh.js → Upload01-CqeU4e-W.js} +1 -1
- package/dist/client/assets/{User01-ddyN4FyR.js → User01-BsPm7RVz.js} +1 -1
- package/dist/client/assets/{VideoRecorder-DYWKiTPw.js → VideoRecorder-B3WVSf7U.js} +1 -1
- package/dist/client/assets/{X-iShYas12.js → X-C5GtvldQ.js} +1 -1
- package/dist/client/assets/{XCircle-MXxaApa0.js → XCircle-BWumx2Gc.js} +1 -1
- package/dist/client/assets/{XClose-DSR4PIAc.js → XClose-m99dDV1c.js} +1 -1
- package/dist/client/assets/{Zap-CJ1e2k9C.js → Zap-khXF6TnI.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BUgUIlQA.js → agent-connections-preview-DsOyODhY.js} +1 -1
- package/dist/client/assets/{agent-detail-C71qFVI6.js → agent-detail-aljC1GdY.js} +1 -1
- package/dist/client/assets/{agents-BJZ4FxX5.js → agents-BTLIOBH4.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-dMnvTwLA.js → ai-providers-logos-bTbrc5Ff.js} +1 -1
- package/dist/client/assets/{alert-dialog-C5M3jUGr.js → alert-dialog-DZzr7w4N.js} +1 -1
- package/dist/client/assets/{auth-catchall-Ckn9O2wV.js → auth-catchall-4prTcwJz.js} +1 -1
- package/dist/client/assets/{automation-detail-WBCXHf4U.js → automation-detail-DwSOZqSU.js} +1 -1
- package/dist/client/assets/{automations-CytUchQy.js → automations-C2VgJRMK.js} +1 -1
- package/dist/client/assets/{avatar-DusWq9Iv.js → avatar-9rgMXUO3.js} +1 -1
- package/dist/client/assets/{badge-ChpXYBi7.js → badge-CmRHjnH-.js} +1 -1
- package/dist/client/assets/{binder-qwsdgkR1.js → binder-HzAEyJNS.js} +1 -1
- package/dist/client/assets/{breadcrumb-5YAcRzVA.js → breadcrumb-Uk80Af5O.js} +1 -1
- package/dist/client/assets/{card-BgI4BXSU.js → card-Lf6x72jH.js} +1 -1
- package/dist/client/assets/{checkbox-DCsLtkG5.js → checkbox-hgQTbYiQ.js} +1 -1
- package/dist/client/assets/{collapsible-Bz9oU5jE.js → collapsible-BZesHCHB.js} +1 -1
- package/dist/client/assets/{collection-detail-mnpxYNbK.js → collection-detail-ZynBGDPv.js} +5 -5
- package/dist/client/assets/{collection-display-button-C16p0CHk.js → collection-display-button-iL5pze0r.js} +1 -1
- package/dist/client/assets/{collection-search-CStVSgIt.js → collection-search-cNt60-AL.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bkkildwe.js → collection-table-wrapper-BBd2b6uM.js} +1 -1
- package/dist/client/assets/{collection-tabs-nwZEGGdV.js → collection-tabs-Weu__lg8.js} +1 -1
- package/dist/client/assets/{command-CFWw2Pp0.js → command-CN_wtXeP.js} +1 -1
- package/dist/client/assets/{connection-card-Dm5Sf-Nq.js → connection-card-BLKs5mD3.js} +1 -1
- package/dist/client/assets/{connection-detail-C52QXcdb.js → connection-detail-DzcB7EJV.js} +1 -1
- package/dist/client/assets/{connections-BUIt9Va0.js → connections-BxIRzYdx.js} +1 -1
- package/dist/client/assets/{constants-CcsM4iWp.js → constants-BoofM__A.js} +1 -1
- package/dist/client/assets/constants-CvvTl35D.js +1 -0
- package/dist/client/assets/{context-Bbpd0eXo.js → context-DWuz1QPT.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C2CV8COn.js → create-organization-dialog-BnEBc5at.js} +1 -1
- package/dist/client/assets/{create-project-dialog-C6Adqctr.js → create-project-dialog-_5aAp1I-.js} +1 -1
- package/dist/client/assets/{danger-BXDv1g46.js → danger-H4wRP4Ra.js} +1 -1
- package/dist/client/assets/{danger-zone-BBtijGkO.js → danger-zone-BYJ00Zjx.js} +1 -1
- package/dist/client/assets/{dependencies-sTdvcbti.js → dependencies-M0MQuJGS.js} +1 -1
- package/dist/client/assets/{dialog-Bzf-VK1K.js → dialog-1XQgKf8N.js} +1 -1
- package/dist/client/assets/{drawer-D6PrIYCh.js → drawer-kTkYDBR8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BA4Oj_Sc.js → dropdown-menu-DHi2wczE.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DmvzQk53.js → dynamic-plugin-layout-CXEGP1Cj.js} +1 -1
- package/dist/client/assets/{editable-task-title-BdDZj_OQ.js → editable-task-title-D_ziJBro.js} +1 -1
- package/dist/client/assets/{empty-state-BnVX9dmg.js → empty-state-BAZkyFkJ.js} +1 -1
- package/dist/client/assets/{empty-state-C7JjGncC.js → empty-state-Cd_1RV6A.js} +1 -1
- package/dist/client/assets/{env-vars-editor-ByZUgHK-.js → env-vars-editor-DLxrW5bI.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DRh33m0W.js → extract-connection-data-DtlPi0e-.js} +1 -1
- package/dist/client/assets/{file-browser-BYF5otfe.js → file-browser-CK9OSNR-.js} +2 -2
- package/dist/client/assets/{form-BUAj2Hj8.js → form-t62EdxrT.js} +1 -1
- package/dist/client/assets/{general-g0kq_-2c.js → general-DnqHksbF.js} +1 -1
- package/dist/client/assets/{grid-view-BmL--mhA.js → grid-view-Bw9t-J_z.js} +1 -1
- package/dist/client/assets/{home-Bjjl27bZ.js → home-Di6UBYTk.js} +1 -1
- package/dist/client/assets/{index-B4Jr1mSz.js → index-B7lieztO.js} +1 -1
- package/dist/client/assets/{index-LgjOqTLE.js → index-BC02vDrU.js} +1 -1
- package/dist/client/assets/{index-DUX42n8S.js → index-BSJhN1RG.js} +3 -3
- package/dist/client/assets/{index-BK_Tzu_-.js → index-B_edy8DH.js} +1 -1
- package/dist/client/assets/{index-6n_OVsr9.js → index-C9MCcKQV.js} +1 -1
- package/dist/client/assets/{index-BXeIB2Tb.js → index-CCPa_bdf.js} +1 -1
- package/dist/client/assets/{index-61iUtQHj.js → index-CzVXH2ez.js} +1 -1
- package/dist/client/assets/{index-Cl3BpGhn.js → index-DMTUegke.js} +1 -1
- package/dist/client/assets/{index-um5Sfc-H.js → index-DaqvX_2k.js} +1 -1
- package/dist/client/assets/{index-DqDg9fof.js → index-DwelOe0Q.js} +1 -1
- package/dist/client/assets/{index-ByXewYOk.js → index-G9dSbuV_.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-ClCkbIYa.js → infiniteQueryObserver-hAAtfcB8.js} +1 -1
- package/dist/client/assets/{input-XHq6wqHR.js → input-CCTJ9v7L.js} +1 -1
- package/dist/client/assets/{integration-icon-CK1PotZC.js → integration-icon-BN98cm9W.js} +1 -1
- package/dist/client/assets/{label-BJGhONv8.js → label-DeuWE9eY.js} +1 -1
- package/dist/client/assets/{layout-B82tDeI6.js → layout-BHyPHA6y.js} +1 -1
- package/dist/client/assets/{layout-DfqMrbgu.js → layout-ChW-YfXS.js} +1 -1
- package/dist/client/assets/{login-Bw0Xithq.js → login-B_Wj9fur.js} +1 -1
- package/dist/client/assets/{logo-upload-DcI1fDOo.js → logo-upload-T92lTK1Q.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-lZz-ne_1.js → mcp-app-renderer-DHbjaKS6.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Dasz02z8.js → mcp-server-card-CS95MXfM.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-DPBJnU98.js → mcp-server-detail-BYJPfLy5.js} +2 -2
- package/dist/client/assets/{members-DkWgkxlk.js → members-Crlx6q1Z.js} +1 -1
- package/dist/client/assets/{monaco-editor-BRwzt71-.js → monaco-editor-DckKJQsF.js} +1 -1
- package/dist/client/assets/{monitoring-CdZgmkGA.js → monitoring-DWb_hR_s.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-aTNulbwk.js → monitoring-dashboard-edit-DW6NKJ6T.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-DNY4gqn2.js → monitoring-dashboard-view-BoI9HI8A.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BSdG5D1C.js → monitoring-stats-row-D5S0CSdH.js} +1 -1
- package/dist/client/assets/{oauth-callback-C01fqOeg.js → oauth-callback-YMkCxgWC.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-rVoNToUr.js → oauth-callback-ai-provider-BDxeYCqf.js} +1 -1
- package/dist/client/assets/{org-ai-providers-Bd76PLGE.js → org-ai-providers-DxV1GVfK.js} +1 -1
- package/dist/client/assets/{page-C70liUar.js → page-B4oqzriM.js} +1 -1
- package/dist/client/assets/{page-AVcZB2xU.js → page-DlWjJ967.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BY3_fgfo.js → plugin-empty-state-BtR0LFRo.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CLxuWvKN.js → plugin-empty-state-yAs3zaRu.js} +1 -1
- package/dist/client/assets/{plugin-header-ZC2CBUSo.js → plugin-header-CwABFKzm.js} +1 -1
- package/dist/client/assets/{plugin-header-DASYKll8.js → plugin-header-D8F39aT1.js} +1 -1
- package/dist/client/assets/plugins-DjvTH-IA.js +1 -0
- package/dist/client/assets/{popover-DTEk3vKM.js → popover-D4IjUZyn.js} +1 -1
- package/dist/client/assets/{project-app-view-Ce8857ET.js → project-app-view-shiH6DKH.js} +1 -1
- package/dist/client/assets/{project-layout-nXQP4ref.js → project-layout-l_J_YIG0.js} +1 -1
- package/dist/client/assets/{project-plugins-B-pYQw6T.js → project-plugins-2btoU0bF.js} +1 -1
- package/dist/client/assets/{projects-list-DT16GjQg.js → projects-list-BubEDVBP.js} +1 -1
- package/dist/client/assets/{registry-layout-DCC5B3mj.js → registry-layout-B390oDVH.js} +1 -1
- package/dist/client/assets/{registry-utils-BiDzvs9Q.js → registry-utils-C6T_5hu0.js} +1 -1
- package/dist/client/assets/{reset-password-C5XrjB6I.js → reset-password-Brs-UteC.js} +1 -1
- package/dist/client/assets/{resizable-CXOYYv6O.js → resizable-oQJPEcsU.js} +1 -1
- package/dist/client/assets/{save-actions-DdXkD4w0.js → save-actions-BUFEFORl.js} +1 -1
- package/dist/client/assets/{scroll-area-uf_F9gDE.js → scroll-area-Bpk9YwA7.js} +1 -1
- package/dist/client/assets/{select-CwAs6Kzm.js → select-DT-iervo.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-DuFoRUc2.js → select-virtual-mcp-CWjdI1yN.js} +1 -1
- package/dist/client/assets/{shell-layout-BmydY22m.js → shell-layout-DgW8ODZH.js} +2 -2
- package/dist/client/assets/{sidebar-settings-CaouGLvu.js → sidebar-settings-BKq2f7xU.js} +1 -1
- package/dist/client/assets/{skeleton-CCKDUrsc.js → skeleton-BKlnApyk.js} +1 -1
- package/dist/client/assets/{spinner-C5kCA3D4.js → spinner-CmdUvk0v.js} +1 -1
- package/dist/client/assets/{store-invite-RWL5fJ-G.js → store-invite-Ce-9FE-b.js} +1 -1
- package/dist/client/assets/{switch-DTK1XKz7.js → switch-goMnPZtb.js} +1 -1
- package/dist/client/assets/{table-B24btLbb.js → table-5ZO5b8Po.js} +1 -1
- package/dist/client/assets/{tabs-C1ebNG2b.js → tabs-C3-SBSfv.js} +1 -1
- package/dist/client/assets/{task-status-BKl6HVDT.js → task-status-WGhIXJJC.js} +1 -1
- package/dist/client/assets/tasks-D9gK_O1m.js +1 -0
- package/dist/client/assets/{tasks-panel-BY1SCj3X.js → tasks-panel-CKIjqvKh.js} +1 -1
- package/dist/client/assets/{textarea-Byxd6OOy.js → textarea-BbtSbUAG.js} +1 -1
- package/dist/client/assets/{time-range-picker-B0B9fAxU.js → time-range-picker-DP25Q2Zk.js} +1 -1
- package/dist/client/assets/{toggle-group-CgS7CSZY.js → toggle-group-CaVCHD4D.js} +1 -1
- package/dist/client/assets/{tools-list-BCa2CHT8.js → tools-list-D6iQTZ1v.js} +1 -1
- package/dist/client/assets/{tooltip-BHHjnUV1.js → tooltip-Czc-dfus.js} +1 -1
- package/dist/client/assets/{topbar-portal-CyrfOtgF.js → topbar-portal-C2eZmuuv.js} +1 -1
- package/dist/client/assets/{types-BAYV7nyc.js → types-BH6fpPqs.js} +1 -1
- package/dist/client/assets/{use-automations-Bu-ab1mP.js → use-automations-CnOmv87d.js} +1 -1
- package/dist/client/assets/{use-collections-K8Aul2pf.js → use-collections-Bv7ORhQ3.js} +1 -1
- package/dist/client/assets/{use-connection-Civ5yXiP.js → use-connection-C_ZeRH1v.js} +1 -1
- package/dist/client/assets/{use-copy-CK-Ajh-j.js → use-copy-DbDDzd7N.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cpjlu2kb.js → use-create-virtual-mcp-UuZPWAj2.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Bxj3e4-1.js → use-infinite-scroll-kmJGtrCa.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-CG-kaFkd.js → use-install-from-registry-BtGom7sq.js} +1 -1
- package/dist/client/assets/{use-list-state-B9f-Ca9P.js → use-list-state-BRDiV7d7.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DwPdHg6G.js → use-mcp-prompts-dq5_OWT9.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DiSYb2_Q.js → use-mcp-resources-sGDI0dq5.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-D9d7B2WH.js → use-mcp-tools-Uj7pAtM3.js} +1 -1
- package/dist/client/assets/{use-members-D2qiU5rW.js → use-members-C0FwQv_A.js} +1 -1
- package/dist/client/assets/{use-project-Tt_Z_fXv.js → use-project-eCnKEq9P.js} +1 -1
- package/dist/client/assets/{use-store-discovery-n-a_3WBn.js → use-store-discovery-Waic87H7.js} +1 -1
- package/dist/client/assets/{use-view-mode-f8YUpwHi.js → use-view-mode-BAmicVzY.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-kJ8a01sk.js → use-virtual-mcp-Ot6iDc6P.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D8nCVkhA.js +1 -0
- package/dist/client/assets/{useMutation-2VTSs-2P.js → useMutation-DD64AYhD.js} +1 -1
- package/dist/client/assets/useQuery-CyMlQzLm.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Df-iXD3q.js +1 -0
- package/dist/client/assets/{user-C7EsgQ4L.js → user-CJJOlR6d.js} +1 -1
- package/dist/client/assets/{workflow-BDtGLEmQ.js → workflow-C_MiLNeC.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/{pg-connection-string/LICENSE → postgres-array/license} +5 -5
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/{pg/LICENSE → postgres-bytea/license} +6 -6
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/{pg-pool/LICENSE → postgres-date/license} +6 -6
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/package.json +1 -1
- package/dist/client/assets/constants-BoHeSnZm.js +0 -1
- package/dist/client/assets/plugins-DflzCr28.js +0 -1
- package/dist/client/assets/tasks-CsKi-Trq.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DXdWIUaP.js +0 -1
- package/dist/client/assets/useQuery-CpuRtrH-.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DnaL6JxY.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- package/dist/server/node_modules/pg-connection-string/README.md +0 -105
- package/dist/server/node_modules/pg-connection-string/esm/index.mjs +0 -8
- package/dist/server/node_modules/pg-connection-string/index.d.ts +0 -36
- package/dist/server/node_modules/pg-connection-string/index.js +0 -231
- package/dist/server/node_modules/pg-connection-string/package.json +0 -52
- package/dist/server/node_modules/pg-pool/README.md +0 -357
- package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
- package/dist/server/node_modules/pg-pool/index.js +0 -517
- package/dist/server/node_modules/pg-pool/package.json +0 -51
- package/dist/server/node_modules/pg-types/.travis.yml +0 -7
- package/dist/server/node_modules/pg-types/Makefile +0 -14
- package/dist/server/node_modules/pg-types/README.md +0 -75
- package/dist/server/node_modules/pg-types/index.d.ts +0 -137
- package/dist/server/node_modules/pg-types/index.js +0 -47
- package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
- package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
- package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
- package/dist/server/node_modules/pg-types/package.json +0 -42
- package/dist/server/node_modules/pg-types/test/index.js +0 -24
- package/dist/server/node_modules/pg-types/test/types.js +0 -597
- package/dist/server/node_modules/pgpass/README.md +0 -74
- package/dist/server/node_modules/pgpass/lib/helper.js +0 -233
- package/dist/server/node_modules/pgpass/lib/index.js +0 -23
- package/dist/server/node_modules/pgpass/package.json +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,g as ve,e as be,u as ae,r as T,j as t,G as _e,O as X,v as I,B as U,t as Ce,I as Ne,w as Se,K as q}from"./index-DUX42n8S.js";import{E as le}from"./empty-state-BnVX9dmg.js";import{a as ce,V as we}from"./layout-DfqMrbgu.js";import{S as ke}from"./save-actions-DdXkD4w0.js";import{u as De}from"./ai-providers-logos-dMnvTwLA.js";import{T as Ae,a as Te,M as Ie,S as Z}from"./task-status-BKl6HVDT.js";import{V as ee}from"./select-virtual-mcp-DuFoRUc2.js";import{I as Me,e as Ee,t as te}from"./integration-icon-CK1PotZC.js";import{U as $e}from"./user-C7EsgQ4L.js";import{c as ze,b as Oe,d as Re,e as Q,f as Pe}from"./use-automations-Bu-ab1mP.js";import{a as de}from"./index-BXeIB2Tb.js";import{b as me,d as ue,c as pe,A as fe,e as xe,h as he,a as ge,f as ye}from"./alert-dialog-C5M3jUGr.js";import{b as se,d as Ve,c as Fe,e as Le,B as Ue,a as Be}from"./breadcrumb-5YAcRzVA.js";import{I as He}from"./input-XHq6wqHR.js";import{c as re,a as Ke,d as Ge,e as We,f as qe,b as Qe,D as Je}from"./dropdown-menu-BA4Oj_Sc.js";import{a as ne,b as oe,P as ie}from"./popover-DTEk3vKM.js";import{S as Ye}from"./switch-DTK1XKz7.js";import{T as Xe,a as Ze,b as et}from"./tooltip-BHHjnUV1.js";import{u as tt}from"./useQuery-CpuRtrH-.js";import{i as st,u as rt,a as nt}from"./constants-CcsM4iWp.js";import{b as ot}from"./use-virtual-mcp-kJ8a01sk.js";import{i as it}from"./ArrowUp-B5tgTd4G.js";import{s as H}from"./Type01-CTx0gUPJ.js";import{i as G}from"./Loading01-CUf91EYy.js";import{s as at}from"./Plus-Djoj9rVk.js";import{s as lt}from"./Trash01-B4Huc5Zf.js";import{s as J}from"./XClose-DSR4PIAc.js";import{a as je,t as ct,b as dt}from"./context-Bbpd0eXo.js";import{f as mt}from"./formatDistanceToNow-Cb2QZZJn.js";import"./XCircle-MXxaApa0.js";import"./skeleton-CCKDUrsc.js";import"./spinner-C5kCA3D4.js";import"./use-mcp-prompts-DwPdHg6G.js";import"./dialog-Bzf-VK1K.js";import"./X-iShYas12.js";import"./form-BUAj2Hj8.js";import"./label-BJGhONv8.js";import"./index-BK_Tzu_-.js";import"./usage-BW6ztpN6.js";import"./ChevronDown-Bc-hvBsT.js";import"./org-ai-providers-Bd76PLGE.js";import"./useMutation-2VTSs-2P.js";import"./AlertCircle-DfkFFYqP.js";import"./RefreshCcw01-5hC9d6CT.js";import"./Play-B4xMPlIu.js";import"./card-BgI4BXSU.js";import"./toggle-group-CgS7CSZY.js";import"./avatar-DusWq9Iv.js";import"./User01-ddyN4FyR.js";import"./select-CwAs6Kzm.js";import"./index-BdQq_4o_.js";import"./index-B4Jr1mSz.js";import"./Check-Dz8BREkM.js";import"./ChevronUp-C5Nt2Gpw.js";import"./ArrowLeft-DileW_A_.js";import"./use-copy-CK-Ajh-j.js";import"./marked.esm-BaswSlok.js";import"./tabs-C1ebNG2b.js";import"./checkbox-DCsLtkG5.js";import"./drawer-D6PrIYCh.js";import"./VideoRecorder-DYWKiTPw.js";import"./SearchMd-CDQ6AGxD.js";import"./Settings01-DCXT2JFw.js";import"./use-mcp-resources-DiSYb2_Q.js";import"./ChevronRight-CEdEYMkr.js";import"./collapsible-Bz9oU5jE.js";import"./index-LgjOqTLE.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-lZz-ne_1.js";import"./types-BAYV7nyc.js";import"./use-collections-K8Aul2pf.js";import"./useSuspenseInfiniteQuery-DnaL6JxY.js";import"./infiniteQueryObserver-ClCkbIYa.js";import"./use-create-virtual-mcp-Cpjlu2kb.js";import"./Container-BJQA0W3I.js";import"./Dataflow03-DGKpbmxk.js";import"./Download01-D2a2kEd2.js";import"./List-CIVgrsQE.js";import"./FolderClosed-BRqcluft.js";import"./Grid01-Dup19Gky.js";import"./Upload01-Dyt5Jyuh.js";import"./Zap-CJ1e2k9C.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Cl3BpGhn.js";import"./differenceInSeconds-NQ4PDo0z.js";function K(s){const e=s.trim().split(/\s+/);return e.length!==5?!1:e.every(r=>/^[\d*/,\-]+$/.test(r))}function ut(s){if(!s)return"Unknown schedule";const e=s.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const r=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(r)return`Every ${r[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const f=parseInt(o[1]??"1");return f%7===0?`Every ${f/7} weeks`:`Every ${f} days`}const a=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(a){const f=(a[2]??"0").padStart(2,"0"),d=(a[1]??"0").padStart(2,"0");return`Every day at ${f}:${d} UTC`}const x=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(x){const d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(x[3]??"0")]??"day",l=(x[2]??"0").padStart(2,"0"),y=(x[1]??"0").padStart(2,"0");return`Every ${d} at ${l}:${y} UTC`}return s}function pt(s,e){const r=Math.max(1,s);switch(e){case"minutes":return r===1?"* * * * *":`*/${r} * * * *`;case"hours":return r===1?"0 * * * *":`0 */${r} * * *`;case"days":return r===1?"0 0 * * *":`0 0 */${r} * *`;case"weeks":return r===1?"0 0 * * 1":`0 0 */${r*7} * *`}}function ft(s){const e=s.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const r=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(r)return{count:parseInt(r[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const a=parseInt(o[1]);return a%7===0?{count:a/7,unit:"weeks"}:{count:a,unit:"days"}}return null}function xt(s,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[s]??s:s}const ht=[{label:"Minute",cron:"* * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}];function gt(s){const e=B.c(26),{automationId:r,open:n,onOpenChange:o,onCustomSelect:a}=s,x=Q(),[f,d]=T.useState(!1),l=n??f;let y;e[0]!==o?(y=N=>{o?o(N):d(N)},e[0]=o,e[1]=y):y=e[1];const m=y;let j;e[2]!==x||e[3]!==r||e[4]!==m?(j=async N=>{try{await x.mutateAsync({automation_id:r,type:"cron",cron_expression:N}),I.success("Starter added"),m(!1)}catch(D){const A=D,g=A instanceof Error?A.message:"Failed to add starter";I.error(g)}},e[2]=x,e[3]=r,e[4]=m,e[5]=j):j=e[5];const S=j;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Ke,{asChild:!0,children:t.jsxs(U,{variant:"outline",size:"sm",children:[t.jsx(at,{size:14}),"Add Starter"]})}),e[6]=p):p=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(Ge,{className:"gap-2.5",children:[t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),"Every..."]}),e[7]=_):_=e[7];let v;e[8]!==x||e[9]!==S?(v=ht.map(N=>t.jsxs(re,{className:"gap-2.5",onSelect:()=>S(N.cron),disabled:x.isPending,children:[t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),"Every ",N.label]},N.cron)),e[8]=x,e[9]=S,e[10]=v):v=e[10];let i;e[11]!==v?(i=t.jsxs(We,{children:[_,t.jsx(qe,{className:"w-[160px]",children:v})]}),e[11]=v,e[12]=i):i=e[12];let u;e[13]!==m||e[14]!==a?(u=()=>{m(!1),a?.()},e[13]=m,e[14]=a,e[15]=u):u=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),e[16]=b):b=e[16];let h;e[17]!==u?(h=t.jsxs(re,{className:"gap-2.5",onSelect:u,children:[b,"Custom (cron)"]}),e[17]=u,e[18]=h):h=e[18];let C;e[19]!==i||e[20]!==h?(C=t.jsxs(Qe,{align:"end",className:"w-[200px]",children:[i,h]}),e[19]=i,e[20]=h,e[21]=C):C=e[21];let w;return e[22]!==m||e[23]!==l||e[24]!==C?(w=t.jsxs(Je,{open:l,onOpenChange:m,children:[p,C]}),e[22]=m,e[23]=l,e[24]=C,e[25]=w):w=e[25],w}function yt(s){const e=B.c(56),{trigger:r,automationId:n}=s,o=Pe(),a=Q(),[x,f]=T.useState(!1);let d;e[0]!==r.cron_expression?(d=r.cron_expression?ft(r.cron_expression):null,e[0]=r.cron_expression,e[1]=d):d=e[1];const l=d,[y,m]=T.useState(l?.count??1),[j,S]=T.useState(!1),[p,_]=T.useState(r.cron_expression??""),v=o.isPending||a.isPending,i=r.type==="cron";let u;e[2]!==n||e[3]!==o||e[4]!==r.id?(u=async()=>{try{await o.mutateAsync({trigger_id:r.id,automation_id:n}),I.success("Starter removed")}catch{I.error("Failed to remove starter")}f(!1)},e[2]=n,e[3]=o,e[4]=r.id,e[5]=u):u=e[5];const b=u;let h;e[6]!==a||e[7]!==n||e[8]!==p||e[9]!==o||e[10]!==r.cron_expression||e[11]!==r.id?(h=async()=>{const k=p.trim();if(!k||!K(k)||k===r.cron_expression){S(!1),_(r.cron_expression??"");return}try{await a.mutateAsync({automation_id:n,type:"cron",cron_expression:k}),await o.mutateAsync({trigger_id:r.id,automation_id:n}),S(!1)}catch{I.error("Failed to update starter"),_(r.cron_expression??""),S(!1)}},e[6]=a,e[7]=n,e[8]=p,e[9]=o,e[10]=r.cron_expression,e[11]=r.id,e[12]=h):h=e[12];const C=h;let w;e[13]!==a||e[14]!==n||e[15]!==l||e[16]!==o||e[17]!==r.cron_expression||e[18]!==r.id?(w=async k=>{if(!l)return;const W=Math.max(1,k),c=pt(W,l.unit);if(c!==r.cron_expression)try{await a.mutateAsync({automation_id:n,type:"cron",cron_expression:c}),await o.mutateAsync({trigger_id:r.id,automation_id:n})}catch{I.error("Failed to update starter"),m(l.count)}},e[13]=a,e[14]=n,e[15]=l,e[16]=o,e[17]=r.cron_expression,e[18]=r.id,e[19]=w):w=e[19];const N=w;let D;e[20]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),e[20]=D):D=e[20];let A;e[21]!==y||e[22]!==p||e[23]!==N||e[24]!==C||e[25]!==l||e[26]!==i||e[27]!==j||e[28]!==v||e[29]!==r.cron_expression||e[30]!==r.event_type?(A=l&&i?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:"Every"}),t.jsx("input",{type:"number",min:1,value:y,onChange:k=>m(parseInt(k.target.value)||1),onBlur:()=>N(y),onKeyDown:k=>{k.key==="Enter"&&k.target.blur(),k.key==="Escape"&&m(l.count)},disabled:v,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus:outline-none focus:ring-1 focus:ring-ring"}),t.jsx("span",{className:"text-sm",children:xt(l.unit,y)})]}):i&&j?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:p,onChange:k=>_(k.target.value),onBlur:C,onKeyDown:k=>{k.key==="Enter"&&k.target.blur(),k.key==="Escape"&&(S(!1),_(r.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),p&&!K(p)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"invalid"})]}):t.jsx("span",{className:"text-sm flex-1 font-mono text-xs text-muted-foreground",children:i?ut(r.cron_expression??""):`${r.event_type} event`}),e[21]=y,e[22]=p,e[23]=N,e[24]=C,e[25]=l,e[26]=i,e[27]=j,e[28]=v,e[29]=r.cron_expression,e[30]=r.event_type,e[31]=A):A=e[31];let g;e[32]!==v?(g=v&&t.jsx(G,{size:13,className:"animate-spin text-muted-foreground"}),e[32]=v,e[33]=g):g=e[33];let z;e[34]!==l||e[35]!==i||e[36]!==j||e[37]!==r.cron_expression?(z=i&&!l&&!j&&t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{_(r.cron_expression??""),S(!0)},children:t.jsx(Ee,{size:13,className:"text-muted-foreground"})}),e[34]=l,e[35]=i,e[36]=j,e[37]=r.cron_expression,e[38]=z):z=e[38];let R;e[39]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>f(!0),children:t.jsx(J,{size:13,className:"text-muted-foreground"})}),e[39]=R):R=e[39];let M;e[40]!==g||e[41]!==z?(M=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[g,z,R]}),e[40]=g,e[41]=z,e[42]=M):M=e[42];let O;e[43]!==M||e[44]!==A?(O=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[D,A,M]}),e[43]=M,e[44]=A,e[45]=O):O=e[45];let P;e[46]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs(me,{children:[t.jsx(pe,{children:"Remove Starter"}),t.jsx(ue,{children:"Are you sure you want to remove this starter?"})]}),e[46]=P):P=e[46];let V;e[47]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(fe,{children:"Cancel"}),e[47]=V):V=e[47];let E;e[48]!==b?(E=t.jsxs(ge,{children:[P,t.jsxs(xe,{children:[V,t.jsx(he,{onClick:b,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),e[48]=b,e[49]=E):E=e[49];let $;e[50]!==x||e[51]!==E?($=t.jsx(ye,{open:x,onOpenChange:f,children:E}),e[50]=x,e[51]=E,e[52]=$):$=e[52];let F;return e[53]!==O||e[54]!==$?(F=t.jsxs(t.Fragment,{children:[O,$]}),e[53]=O,e[54]=$,e[55]=F):F=e[55],F}function jt(s){const e=B.c(41),{selectedId:r,onChange:n}=s,[o,a]=T.useState(!1),x=ot();let f,d;e[0]!==x||e[1]!==r?(d=x.filter(vt),f=r?d.find(p=>p.id===r):null,e[0]=x,e[1]=r,e[2]=f,e[3]=d):(f=e[2],d=e[3]);const l=f;if(l){let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(te,{size:16}),e[4]=p):p=e[4];let _;e[5]!==l.icon||e[6]!==l.title?(_=t.jsx(Me,{icon:l.icon,name:l.title,size:"sm",fallbackIcon:p,className:"rounded-md shrink-0"}),e[5]=l.icon,e[6]=l.title,e[7]=_):_=e[7];let v;e[8]!==l.title?(v=t.jsx("span",{className:"text-sm font-medium truncate",children:l.title}),e[8]=l.title,e[9]=v):v=e[9];let i;e[10]!==_||e[11]!==v?(i=t.jsx(ne,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex items-center gap-3 flex-1 min-w-0 text-left cursor-pointer",children:[_,v]})}),e[10]=_,e[11]=v,e[12]=i):i=e[12];let u;e[13]!==n?(u=A=>{n(A),a(!1)},e[13]=n,e[14]=u):u=e[14];let b;e[15]!==r||e[16]!==u||e[17]!==d?(b=t.jsx(oe,{className:"w-[550px] p-0 overflow-hidden",align:"start",sideOffset:8,children:t.jsx(ee,{virtualMcps:d,selectedVirtualMcpId:r,onVirtualMcpChange:u})}),e[15]=r,e[16]=u,e[17]=d,e[18]=b):b=e[18];let h;e[19]!==o||e[20]!==i||e[21]!==b?(h=t.jsxs(ie,{open:o,onOpenChange:a,children:[i,b]}),e[19]=o,e[20]=i,e[21]=b,e[22]=h):h=e[22];let C;e[23]!==n?(C=()=>n(null),e[23]=n,e[24]=C):C=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(J,{size:13}),e[25]=w):w=e[25];let N;e[26]!==C?(N=t.jsx(U,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 size-7 text-muted-foreground hover:text-foreground",onClick:C,title:"Remove agent",children:w}),e[26]=C,e[27]=N):N=e[27];let D;return e[28]!==N||e[29]!==h?(D=t.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border bg-background hover:bg-accent/50 transition-colors",children:[h,N]}),e[28]=N,e[29]=h,e[30]=D):D=e[30],D}let y;e[31]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ne,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border hover:bg-accent/50 transition-colors w-full text-left cursor-pointer",children:[t.jsxs("div",{className:"relative flex items-center justify-center size-8 rounded-md text-muted-foreground/75 shrink-0",children:[t.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"agent-picker-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[t.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),t.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),t.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),t.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"5.5",stroke:"url(#agent-picker-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),t.jsx(te,{size:16})]}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"No agent selected. All connections available."})]})}),e[31]=y):y=e[31];let m;e[32]!==n?(m=p=>{n(p),a(!1)},e[32]=n,e[33]=m):m=e[33];let j;e[34]!==r||e[35]!==m||e[36]!==d?(j=t.jsx(oe,{className:"w-[550px] p-0 overflow-hidden",align:"start",sideOffset:8,children:t.jsx(ee,{virtualMcps:d,selectedVirtualMcpId:r,onVirtualMcpChange:m})}),e[34]=r,e[35]=m,e[36]=d,e[37]=j):j=e[37];let S;return e[38]!==o||e[39]!==j?(S=t.jsxs(ie,{open:o,onOpenChange:a,children:[y,j]}),e[38]=o,e[39]=j,e[40]=S):S=e[40],S}function vt(s){return!s.id||!st(s.id)}function bt({automationId:s,automation:e}){const r=Re(),{createTask:n,setVirtualMcpId:o,setSelectedModel:a,sendMessage:x,credentialId:f,model:d}=je(),[,l]=de(),y=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[m,j]=T.useState(y),[S,p]=T.useState(y),[_,v]=T.useState(!1),[i,u]=T.useState(!1),[b,h]=T.useState(""),C=Q(),w=T.useRef(!1),N=c=>{j(c),w.current||(w.current=!0,y||p(c))},D=e.models?.credentialId||f||"",A=e.models?.thinking?.id||d?.modelId||"",g=Ce({defaultValues:{name:e.name,active:e.active,agent_id:e.agent?.id??"",credential_id:D,model_id:A}}),z=g.watch("active"),R=g.watch("agent_id"),M=g.watch("credential_id"),O=g.watch("model_id"),{models:P,isLoading:V}=De(M||void 0),E=P.find(c=>c.modelId===O)??null,$=async()=>{const c=g.getValues();try{const L=c.credential_id&&c.model_id?c.credential_id:"",Y=c.credential_id&&c.model_id?c.model_id:"";return await r.mutateAsync({id:s,name:c.name,active:c.active,agent:{id:c.agent_id},models:{credentialId:L,thinking:{id:Y}},messages:ct(m),temperature:0}),g.reset({...c,credential_id:L,model_id:Y}),p(m),I.success("Automation saved"),!0}catch{return I.error("Failed to save automation"),!1}},F=()=>{g.reset(),N(S)},k=g.formState.isDirty||JSON.stringify(m??null)!==JSON.stringify(S??null),W=async()=>{if(k&&!await $())return;if(!m){I.error("No instructions configured for this automation");return}const c=g.getValues();o(c.agent_id||null),E&&M&&a({...E,keyId:M}),l(!0),n(),setTimeout(()=>{x(m,{toolApprovalLevel:"auto"})},0)};return t.jsxs(t.Fragment,{children:[t.jsx(ce,{children:t.jsx(ke,{onSave:async()=>{await $()},onUndo:F,isDirty:k,isSaving:r.isPending})}),t.jsxs("div",{className:"max-w-2xl mx-auto w-full px-6 py-6 flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(He,{...g.register("name"),placeholder:"Automation name",className:"border border-transparent shadow-none px-0 text-2xl md:text-2xl font-semibold h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ne,{control:g.control,name:"active",render:({field:c})=>t.jsx(Ye,{checked:c.value,onCheckedChange:c.onChange,className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:z?"Active":"Inactive"}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx($e,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Starter"}),t.jsx(gt,{automationId:s,open:_,onOpenChange:v,onCustomSelect:()=>{u(!0),h("")}})]}),e.triggers.length===0&&!i?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["When should this automation run?"," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:"Add a starter"})," ","to get going."]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(c=>t.jsx(yt,{trigger:c,automationId:s},c.id))}),i&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:b,onChange:c=>h(c.target.value),onBlur:async()=>{const c=b.trim();if(!(!c||!K(c)))try{await C.mutateAsync({automation_id:s,type:"cron",cron_expression:c}),I.success("Starter added"),u(!1),h("")}catch{I.error("Failed to add starter")}},onKeyDown:async c=>{const L=b.trim();c.key==="Enter"&&L&&K(L)&&c.target.blur(),c.key==="Escape"&&(u(!1),h(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),b&&!K(b)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"invalid"}),C.isPending&&t.jsx(G,{size:13,className:"animate-spin text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 rounded text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity",onClick:()=>{u(!1),h("")},children:t.jsx(J,{size:13})})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Agent"}),t.jsx(jt,{selectedId:R||null,onChange:c=>g.setValue("agent_id",c??"",{shouldDirty:!0})})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Instructions"}),t.jsx(Ae,{tiptapDoc:m,setTiptapDoc:N,placeholder:"What should this automation do?",children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Te,{virtualMcpId:R||null}),t.jsxs("div",{className:"flex items-center justify-end gap-1.5 p-2.5",children:[t.jsx(Ie,{model:E,isLoading:V,credentialId:M||null,onCredentialChange:c=>{g.setValue("credential_id",c??"",{shouldDirty:!0}),g.setValue("model_id","",{shouldDirty:!0})},onModelChange:c=>g.setValue("model_id",c.modelId,{shouldDirty:!0}),placeholder:"Model"}),t.jsxs(Xe,{children:[t.jsx(Ze,{asChild:!0,children:t.jsxs(U,{type:"button",variant:"default",className:"h-8 gap-1.5 rounded-md px-3 text-sm font-medium",onClick:W,children:[t.jsx(it,{size:16}),"Test"]})}),t.jsx(et,{children:"Test Automation"})]})]})]})})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Run History"}),t.jsx(Ct,{automationId:s,triggerIds:e.triggers.map(c=>c.id)})]})]})]})}function _t(s,e,r){const n=B.c(13);let o;n[0]!==s?(o={connectionId:nt,orgId:s},n[0]=s,n[1]=o):o=n[1];const a=rt(o);let x;n[2]!==e||n[3]!==s||n[4]!==r?(x=q.automationRuns(s,e,r),n[2]=e,n[3]=s,n[4]=r,n[5]=x):x=n[5];let f;n[6]!==a||n[7]!==r?(f=async()=>{if(!a)throw new Error("MCP client not available");const y=await a.callTool({name:"COLLECTION_THREADS_LIST",arguments:{where:{trigger_ids:r},limit:20}});return(y.structuredContent??y).items??[]},n[6]=a,n[7]=r,n[8]=f):f=n[8];const d=r.length>0;let l;return n[9]!==x||n[10]!==f||n[11]!==d?(l={queryKey:x,queryFn:f,enabled:d},n[9]=x,n[10]=f,n[11]=d,n[12]=l):l=n[12],tt(l)}function Ct(s){const e=B.c(22),{automationId:r,triggerIds:n}=s,{org:o}=ae(),{switchToTask:a}=je(),[,x]=de(),f=Se(),{data:d,isLoading:l}=_t(o.id,r,n),y=n.length>0;let m;e[0]!==r||e[1]!==o.id||e[2]!==f||e[3]!==d||e[4]!==n?(m=i=>{const u=i.subject,b=d??[];b.find(C=>C.id===u)?f.setQueryData(q.automationRuns(o.id,r,n),b.map(C=>C.id===u?{...C,status:i.data.status,updated_at:new Date().toISOString()}:C)):f.invalidateQueries({queryKey:q.automationRuns(o.id,r,n)})},e[0]=r,e[1]=o.id,e[2]=f,e[3]=d,e[4]=n,e[5]=m):m=e[5];let j;if(e[6]!==o.id||e[7]!==y||e[8]!==m?(j={orgId:o.id,enabled:y,onTaskStatus:m},e[6]=o.id,e[7]=y,e[8]=m,e[9]=j):j=e[9],dt(j),l){let i;return e[10]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(G,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=i):i=e[10],i}if(!d||d.length===0){let i;return e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(le,{image:null,className:"mt-6",title:"No run history",description:"Run history will appear here when the automation has been triggered."}),e[11]=i):i=e[11],i}let S;e[12]!==x||e[13]!==a?(S=async i=>{await a(i),x(!0)},e[12]=x,e[13]=a,e[14]=S):S=e[14];const p=S;let _;if(e[15]!==p||e[16]!==d){let i;e[18]!==p?(i=u=>{const b=Z[u.status]??Z.completed,h=b.icon;return t.jsxs("button",{type:"button",className:"flex items-center gap-3 px-1 py-2.5 text-left hover:bg-accent/50 transition-colors cursor-pointer rounded-sm",onClick:()=>p(u.id),children:[t.jsx(h,{size:16,className:b.iconClassName}),t.jsx("span",{className:"flex-1 min-w-0 text-sm truncate",children:u.title}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:mt(new Date(u.updated_at),{addSuffix:!0})})]},u.id)},e[18]=p,e[19]=i):i=e[19],_=d.map(i),e[15]=p,e[16]=d,e[17]=_}else _=e[17];let v;return e[20]!==_?(v=t.jsx("div",{className:"flex flex-col divide-y divide-border",children:_}),e[20]=_,e[21]=v):v=e[21],v}function tr(){const s=B.c(36);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{automationId:r}=ve(e),n=be(),{org:o}=ae(),{data:a,isLoading:x}=ze(r),f=Oe(),[d,l]=T.useState(!1);let y;s[1]!==r||s[2]!==f||s[3]!==n||s[4]!==o?(y=async()=>{try{await f.mutateAsync(r),I.success("Automation deleted"),n({to:"/$org/$project/automations",params:{org:o.slug,project:X}})}catch{I.error("Failed to delete automation")}l(!1)},s[1]=r,s[2]=f,s[3]=n,s[4]=o,s[5]=y):y=s[5];const m=y;if(x){let g;return s[6]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(G,{size:24,className:"animate-spin text-muted-foreground"})}),s[6]=g):g=s[6],g}if(!a){let g;return s[7]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(le,{title:"Automation not found",description:"This automation may have been deleted."}),s[7]=g):g=s[7],g}let j;s[8]!==o.slug?(j=t.jsx(se,{children:t.jsx(Ve,{asChild:!0,children:t.jsx(_e,{to:"/$org/$project/automations",params:{org:o.slug,project:X},children:"Automations"})})}),s[8]=o.slug,s[9]=j):j=s[9];let S;s[10]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Le,{}),s[10]=S):S=s[10];let p;s[11]!==a.name?(p=t.jsx(se,{children:t.jsx(Fe,{children:a.name})}),s[11]=a.name,s[12]=p):p=s[12];let _;s[13]!==j||s[14]!==p?(_=t.jsx(Ue,{children:t.jsxs(Be,{children:[j,S,p]})}),s[13]=j,s[14]=p,s[15]=_):_=s[15];const v=_;let i;s[16]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(ce,{children:t.jsxs(U,{variant:"ghost",size:"sm",className:"h-7 text-destructive hover:text-destructive",onClick:()=>l(!0),children:[t.jsx(lt,{size:14}),"Delete"]})}),s[16]=i):i=s[16];let u;s[17]!==a||s[18]!==r?(u=t.jsx(bt,{automationId:r,automation:a},r),s[17]=a,s[18]=r,s[19]=u):u=s[19];let b;s[20]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(pe,{children:"Delete Automation"}),s[20]=b):b=s[20];let h;s[21]!==a.name?(h=t.jsxs(me,{children:[b,t.jsxs(ue,{children:['Are you sure you want to delete "',a.name,'"? This action cannot be undone.']})]}),s[21]=a.name,s[22]=h):h=s[22];let C;s[23]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(fe,{children:"Cancel"}),s[23]=C):C=s[23];let w;s[24]!==m?(w=t.jsxs(xe,{children:[C,t.jsx(he,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),s[24]=m,s[25]=w):w=s[25];let N;s[26]!==w||s[27]!==h?(N=t.jsxs(ge,{children:[h,w]}),s[26]=w,s[27]=h,s[28]=N):N=s[28];let D;s[29]!==d||s[30]!==N?(D=t.jsx(ye,{open:d,onOpenChange:l,children:N}),s[29]=d,s[30]=N,s[31]=D):D=s[31];let A;return s[32]!==v||s[33]!==D||s[34]!==u?(A=t.jsxs(we,{breadcrumb:v,children:[i,u,D]}),s[32]=v,s[33]=D,s[34]=u,s[35]=A):A=s[35],A}export{tr as default};
|
|
1
|
+
import{c as B,g as ve,e as be,u as ae,r as T,j as t,G as _e,O as X,v as I,B as U,t as Ce,I as Ne,w as Se,K as q}from"./index-BSJhN1RG.js";import{E as le}from"./empty-state-BAZkyFkJ.js";import{a as ce,V as we}from"./layout-ChW-YfXS.js";import{S as ke}from"./save-actions-BUFEFORl.js";import{u as De}from"./ai-providers-logos-bTbrc5Ff.js";import{T as Ae,a as Te,M as Ie,S as Z}from"./task-status-WGhIXJJC.js";import{V as ee}from"./select-virtual-mcp-CWjdI1yN.js";import{I as Me,e as Ee,t as te}from"./integration-icon-BN98cm9W.js";import{U as $e}from"./user-CJJOlR6d.js";import{c as ze,b as Oe,d as Re,e as Q,f as Pe}from"./use-automations-CnOmv87d.js";import{a as de}from"./index-CCPa_bdf.js";import{b as me,d as ue,c as pe,A as fe,e as xe,h as he,a as ge,f as ye}from"./alert-dialog-DZzr7w4N.js";import{b as se,d as Ve,c as Fe,e as Le,B as Ue,a as Be}from"./breadcrumb-Uk80Af5O.js";import{I as He}from"./input-CCTJ9v7L.js";import{c as re,a as Ke,d as Ge,e as We,f as qe,b as Qe,D as Je}from"./dropdown-menu-DHi2wczE.js";import{a as ne,b as oe,P as ie}from"./popover-D4IjUZyn.js";import{S as Ye}from"./switch-goMnPZtb.js";import{T as Xe,a as Ze,b as et}from"./tooltip-Czc-dfus.js";import{u as tt}from"./useQuery-CyMlQzLm.js";import{i as st,u as rt,a as nt}from"./constants-BoofM__A.js";import{b as ot}from"./use-virtual-mcp-Ot6iDc6P.js";import{i as it}from"./ArrowUp-BfMoxxyJ.js";import{s as H}from"./Type01-CEUNNrON.js";import{i as G}from"./Loading01-DzzF1Xn7.js";import{s as at}from"./Plus-B1MCV6m5.js";import{s as lt}from"./Trash01-5_SyecjT.js";import{s as J}from"./XClose-m99dDV1c.js";import{a as je,t as ct,b as dt}from"./context-DWuz1QPT.js";import{f as mt}from"./formatDistanceToNow-Cb2QZZJn.js";import"./XCircle-BWumx2Gc.js";import"./skeleton-BKlnApyk.js";import"./spinner-CmdUvk0v.js";import"./use-mcp-prompts-dq5_OWT9.js";import"./dialog-1XQgKf8N.js";import"./X-C5GtvldQ.js";import"./form-t62EdxrT.js";import"./label-DeuWE9eY.js";import"./index-B_edy8DH.js";import"./usage-BW6ztpN6.js";import"./ChevronDown-aN42FLyq.js";import"./org-ai-providers-DxV1GVfK.js";import"./useMutation-DD64AYhD.js";import"./AlertCircle-DMV-rZ7e.js";import"./RefreshCcw01-CxbGujDv.js";import"./Play-LM-itN1a.js";import"./card-Lf6x72jH.js";import"./toggle-group-CaVCHD4D.js";import"./avatar-9rgMXUO3.js";import"./User01-BsPm7RVz.js";import"./select-DT-iervo.js";import"./index-BdQq_4o_.js";import"./index-B7lieztO.js";import"./Check-Bma5KFCn.js";import"./ChevronUp-BbircQRT.js";import"./ArrowLeft-GATQHvMN.js";import"./use-copy-DbDDzd7N.js";import"./marked.esm-BaswSlok.js";import"./tabs-C3-SBSfv.js";import"./checkbox-hgQTbYiQ.js";import"./drawer-kTkYDBR8.js";import"./VideoRecorder-B3WVSf7U.js";import"./SearchMd-CQS6PDrb.js";import"./Settings01-_rJgA268.js";import"./use-mcp-resources-sGDI0dq5.js";import"./ChevronRight-C2FVB4C3.js";import"./collapsible-BZesHCHB.js";import"./index-BC02vDrU.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DHbjaKS6.js";import"./types-BH6fpPqs.js";import"./use-collections-Bv7ORhQ3.js";import"./useSuspenseInfiniteQuery-Df-iXD3q.js";import"./infiniteQueryObserver-hAAtfcB8.js";import"./use-create-virtual-mcp-UuZPWAj2.js";import"./Container-HyFkyfBi.js";import"./Dataflow03-B0pnz-uB.js";import"./Download01-vFqP5N3M.js";import"./List-DyQi4WIa.js";import"./FolderClosed-C9Qktm7G.js";import"./Grid01-DAUX1pwR.js";import"./Upload01-CqeU4e-W.js";import"./Zap-khXF6TnI.js";import"./decopilot-events-Brt4gAR6.js";import"./index-DMTUegke.js";import"./differenceInSeconds-NQ4PDo0z.js";function K(s){const e=s.trim().split(/\s+/);return e.length!==5?!1:e.every(r=>/^[\d*/,\-]+$/.test(r))}function ut(s){if(!s)return"Unknown schedule";const e=s.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const r=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(r)return`Every ${r[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const f=parseInt(o[1]??"1");return f%7===0?`Every ${f/7} weeks`:`Every ${f} days`}const a=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(a){const f=(a[2]??"0").padStart(2,"0"),d=(a[1]??"0").padStart(2,"0");return`Every day at ${f}:${d} UTC`}const x=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(x){const d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(x[3]??"0")]??"day",l=(x[2]??"0").padStart(2,"0"),y=(x[1]??"0").padStart(2,"0");return`Every ${d} at ${l}:${y} UTC`}return s}function pt(s,e){const r=Math.max(1,s);switch(e){case"minutes":return r===1?"* * * * *":`*/${r} * * * *`;case"hours":return r===1?"0 * * * *":`0 */${r} * * *`;case"days":return r===1?"0 0 * * *":`0 0 */${r} * *`;case"weeks":return r===1?"0 0 * * 1":`0 0 */${r*7} * *`}}function ft(s){const e=s.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const r=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(r)return{count:parseInt(r[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const o=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(o){const a=parseInt(o[1]);return a%7===0?{count:a/7,unit:"weeks"}:{count:a,unit:"days"}}return null}function xt(s,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[s]??s:s}const ht=[{label:"Minute",cron:"* * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}];function gt(s){const e=B.c(26),{automationId:r,open:n,onOpenChange:o,onCustomSelect:a}=s,x=Q(),[f,d]=T.useState(!1),l=n??f;let y;e[0]!==o?(y=N=>{o?o(N):d(N)},e[0]=o,e[1]=y):y=e[1];const m=y;let j;e[2]!==x||e[3]!==r||e[4]!==m?(j=async N=>{try{await x.mutateAsync({automation_id:r,type:"cron",cron_expression:N}),I.success("Starter added"),m(!1)}catch(D){const A=D,g=A instanceof Error?A.message:"Failed to add starter";I.error(g)}},e[2]=x,e[3]=r,e[4]=m,e[5]=j):j=e[5];const S=j;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Ke,{asChild:!0,children:t.jsxs(U,{variant:"outline",size:"sm",children:[t.jsx(at,{size:14}),"Add Starter"]})}),e[6]=p):p=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(Ge,{className:"gap-2.5",children:[t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),"Every..."]}),e[7]=_):_=e[7];let v;e[8]!==x||e[9]!==S?(v=ht.map(N=>t.jsxs(re,{className:"gap-2.5",onSelect:()=>S(N.cron),disabled:x.isPending,children:[t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),"Every ",N.label]},N.cron)),e[8]=x,e[9]=S,e[10]=v):v=e[10];let i;e[11]!==v?(i=t.jsxs(We,{children:[_,t.jsx(qe,{className:"w-[160px]",children:v})]}),e[11]=v,e[12]=i):i=e[12];let u;e[13]!==m||e[14]!==a?(u=()=>{m(!1),a?.()},e[13]=m,e[14]=a,e[15]=u):u=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),e[16]=b):b=e[16];let h;e[17]!==u?(h=t.jsxs(re,{className:"gap-2.5",onSelect:u,children:[b,"Custom (cron)"]}),e[17]=u,e[18]=h):h=e[18];let C;e[19]!==i||e[20]!==h?(C=t.jsxs(Qe,{align:"end",className:"w-[200px]",children:[i,h]}),e[19]=i,e[20]=h,e[21]=C):C=e[21];let w;return e[22]!==m||e[23]!==l||e[24]!==C?(w=t.jsxs(Je,{open:l,onOpenChange:m,children:[p,C]}),e[22]=m,e[23]=l,e[24]=C,e[25]=w):w=e[25],w}function yt(s){const e=B.c(56),{trigger:r,automationId:n}=s,o=Pe(),a=Q(),[x,f]=T.useState(!1);let d;e[0]!==r.cron_expression?(d=r.cron_expression?ft(r.cron_expression):null,e[0]=r.cron_expression,e[1]=d):d=e[1];const l=d,[y,m]=T.useState(l?.count??1),[j,S]=T.useState(!1),[p,_]=T.useState(r.cron_expression??""),v=o.isPending||a.isPending,i=r.type==="cron";let u;e[2]!==n||e[3]!==o||e[4]!==r.id?(u=async()=>{try{await o.mutateAsync({trigger_id:r.id,automation_id:n}),I.success("Starter removed")}catch{I.error("Failed to remove starter")}f(!1)},e[2]=n,e[3]=o,e[4]=r.id,e[5]=u):u=e[5];const b=u;let h;e[6]!==a||e[7]!==n||e[8]!==p||e[9]!==o||e[10]!==r.cron_expression||e[11]!==r.id?(h=async()=>{const k=p.trim();if(!k||!K(k)||k===r.cron_expression){S(!1),_(r.cron_expression??"");return}try{await a.mutateAsync({automation_id:n,type:"cron",cron_expression:k}),await o.mutateAsync({trigger_id:r.id,automation_id:n}),S(!1)}catch{I.error("Failed to update starter"),_(r.cron_expression??""),S(!1)}},e[6]=a,e[7]=n,e[8]=p,e[9]=o,e[10]=r.cron_expression,e[11]=r.id,e[12]=h):h=e[12];const C=h;let w;e[13]!==a||e[14]!==n||e[15]!==l||e[16]!==o||e[17]!==r.cron_expression||e[18]!==r.id?(w=async k=>{if(!l)return;const W=Math.max(1,k),c=pt(W,l.unit);if(c!==r.cron_expression)try{await a.mutateAsync({automation_id:n,type:"cron",cron_expression:c}),await o.mutateAsync({trigger_id:r.id,automation_id:n})}catch{I.error("Failed to update starter"),m(l.count)}},e[13]=a,e[14]=n,e[15]=l,e[16]=o,e[17]=r.cron_expression,e[18]=r.id,e[19]=w):w=e[19];const N=w;let D;e[20]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),e[20]=D):D=e[20];let A;e[21]!==y||e[22]!==p||e[23]!==N||e[24]!==C||e[25]!==l||e[26]!==i||e[27]!==j||e[28]!==v||e[29]!==r.cron_expression||e[30]!==r.event_type?(A=l&&i?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:"Every"}),t.jsx("input",{type:"number",min:1,value:y,onChange:k=>m(parseInt(k.target.value)||1),onBlur:()=>N(y),onKeyDown:k=>{k.key==="Enter"&&k.target.blur(),k.key==="Escape"&&m(l.count)},disabled:v,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus:outline-none focus:ring-1 focus:ring-ring"}),t.jsx("span",{className:"text-sm",children:xt(l.unit,y)})]}):i&&j?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:p,onChange:k=>_(k.target.value),onBlur:C,onKeyDown:k=>{k.key==="Enter"&&k.target.blur(),k.key==="Escape"&&(S(!1),_(r.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),p&&!K(p)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"invalid"})]}):t.jsx("span",{className:"text-sm flex-1 font-mono text-xs text-muted-foreground",children:i?ut(r.cron_expression??""):`${r.event_type} event`}),e[21]=y,e[22]=p,e[23]=N,e[24]=C,e[25]=l,e[26]=i,e[27]=j,e[28]=v,e[29]=r.cron_expression,e[30]=r.event_type,e[31]=A):A=e[31];let g;e[32]!==v?(g=v&&t.jsx(G,{size:13,className:"animate-spin text-muted-foreground"}),e[32]=v,e[33]=g):g=e[33];let z;e[34]!==l||e[35]!==i||e[36]!==j||e[37]!==r.cron_expression?(z=i&&!l&&!j&&t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{_(r.cron_expression??""),S(!0)},children:t.jsx(Ee,{size:13,className:"text-muted-foreground"})}),e[34]=l,e[35]=i,e[36]=j,e[37]=r.cron_expression,e[38]=z):z=e[38];let R;e[39]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>f(!0),children:t.jsx(J,{size:13,className:"text-muted-foreground"})}),e[39]=R):R=e[39];let M;e[40]!==g||e[41]!==z?(M=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[g,z,R]}),e[40]=g,e[41]=z,e[42]=M):M=e[42];let O;e[43]!==M||e[44]!==A?(O=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[D,A,M]}),e[43]=M,e[44]=A,e[45]=O):O=e[45];let P;e[46]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs(me,{children:[t.jsx(pe,{children:"Remove Starter"}),t.jsx(ue,{children:"Are you sure you want to remove this starter?"})]}),e[46]=P):P=e[46];let V;e[47]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(fe,{children:"Cancel"}),e[47]=V):V=e[47];let E;e[48]!==b?(E=t.jsxs(ge,{children:[P,t.jsxs(xe,{children:[V,t.jsx(he,{onClick:b,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),e[48]=b,e[49]=E):E=e[49];let $;e[50]!==x||e[51]!==E?($=t.jsx(ye,{open:x,onOpenChange:f,children:E}),e[50]=x,e[51]=E,e[52]=$):$=e[52];let F;return e[53]!==O||e[54]!==$?(F=t.jsxs(t.Fragment,{children:[O,$]}),e[53]=O,e[54]=$,e[55]=F):F=e[55],F}function jt(s){const e=B.c(41),{selectedId:r,onChange:n}=s,[o,a]=T.useState(!1),x=ot();let f,d;e[0]!==x||e[1]!==r?(d=x.filter(vt),f=r?d.find(p=>p.id===r):null,e[0]=x,e[1]=r,e[2]=f,e[3]=d):(f=e[2],d=e[3]);const l=f;if(l){let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(te,{size:16}),e[4]=p):p=e[4];let _;e[5]!==l.icon||e[6]!==l.title?(_=t.jsx(Me,{icon:l.icon,name:l.title,size:"sm",fallbackIcon:p,className:"rounded-md shrink-0"}),e[5]=l.icon,e[6]=l.title,e[7]=_):_=e[7];let v;e[8]!==l.title?(v=t.jsx("span",{className:"text-sm font-medium truncate",children:l.title}),e[8]=l.title,e[9]=v):v=e[9];let i;e[10]!==_||e[11]!==v?(i=t.jsx(ne,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex items-center gap-3 flex-1 min-w-0 text-left cursor-pointer",children:[_,v]})}),e[10]=_,e[11]=v,e[12]=i):i=e[12];let u;e[13]!==n?(u=A=>{n(A),a(!1)},e[13]=n,e[14]=u):u=e[14];let b;e[15]!==r||e[16]!==u||e[17]!==d?(b=t.jsx(oe,{className:"w-[550px] p-0 overflow-hidden",align:"start",sideOffset:8,children:t.jsx(ee,{virtualMcps:d,selectedVirtualMcpId:r,onVirtualMcpChange:u})}),e[15]=r,e[16]=u,e[17]=d,e[18]=b):b=e[18];let h;e[19]!==o||e[20]!==i||e[21]!==b?(h=t.jsxs(ie,{open:o,onOpenChange:a,children:[i,b]}),e[19]=o,e[20]=i,e[21]=b,e[22]=h):h=e[22];let C;e[23]!==n?(C=()=>n(null),e[23]=n,e[24]=C):C=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(J,{size:13}),e[25]=w):w=e[25];let N;e[26]!==C?(N=t.jsx(U,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 size-7 text-muted-foreground hover:text-foreground",onClick:C,title:"Remove agent",children:w}),e[26]=C,e[27]=N):N=e[27];let D;return e[28]!==N||e[29]!==h?(D=t.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border bg-background hover:bg-accent/50 transition-colors",children:[h,N]}),e[28]=N,e[29]=h,e[30]=D):D=e[30],D}let y;e[31]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ne,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border hover:bg-accent/50 transition-colors w-full text-left cursor-pointer",children:[t.jsxs("div",{className:"relative flex items-center justify-center size-8 rounded-md text-muted-foreground/75 shrink-0",children:[t.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"agent-picker-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[t.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),t.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),t.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),t.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"5.5",stroke:"url(#agent-picker-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),t.jsx(te,{size:16})]}),t.jsx("span",{className:"text-sm text-muted-foreground",children:"No agent selected. All connections available."})]})}),e[31]=y):y=e[31];let m;e[32]!==n?(m=p=>{n(p),a(!1)},e[32]=n,e[33]=m):m=e[33];let j;e[34]!==r||e[35]!==m||e[36]!==d?(j=t.jsx(oe,{className:"w-[550px] p-0 overflow-hidden",align:"start",sideOffset:8,children:t.jsx(ee,{virtualMcps:d,selectedVirtualMcpId:r,onVirtualMcpChange:m})}),e[34]=r,e[35]=m,e[36]=d,e[37]=j):j=e[37];let S;return e[38]!==o||e[39]!==j?(S=t.jsxs(ie,{open:o,onOpenChange:a,children:[y,j]}),e[38]=o,e[39]=j,e[40]=S):S=e[40],S}function vt(s){return!s.id||!st(s.id)}function bt({automationId:s,automation:e}){const r=Re(),{createTask:n,setVirtualMcpId:o,setSelectedModel:a,sendMessage:x,credentialId:f,model:d}=je(),[,l]=de(),y=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[m,j]=T.useState(y),[S,p]=T.useState(y),[_,v]=T.useState(!1),[i,u]=T.useState(!1),[b,h]=T.useState(""),C=Q(),w=T.useRef(!1),N=c=>{j(c),w.current||(w.current=!0,y||p(c))},D=e.models?.credentialId||f||"",A=e.models?.thinking?.id||d?.modelId||"",g=Ce({defaultValues:{name:e.name,active:e.active,agent_id:e.agent?.id??"",credential_id:D,model_id:A}}),z=g.watch("active"),R=g.watch("agent_id"),M=g.watch("credential_id"),O=g.watch("model_id"),{models:P,isLoading:V}=De(M||void 0),E=P.find(c=>c.modelId===O)??null,$=async()=>{const c=g.getValues();try{const L=c.credential_id&&c.model_id?c.credential_id:"",Y=c.credential_id&&c.model_id?c.model_id:"";return await r.mutateAsync({id:s,name:c.name,active:c.active,agent:{id:c.agent_id},models:{credentialId:L,thinking:{id:Y}},messages:ct(m),temperature:0}),g.reset({...c,credential_id:L,model_id:Y}),p(m),I.success("Automation saved"),!0}catch{return I.error("Failed to save automation"),!1}},F=()=>{g.reset(),N(S)},k=g.formState.isDirty||JSON.stringify(m??null)!==JSON.stringify(S??null),W=async()=>{if(k&&!await $())return;if(!m){I.error("No instructions configured for this automation");return}const c=g.getValues();o(c.agent_id||null),E&&M&&a({...E,keyId:M}),l(!0),n(),setTimeout(()=>{x(m,{toolApprovalLevel:"auto"})},0)};return t.jsxs(t.Fragment,{children:[t.jsx(ce,{children:t.jsx(ke,{onSave:async()=>{await $()},onUndo:F,isDirty:k,isSaving:r.isPending})}),t.jsxs("div",{className:"max-w-2xl mx-auto w-full px-6 py-6 flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(He,{...g.register("name"),placeholder:"Automation name",className:"border border-transparent shadow-none px-0 text-2xl md:text-2xl font-semibold h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ne,{control:g.control,name:"active",render:({field:c})=>t.jsx(Ye,{checked:c.value,onCheckedChange:c.onChange,className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:z?"Active":"Inactive"}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx($e,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Starter"}),t.jsx(gt,{automationId:s,open:_,onOpenChange:v,onCustomSelect:()=>{u(!0),h("")}})]}),e.triggers.length===0&&!i?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["When should this automation run?"," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:"Add a starter"})," ","to get going."]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(c=>t.jsx(yt,{trigger:c,automationId:s},c.id))}),i&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(H,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:b,onChange:c=>h(c.target.value),onBlur:async()=>{const c=b.trim();if(!(!c||!K(c)))try{await C.mutateAsync({automation_id:s,type:"cron",cron_expression:c}),I.success("Starter added"),u(!1),h("")}catch{I.error("Failed to add starter")}},onKeyDown:async c=>{const L=b.trim();c.key==="Enter"&&L&&K(L)&&c.target.blur(),c.key==="Escape"&&(u(!1),h(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),b&&!K(b)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:"invalid"}),C.isPending&&t.jsx(G,{size:13,className:"animate-spin text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 rounded text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity",onClick:()=>{u(!1),h("")},children:t.jsx(J,{size:13})})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Agent"}),t.jsx(jt,{selectedId:R||null,onChange:c=>g.setValue("agent_id",c??"",{shouldDirty:!0})})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Instructions"}),t.jsx(Ae,{tiptapDoc:m,setTiptapDoc:N,placeholder:"What should this automation do?",children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Te,{virtualMcpId:R||null}),t.jsxs("div",{className:"flex items-center justify-end gap-1.5 p-2.5",children:[t.jsx(Ie,{model:E,isLoading:V,credentialId:M||null,onCredentialChange:c=>{g.setValue("credential_id",c??"",{shouldDirty:!0}),g.setValue("model_id","",{shouldDirty:!0})},onModelChange:c=>g.setValue("model_id",c.modelId,{shouldDirty:!0}),placeholder:"Model"}),t.jsxs(Xe,{children:[t.jsx(Ze,{asChild:!0,children:t.jsxs(U,{type:"button",variant:"default",className:"h-8 gap-1.5 rounded-md px-3 text-sm font-medium",onClick:W,children:[t.jsx(it,{size:16}),"Test"]})}),t.jsx(et,{children:"Test Automation"})]})]})]})})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:"Run History"}),t.jsx(Ct,{automationId:s,triggerIds:e.triggers.map(c=>c.id)})]})]})]})}function _t(s,e,r){const n=B.c(13);let o;n[0]!==s?(o={connectionId:nt,orgId:s},n[0]=s,n[1]=o):o=n[1];const a=rt(o);let x;n[2]!==e||n[3]!==s||n[4]!==r?(x=q.automationRuns(s,e,r),n[2]=e,n[3]=s,n[4]=r,n[5]=x):x=n[5];let f;n[6]!==a||n[7]!==r?(f=async()=>{if(!a)throw new Error("MCP client not available");const y=await a.callTool({name:"COLLECTION_THREADS_LIST",arguments:{where:{trigger_ids:r},limit:20}});return(y.structuredContent??y).items??[]},n[6]=a,n[7]=r,n[8]=f):f=n[8];const d=r.length>0;let l;return n[9]!==x||n[10]!==f||n[11]!==d?(l={queryKey:x,queryFn:f,enabled:d},n[9]=x,n[10]=f,n[11]=d,n[12]=l):l=n[12],tt(l)}function Ct(s){const e=B.c(22),{automationId:r,triggerIds:n}=s,{org:o}=ae(),{switchToTask:a}=je(),[,x]=de(),f=Se(),{data:d,isLoading:l}=_t(o.id,r,n),y=n.length>0;let m;e[0]!==r||e[1]!==o.id||e[2]!==f||e[3]!==d||e[4]!==n?(m=i=>{const u=i.subject,b=d??[];b.find(C=>C.id===u)?f.setQueryData(q.automationRuns(o.id,r,n),b.map(C=>C.id===u?{...C,status:i.data.status,updated_at:new Date().toISOString()}:C)):f.invalidateQueries({queryKey:q.automationRuns(o.id,r,n)})},e[0]=r,e[1]=o.id,e[2]=f,e[3]=d,e[4]=n,e[5]=m):m=e[5];let j;if(e[6]!==o.id||e[7]!==y||e[8]!==m?(j={orgId:o.id,enabled:y,onTaskStatus:m},e[6]=o.id,e[7]=y,e[8]=m,e[9]=j):j=e[9],dt(j),l){let i;return e[10]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(G,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=i):i=e[10],i}if(!d||d.length===0){let i;return e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(le,{image:null,className:"mt-6",title:"No run history",description:"Run history will appear here when the automation has been triggered."}),e[11]=i):i=e[11],i}let S;e[12]!==x||e[13]!==a?(S=async i=>{await a(i),x(!0)},e[12]=x,e[13]=a,e[14]=S):S=e[14];const p=S;let _;if(e[15]!==p||e[16]!==d){let i;e[18]!==p?(i=u=>{const b=Z[u.status]??Z.completed,h=b.icon;return t.jsxs("button",{type:"button",className:"flex items-center gap-3 px-1 py-2.5 text-left hover:bg-accent/50 transition-colors cursor-pointer rounded-sm",onClick:()=>p(u.id),children:[t.jsx(h,{size:16,className:b.iconClassName}),t.jsx("span",{className:"flex-1 min-w-0 text-sm truncate",children:u.title}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:mt(new Date(u.updated_at),{addSuffix:!0})})]},u.id)},e[18]=p,e[19]=i):i=e[19],_=d.map(i),e[15]=p,e[16]=d,e[17]=_}else _=e[17];let v;return e[20]!==_?(v=t.jsx("div",{className:"flex flex-col divide-y divide-border",children:_}),e[20]=_,e[21]=v):v=e[21],v}function tr(){const s=B.c(36);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{automationId:r}=ve(e),n=be(),{org:o}=ae(),{data:a,isLoading:x}=ze(r),f=Oe(),[d,l]=T.useState(!1);let y;s[1]!==r||s[2]!==f||s[3]!==n||s[4]!==o?(y=async()=>{try{await f.mutateAsync(r),I.success("Automation deleted"),n({to:"/$org/$project/automations",params:{org:o.slug,project:X}})}catch{I.error("Failed to delete automation")}l(!1)},s[1]=r,s[2]=f,s[3]=n,s[4]=o,s[5]=y):y=s[5];const m=y;if(x){let g;return s[6]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(G,{size:24,className:"animate-spin text-muted-foreground"})}),s[6]=g):g=s[6],g}if(!a){let g;return s[7]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(le,{title:"Automation not found",description:"This automation may have been deleted."}),s[7]=g):g=s[7],g}let j;s[8]!==o.slug?(j=t.jsx(se,{children:t.jsx(Ve,{asChild:!0,children:t.jsx(_e,{to:"/$org/$project/automations",params:{org:o.slug,project:X},children:"Automations"})})}),s[8]=o.slug,s[9]=j):j=s[9];let S;s[10]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Le,{}),s[10]=S):S=s[10];let p;s[11]!==a.name?(p=t.jsx(se,{children:t.jsx(Fe,{children:a.name})}),s[11]=a.name,s[12]=p):p=s[12];let _;s[13]!==j||s[14]!==p?(_=t.jsx(Ue,{children:t.jsxs(Be,{children:[j,S,p]})}),s[13]=j,s[14]=p,s[15]=_):_=s[15];const v=_;let i;s[16]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(ce,{children:t.jsxs(U,{variant:"ghost",size:"sm",className:"h-7 text-destructive hover:text-destructive",onClick:()=>l(!0),children:[t.jsx(lt,{size:14}),"Delete"]})}),s[16]=i):i=s[16];let u;s[17]!==a||s[18]!==r?(u=t.jsx(bt,{automationId:r,automation:a},r),s[17]=a,s[18]=r,s[19]=u):u=s[19];let b;s[20]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(pe,{children:"Delete Automation"}),s[20]=b):b=s[20];let h;s[21]!==a.name?(h=t.jsxs(me,{children:[b,t.jsxs(ue,{children:['Are you sure you want to delete "',a.name,'"? This action cannot be undone.']})]}),s[21]=a.name,s[22]=h):h=s[22];let C;s[23]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(fe,{children:"Cancel"}),s[23]=C):C=s[23];let w;s[24]!==m?(w=t.jsxs(xe,{children:[C,t.jsx(he,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),s[24]=m,s[25]=w):w=s[25];let N;s[26]!==w||s[27]!==h?(N=t.jsxs(ge,{children:[h,w]}),s[26]=w,s[27]=h,s[28]=N):N=s[28];let D;s[29]!==d||s[30]!==N?(D=t.jsx(ye,{open:d,onOpenChange:l,children:N}),s[29]=d,s[30]=N,s[31]=D):D=s[31];let A;return s[32]!==v||s[33]!==D||s[34]!==u?(A=t.jsxs(we,{breadcrumb:v,children:[i,u,D]}),s[32]=v,s[33]=D,s[34]=u,s[35]=A):A=s[35],A}export{tr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,u as _,r as $,O as u,j as e,B as p,D as B,v as h}from"./index-
|
|
1
|
+
import{e as S,u as _,r as $,O as u,j as e,B as p,D as B,v as h}from"./index-BSJhN1RG.js";import{C as I}from"./collection-search-cNt60-AL.js";import{E as L}from"./empty-state-BAZkyFkJ.js";import{P as l}from"./index-CCPa_bdf.js";import{u as M,a as E,b as H}from"./use-automations-CnOmv87d.js";import{u as O}from"./use-list-state-BRDiV7d7.js";import{U as R}from"./user-CJJOlR6d.js";import{f as F,a as K,b as U,c as G,d as J,e as V,A as q,h as Q}from"./alert-dialog-DZzr7w4N.js";import{B as W}from"./badge-CmRHjnH-.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-Uk80Af5O.js";import{D as se,a as te,b as ae,c as C}from"./dropdown-menu-DHi2wczE.js";import{T as re,a as ie,b as y,c as ne,d as oe,e as c}from"./table-5ZO5b8Po.js";import{i as le,n as ce}from"./ArrowUp-BfMoxxyJ.js";import{a as de,i as me,s as ue}from"./RefreshCcw01-CxbGujDv.js";import{i as x}from"./Loading01-DzzF1Xn7.js";import{s as A}from"./Plus-B1MCV6m5.js";import{s as pe}from"./Trash01-5_SyecjT.js";import"./SearchMd-CQS6PDrb.js";import"./input-CCTJ9v7L.js";import"./useQuery-CyMlQzLm.js";import"./useMutation-DD64AYhD.js";import"./tooltip-Czc-dfus.js";import"./index-B7lieztO.js";import"./X-C5GtvldQ.js";import"./constants-BoofM__A.js";import"./use-view-mode-BAmicVzY.js";import"./avatar-9rgMXUO3.js";import"./User01-BsPm7RVz.js";import"./ChevronRight-C2FVB4C3.js";import"./Check-Bma5KFCn.js";function Ue(){const g=S(),{org:j,locator:D}=_(),{data:r,isLoading:k}=M(),n=E(),T=H(),[d,m]=$.useState(null),t=O({namespace:j.slug,resource:"automations",defaultViewMode:"table"}),f=D.split("/")[0]??j.slug??u,b=async()=>{try{const s=await n.mutateAsync({name:"New Automation",agent:{id:"",mode:"passthrough"},messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0});g({to:"/$org/$project/automations/$automationId",params:{org:f,project:u,automationId:s.id}})}catch{h.error("Failed to create automation")}},z=async()=>{if(d)try{await T.mutateAsync(d.id),h.success("Automation deleted")}catch{h.error("Failed to delete automation")}finally{m(null)}},N=s=>{g({to:"/$org/$project/automations/$automationId",params:{org:f,project:u,automationId:s}})},v=(r??[]).filter(s=>t.searchTerm?s.name.toLowerCase().includes(t.searchTerm.toLowerCase()):!0).sort((s,a)=>{if(!t.sortDirection)return 0;const o=t.sortDirection==="asc"?1:-1,i=t.sortKey;return i==="name"?s.name.localeCompare(a.name)*o:i==="active"?((s.active?1:0)-(a.active?1:0))*o:i==="trigger_count"?((s.trigger_count??0)-(a.trigger_count??0))*o:0}),P="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider group transition-colors select-none";return e.jsxs(l,{children:[e.jsxs(l.Header,{children:[e.jsx(l.Header.Left,{children:e.jsx(X,{children:e.jsx(Y,{children:e.jsx(Z,{children:e.jsxs(ee,{className:"flex items-center gap-2",children:["Automations",r&&r.length>0&&e.jsxs("span",{className:"hidden sm:inline text-xs font-normal text-muted-foreground tabular-nums",children:[r.length," total"]})]})})})})}),e.jsx(l.Header.Right,{children:e.jsxs(p,{size:"sm",onClick:b,disabled:n.isPending,className:"h-7 w-7 px-0 sm:w-auto sm:px-3",children:[n.isPending?e.jsx(x,{size:14,className:"animate-spin"}):e.jsx(A,{size:14}),e.jsx("span",{className:"hidden sm:inline",children:"Create Automation"})]})})]}),e.jsx(I,{value:t.search,onChange:t.setSearch,placeholder:"Search automations...",onKeyDown:s=>{s.key==="Escape"&&(t.setSearch(""),s.target.blur())}}),e.jsxs(l.Content,{children:[k?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(x,{size:24,className:"animate-spin text-muted-foreground"})}):!r||r.length===0?e.jsx("div",{className:"flex items-center h-full",children:e.jsx(L,{image:e.jsx(de,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations run tasks on a schedule or in response to events.",actions:e.jsxs(p,{size:"sm",onClick:b,disabled:n.isPending,children:[n.isPending?e.jsx(x,{size:14,className:"animate-spin"}):e.jsx(A,{size:14}),"Create Automation"]})})}):e.jsxs(re,{className:"w-full border-collapse",children:[e.jsx(ie,{className:"border-b-0",children:e.jsx(y,{className:"h-9 hover:bg-transparent border-b border-border",children:[{id:"name",label:"Name",className:"flex-1 min-w-0 cursor-pointer hover:bg-accent"},{id:"active",label:"Status",className:"w-24 shrink-0 cursor-pointer hover:bg-accent"},{id:"trigger_count",label:"Triggers",className:"w-24 shrink-0 cursor-pointer hover:bg-accent"},{id:"created_by",label:"Created by",className:"w-40 shrink-0"},{id:"_actions",label:"",className:"w-12 shrink-0"}].map(({id:s,label:a,className:o})=>{const i=t.sortKey===s,w=s!=="created_by"&&s!=="_actions";return e.jsx(ne,{className:B(P,o),onClick:w?()=>t.handleSort(s):void 0,children:e.jsxs("span",{className:"flex items-center gap-1",children:[a,w&&e.jsxs("span",{className:"w-4 flex items-center justify-center",children:[i&&t.sortDirection==="asc"&&e.jsx(le,{size:12,className:"text-muted-foreground"}),i&&t.sortDirection==="desc"&&e.jsx(ce,{size:12,className:"text-muted-foreground"})]})]})},s)})})}),e.jsx(oe,{children:v.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"py-16 text-center",children:e.jsxs("span",{className:"text-sm text-muted-foreground",children:['No automations match "',t.search,'"']})})}):v.map(s=>e.jsxs(y,{className:"group/data-row border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>N(s.id),children:[e.jsx(c,{className:"px-5 py-4 h-16 align-middle text-sm font-medium text-foreground flex-1 min-w-0",children:s.name}),e.jsx(c,{className:"px-5 py-4 h-16 align-middle w-24 shrink-0",children:e.jsx(W,{variant:s.active?"default":"secondary",children:s.active?"Active":"Inactive"})}),e.jsx(c,{className:"px-5 py-4 h-16 align-middle text-sm text-muted-foreground w-24 shrink-0",children:s.trigger_count}),e.jsx(c,{className:"px-5 py-4 h-16 align-middle w-40 shrink-0",children:e.jsx(R,{id:s.created_by})}),e.jsx(c,{className:"px-5 py-4 h-16 align-middle w-12 shrink-0",children:e.jsxs(se,{children:[e.jsx(te,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:a=>a.stopPropagation(),children:e.jsx(me,{size:20})})}),e.jsxs(ae,{align:"end",onClick:a=>a.stopPropagation(),children:[e.jsxs(C,{onClick:a=>{a.stopPropagation(),N(s.id)},children:[e.jsx(ue,{size:16}),"Open"]}),e.jsxs(C,{variant:"destructive",onClick:a=>{a.stopPropagation(),m({id:s.id,name:s.name})},children:[e.jsx(pe,{size:16}),"Delete"]})]})]})})]},s.id))})]}),e.jsx(F,{open:!!d,onOpenChange:s=>!s&&m(null),children:e.jsxs(K,{children:[e.jsxs(U,{children:[e.jsx(G,{children:"Delete Automation?"}),e.jsxs(J,{children:["This action cannot be undone. This will permanently delete"," ",e.jsx("span",{className:"font-medium text-foreground",children:d?.name}),". All triggers will be removed."]})]}),e.jsxs(V,{children:[e.jsx(q,{children:"Cancel"}),e.jsx(Q,{onClick:z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})})]})]})}export{Ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,r as V,D as m,W as S,ay as $,az as O,aA as U}from"./index-
|
|
1
|
+
import{c as k,j as i,r as V,D as m,W as S,ay as $,az as O,aA as U}from"./index-BSJhN1RG.js";import{s as D}from"./User01-BsPm7RVz.js";function L(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=m("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(U,{"data-slot":"avatar",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=m("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($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(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=m("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(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["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"],W="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function _(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("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"}}),B=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),G=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 H(r){const e=k.c(35);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,[f,x]=V.useState(!1);let F;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],F=c;break e}F=t}const C=F;let z;e:{if(j){z=W;break e}if(typeof t=="string"){let c;e[11]!==t?(c=_(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;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 E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(D,{size:G(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(M,{src:l,loading:"lazy",alt:"Avatar",className:m(B({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(T,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(L,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function J(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,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(H,{shape:b,url:l,fallback:t,size:f,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]=f,e[16]=l,e[17]=x):x=e[17],x}J.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{J as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,D as u,j as l,M as v,W as g}from"./index-
|
|
1
|
+
import{c as d,D as u,j as l,M as v,W as g}from"./index-BSJhN1RG.js";const b=g("inline-flex items-center justify-center rounded-full border px-2 py-0.5 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/50 focus-visible:ring-[3px] 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",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?v:"span";let i;e[5]!==r||e[6]!==t?(i=u(b({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{x as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-BSJhN1RG.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,D as m,j as o,M as u}from"./index-
|
|
1
|
+
import{c,D as m,j as o,M as u}from"./index-BSJhN1RG.js";import{i as d}from"./ChevronRight-C2FVB4C3.js";function b(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?u:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==l||e[7]!==s||e[8]!==i?(n=o.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=n):n=e[9],n}function j(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function h(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??o.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let n;return e[8]!==s||e[9]!==l||e[10]!==i?(n=o.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=n):n=e[11],n}export{b as B,x as a,N as b,j as c,g as d,h as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,D as c,j as d}from"./index-
|
|
1
|
+
import{c as l,D as c,j as d}from"./index-BSJhN1RG.js";function x(a){const e=l.c(8);let r,s;e[0]!==a?({className:r,...s}=a,e[0]=a,e[1]=r,e[2]=s):(r=e[1],s=e[2]);let o;e[3]!==r?(o=c("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border shadow-xs",r),e[3]=r,e[4]=o):o=e[4];let t;return e[5]!==s||e[6]!==o?(t=d.jsx("div",{"data-slot":"card",className:o,...s}),e[5]=s,e[6]=o,e[7]=t):t=e[7],t}export{x as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,D as n,j as c,aE as l,aF as m}from"./index-
|
|
1
|
+
import{c as d,D as n,j as c,aE as l,aF as m}from"./index-BSJhN1RG.js";import{i as b}from"./Check-Bma5KFCn.js";function x(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=n("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(l,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{x as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,j as i}from"./index-
|
|
1
|
+
import{c as t,j as i}from"./index-BSJhN1RG.js";import{R as a,C as r,a as n}from"./index-BC02vDrU.js";function f(o){const l=t.c(4);let e;l[0]!==o?({...e}=o,l[0]=o,l[1]=e):e=l[1];let s;return l[2]!==e?(s=i.jsx(a,{"data-slot":"collapsible",...e}),l[2]=e,l[3]=s):s=l[3],s}function b(o){const l=t.c(4);let e;l[0]!==o?({...e}=o,l[0]=o,l[1]=e):e=l[1];let s;return l[2]!==e?(s=i.jsx(r,{"data-slot":"collapsible-trigger",...e}),l[2]=e,l[3]=s):s=l[3],s}function C(o){const l=t.c(4);let e;l[0]!==o?({...e}=o,l[0]=o,l[1]=e):e=l[1];let s;return l[2]!==e?(s=i.jsx(n,{"data-slot":"collapsible-content",...e}),l[2]=e,l[3]=s):s=l[3],s}export{f as C,b as a,C as b};
|