decocms 2.288.0 → 2.289.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle--Y_xi7pz.js → AlertCircle-BCfEJcld.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-adl7K_Ob.js → ArrowNarrowLeft-dDBZy2uy.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DrcSZgbj.js → ArrowUpRight-DR20SS60.js} +1 -1
- package/dist/client/assets/{CheckCircle-DeN4Arf9.js → CheckCircle-C29ChaU6.js} +1 -1
- package/dist/client/assets/{ChevronDown-aTqoLskN.js → ChevronDown-CAze57fI.js} +1 -1
- package/dist/client/assets/{ChevronRight-D_eqesT2.js → ChevronRight-Df7bIxwE.js} +1 -1
- package/dist/client/assets/{ChevronUp-BJsJc2K_.js → ChevronUp-CTU6V7Q0.js} +1 -1
- package/dist/client/assets/{Container-RTpXHcc_.js → Container-Ckr-D4x-.js} +1 -1
- package/dist/client/assets/{DotsVertical-DU62Ovco.js → DotsVertical-BooYL5-r.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CZ54w6Ys.js → LinkExternal01-BF4nSmdO.js} +1 -1
- package/dist/client/assets/{Lock01-C1fACGdb.js → Lock01-D_RqxNIk.js} +1 -1
- package/dist/client/assets/{Palette-CSi1xvBX.js → Palette-Du_aKlJW.js} +1 -1
- package/dist/client/assets/{Play-ZwqBA0Gj.js → Play-hp4nCWPw.js} +1 -1
- package/dist/client/assets/{Plus-DgDw4N5v.js → Plus-C-OJiAlg.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BQD-u-1H.js → RefreshCcw01-Bw_4FSKr.js} +1 -1
- package/dist/client/assets/{SearchMd-DIPAhwlI.js → SearchMd-DRU7KH2R.js} +1 -1
- package/dist/client/assets/{Settings02-NWpe6nkq.js → Settings02-tDR0R-7r.js} +1 -1
- package/dist/client/assets/{Shield01-yW6P30XX.js → Shield01-CyMbm-kt.js} +1 -1
- package/dist/client/assets/{Star01-BNCw32N6.js → Star01-BSV4P3zw.js} +1 -1
- package/dist/client/assets/{Sun-BIhz6_CP.js → Sun-NTsERAnx.js} +1 -1
- package/dist/client/assets/{Tool01-DK8Fhe6_.js → Tool01-JkKJ-VBh.js} +1 -1
- package/dist/client/assets/{Trash01-CLPACLPe.js → Trash01-5isrbkO6.js} +1 -1
- package/dist/client/assets/{User01-C_p7EKq6.js → User01-CtVgwrxn.js} +1 -1
- package/dist/client/assets/{Users03-C5Wav_Yh.js → Users03-kskEQmar.js} +1 -1
- package/dist/client/assets/{X-BI3qXgCM.js → X-KZf37p0i.js} +1 -1
- package/dist/client/assets/{XCircle-C15LvzjS.js → XCircle-0jhuLEi-.js} +1 -1
- package/dist/client/assets/{XClose-xaUxE8BL.js → XClose-DmXYRRRU.js} +1 -1
- package/dist/client/assets/{Zap-DUrCsyVy.js → Zap-CjGMKfBw.js} +1 -1
- package/dist/client/assets/{ZapSquare-CzhlLfPR.js → ZapSquare-Q_j-wpZU.js} +1 -1
- package/dist/client/assets/{accordion-PgILOgmD.js → accordion-LhYuXsvn.js} +1 -1
- package/dist/client/assets/{agent-icon-Dwc2UhoB.js → agent-icon-CJBSrXXa.js} +1 -1
- package/dist/client/assets/{agents-list-DtDkfiBL.js → agents-list-Bj1ZEySf.js} +1 -1
- package/dist/client/assets/ai-providers-NZdL0YY1.js +1 -0
- package/dist/client/assets/{alert-dialog-P1MELuo2.js → alert-dialog-DGf6p6RH.js} +2 -2
- package/dist/client/assets/{auth-catchall-DXBvhnpI.js → auth-catchall-mJXjaGjq.js} +1 -1
- package/dist/client/assets/{automation-list-row-ZhJERDs5.js → automation-list-row-i7idsf84.js} +1 -1
- package/dist/client/assets/{automations-BKo3NXeb.js → automations-D5L5OUmd.js} +1 -1
- package/dist/client/assets/{avatar-C4Xk2I9Z.js → avatar-BiQlJs5k.js} +1 -1
- package/dist/client/assets/{badge-LkPgBUqp.js → badge-BiDYflRu.js} +1 -1
- package/dist/client/assets/{brand-context-B0xNT0Kl.js → brand-context-1aiu9Hp5.js} +1 -1
- package/dist/client/assets/{card-oTGN-YLV.js → card-kpHhMcOo.js} +1 -1
- package/dist/client/assets/{chat-context-yRGYHam2.js → chat-context-C5B4JHNW.js} +1 -1
- package/dist/client/assets/{checkbox-COiFtX5D.js → checkbox-DVSlEbBg.js} +1 -1
- package/dist/client/assets/{collection-detail-D7_Iw3uk.js → collection-detail-8OxmAVZx.js} +1 -1
- package/dist/client/assets/{collection-display-button-cYrSfrMz.js → collection-display-button-DJUi1nr2.js} +1 -1
- package/dist/client/assets/{collection-search-Biy5fWyC.js → collection-search-Cauf3WLX.js} +1 -1
- package/dist/client/assets/{collection-search-D8Ek-RA1.js → collection-search-G428te1f.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D7Avuad7.js → collection-table-wrapper-CgJ-IWGp.js} +1 -1
- package/dist/client/assets/{collection-tabs-Ez6xggyp.js → collection-tabs-ImMH44oz.js} +1 -1
- package/dist/client/assets/{collections-h5KZ86rd.js → collections-CgvQVGim.js} +1 -1
- package/dist/client/assets/{command-BcjbHr_r.js → command-DUlueOVl.js} +1 -1
- package/dist/client/assets/{connection-card-Tvf09fuE.js → connection-card-CfcNRXjD.js} +1 -1
- package/dist/client/assets/{connection-detail-BOee_bXK.js → connection-detail-ZbjzvLjZ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BML8fV-T.js → connection-form-helpers-CLdsDsnf.js} +1 -1
- package/dist/client/assets/{connections-BE48nDv7.js → connections-Db7XXBzz.js} +1 -1
- package/dist/client/assets/{constants-n9yTcILK.js → constants-D21LrFJ4.js} +1 -1
- package/dist/client/assets/{constants-Dsh71ijv.js → constants-DV1Uc_8Q.js} +2 -2
- package/dist/client/assets/{dialog-Dv_lEigV.js → dialog-eYBbNtPx.js} +1 -1
- package/dist/client/assets/{domain-settings-BcSGKzwX.js → domain-settings-5yGQjw4b.js} +1 -1
- package/dist/client/assets/{drawer-WXY2u6pv.js → drawer-BnROsLEL.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B9QIvjxH.js → dropdown-menu-BeTlEYH5.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CjDWcYO9.js → dynamic-plugin-layout-BvdykXHY.js} +1 -1
- package/dist/client/assets/{empty-state-DIMeCEjD.js → empty-state-B2VGunPR.js} +1 -1
- package/dist/client/assets/{empty-state-JxMlNoaR.js → empty-state-Dyal5Xfo.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cvlutde4.js → extract-connection-data-CSJgZrtD.js} +1 -1
- package/dist/client/assets/{features-YbryDu0n.js → features-B-66Obp6.js} +1 -1
- package/dist/client/assets/{form-BNoUlod_.js → form-CIMdOf9q.js} +1 -1
- package/dist/client/assets/{general-b6CUcDdB.js → general-D6CyCDN-.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CP7-EChX.js → github-repo-picker-CvkiRKr8.js} +1 -1
- package/dist/client/assets/{index-Dig_TVyF.js → index-B07jP2sp.js} +1 -1
- package/dist/client/assets/{index-BVkdH26T.js → index-B0qIbTFl.js} +1 -1
- package/dist/client/assets/{index-Cw8cSB3k.js → index-CKiHh8tq.js} +1 -1
- package/dist/client/assets/{index-FXohrF1g.js → index-CQ6k5P_g.js} +1 -1
- package/dist/client/assets/{index-C-fdRcaZ.js → index-CQJ0POFk.js} +4 -4
- package/dist/client/assets/{index-CdjpBOmP.js → index-Ciwyai62.js} +1 -1
- package/dist/client/assets/{index-BZtydI_4.js → index-Cqh-Pw0g.js} +1 -1
- package/dist/client/assets/{index-CVUETRIB.js → index-D3dcRy4-.js} +28 -28
- package/dist/client/assets/{index-B0_K5fYx.js → index-DdZX0aDg.js} +1 -1
- package/dist/client/assets/{index-CjZGXiUn.js → index-Duvlh7HC.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BYD3scla.js → infiniteQueryObserver-DNXrDhz0.js} +1 -1
- package/dist/client/assets/{input-CL-LUIlC.js → input-BTdB8RPC.js} +1 -1
- package/dist/client/assets/{integration-icon-BXMU-Z0-.js → integration-icon-DJHy4-lT.js} +1 -1
- package/dist/client/assets/{label-Do_qw_q4.js → label-HfwUkinD.js} +1 -1
- package/dist/client/assets/{layout-DrFXNrUJ.js → layout-Blu93q33.js} +1 -1
- package/dist/client/assets/{login-B6O4fD8Q.js → login-YFb2t01p.js} +1 -1
- package/dist/client/assets/{members-L61ME1MY.js → members-qoLnAp5E.js} +1 -1
- package/dist/client/assets/{monaco-editor-BRexmFrU.js → monaco-editor-BFeXzORV.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DpDZn9jY.js → monitoring-stats-row-B8LpUgZ3.js} +1 -1
- package/dist/client/assets/{oauth-callback-_ywR3sFa.js → oauth-callback-CXbpsVJh.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CpjecUsU.js → oauth-callback-ai-provider-CHi0ZwiA.js} +1 -1
- package/dist/client/assets/{onboarding-BHrMLfDa.js → onboarding-CS_9vzjQ.js} +1 -1
- package/dist/client/assets/{org-layout-BkXZ1gvy.js → org-layout-DzWFCFrp.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DQZ2g3kO.js → org-plugin-layout-C1udHyJg.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-vwtahL68.js → plugin-empty-state-uSy8H1wz.js} +1 -1
- package/dist/client/assets/{plugin-header-BsB_du51.js → plugin-header-Y9KGqpf-.js} +1 -1
- package/dist/client/assets/{plugin-layout-Buej05e7.js → plugin-layout-BMUI6aZk.js} +1 -1
- package/dist/client/assets/{popover-C4684neQ.js → popover-0rGXbfVv.js} +1 -1
- package/dist/client/assets/{profile-DDmHWY6_.js → profile-Dxc4PLoS.js} +1 -1
- package/dist/client/assets/{project-app-view-BNwkzuii.js → project-app-view-rhNtxAKM.js} +1 -1
- package/dist/client/assets/registry-3CD149WE.js +2 -0
- package/dist/client/assets/{registry-layout-CZd2B4C7.js → registry-layout-20jGjbo6.js} +1 -1
- package/dist/client/assets/{required-auth-layout-SaQW2h7l.js → required-auth-layout-BrXS6Et-.js} +1 -1
- package/dist/client/assets/{reset-password-DDLCghhj.js → reset-password-KHQpUmrP.js} +1 -1
- package/dist/client/assets/{roles-DmqW3xZU.js → roles-QJpAwLWN.js} +1 -1
- package/dist/client/assets/{scroll-area-BmiP98pu.js → scroll-area-Cmb2U-GX.js} +1 -1
- package/dist/client/assets/{search-input-DQ1Xzm_b.js → search-input-Cxdo8FJH.js} +1 -1
- package/dist/client/assets/{select-model-CX8VF4-p.js → select-model-CepjGove.js} +1 -1
- package/dist/client/assets/{select-DaM3TY5t.js → select-pbe1Tw3i.js} +1 -1
- package/dist/client/assets/{settings-layout-DNFV8Oix.js → settings-layout-C_jpXJmC.js} +1 -1
- package/dist/client/assets/{settings-section-BS3Z4RWi.js → settings-section-zap-Boy4.js} +1 -1
- package/dist/client/assets/shell-layout-YcfNni5N.js +1 -0
- package/dist/client/assets/{skeleton-C8RqYCI9.js → skeleton-cT9-y8hq.js} +1 -1
- package/dist/client/assets/{sso-CZDbiXIw.js → sso-Bbte0m6W.js} +1 -1
- package/dist/client/assets/{store-CeeuB26r.js → store-CdJMoZz8.js} +1 -1
- package/dist/client/assets/store-registry-BT7eie06.js +2 -0
- package/dist/client/assets/{switch-DGYFt_K8.js → switch-CrRugnBx.js} +1 -1
- package/dist/client/assets/{table-BJ_I6wc6.js → table-Chd-IJRh.js} +1 -1
- package/dist/client/assets/{tabs-O35WvzjF.js → tabs-DvsJVzb1.js} +1 -1
- package/dist/client/assets/{task-status-BKkJIb6H.js → task-status-KWWNTm4M.js} +1 -1
- package/dist/client/assets/{textarea-CjtgfBdH.js → textarea-CWhJ3Xwe.js} +1 -1
- package/dist/client/assets/{toggle-group-ComSgZAp.js → toggle-group-B06Rml5A.js} +1 -1
- package/dist/client/assets/{tools-list-CurMUG9t.js → tools-list-DT1hnay8.js} +1 -1
- package/dist/client/assets/{types-DlC_80GR.js → types-DsDrkXAr.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C3mVVuRV.js → use-ai-providers-oEGyGWt1.js} +1 -1
- package/dist/client/assets/{use-collections-DcKD6Qxv.js → use-collections-D8VuBtQu.js} +1 -1
- package/dist/client/assets/{use-connection-PZAuCSXO.js → use-connection-DATDvleR.js} +1 -1
- package/dist/client/assets/{use-copy-Bj-MTwaa.js → use-copy-C4JHTA85.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B_irsl9D.js → use-create-virtual-mcp-CPp3t7Vk.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CDeh99iZ.js → use-decopilot-events-BmJPvHjL.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BR9ISSGY.js → use-delete-connection-Cs_pBxVJ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D-2l__Cz.js → use-infinite-scroll-42GyaTNJ.js} +1 -1
- package/dist/client/assets/{use-list-state-BV21WFDK.js → use-list-state-B_acXswQ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bv5yUcCZ.js → use-mcp-tools-Bp4N36ES.js} +1 -1
- package/dist/client/assets/{use-members-BAhIl5n0.js → use-members-egBMdDNQ.js} +1 -1
- package/dist/client/assets/{use-mobile-BpBXbl16.js → use-mobile-BwJlvmat.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CG7-kp4S.js → use-navigate-to-agent-CeIX1obd.js} +1 -1
- package/dist/client/assets/{use-org-sso-4JoNv6HV.js → use-org-sso-D35VQct2.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bpj16cC4.js → use-organization-roles-DewFhO3_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-axiNM6Y6.js → use-organization-settings-DlzwYRHw.js} +1 -1
- package/dist/client/assets/{use-registry-connections-fdW_5JrJ.js → use-registry-connections-BMDx5SL4.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BYcGwXOW.js → use-status-sounds-CnYkx9X0.js} +1 -1
- package/dist/client/assets/{use-tasks-CEbKlK-w.js → use-tasks-BtgjavUX.js} +1 -1
- package/dist/client/assets/{use-view-mode-DXGS7T6x.js → use-view-mode-ni8MVEBL.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C8FeHhCA.js → use-virtual-mcp-CLK92_-L.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-NxzX8_KV.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BTse9xwX.js +1 -0
- package/dist/client/assets/{user-1OxcID9o.js → user-K40phdtq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BiIaP24A.js → view-mode-toggle-Co7HEZDI.js} +1 -1
- package/dist/client/assets/{workflow-Dx23L5rN.js → workflow-CuFWe7ID.js} +1 -1
- package/dist/client/assets/workflow-detail-CoSxU_nR.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/{xtend → pg}/LICENSE +7 -6
- package/dist/server/node_modules/pg/README.md +95 -0
- package/dist/server/node_modules/pg/esm/index.mjs +20 -0
- package/dist/server/node_modules/pg/lib/client.js +743 -0
- package/dist/server/node_modules/pg/lib/connection-parameters.js +171 -0
- package/dist/server/node_modules/pg/lib/connection.js +221 -0
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
- package/dist/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/dist/server/node_modules/pg/lib/defaults.js +91 -0
- package/dist/server/node_modules/pg/lib/index.js +73 -0
- package/dist/server/node_modules/pg/lib/native/client.js +323 -0
- package/dist/server/node_modules/pg/lib/native/index.js +2 -0
- package/dist/server/node_modules/pg/lib/native/query.js +165 -0
- package/dist/server/node_modules/pg/lib/query.js +252 -0
- package/dist/server/node_modules/pg/lib/result.js +109 -0
- package/dist/server/node_modules/pg/lib/stream.js +83 -0
- package/dist/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/dist/server/node_modules/pg/lib/utils.js +217 -0
- package/dist/server/node_modules/pg/package.json +76 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-dl8LgpRM.js +0 -1
- package/dist/client/assets/registry-B2nAdztj.js +0 -2
- package/dist/client/assets/shell-layout-DifA2CaM.js +0 -1
- package/dist/client/assets/store-registry-Db_sa3Jy.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D8Ti3aNB.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BOcz1SDi.js +0 -1
- package/dist/client/assets/workflow-detail-BMaclVeL.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/license +0 -9
- package/dist/server/node_modules/ansi-styles/package.json +0 -54
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
- package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as ge,C as ke,j as s,B as pe,s as Ae,r as P,t as w,z as we}from"./index-CVUETRIB.js";import{D as U,e as Ce,d as ue,c as xe}from"./dropdown-menu-B9QIvjxH.js";import{a as Pe}from"./Users03-C5Wav_Yh.js";import{b as Te,G as Me,I as Oe,S as ze,L as Le,a as Ie}from"./github-repo-picker-CP7-EChX.js";import{W as Ee,a as Ge}from"./constants-Dsh71ijv.js";import{u as Be,b as He}from"./use-virtual-mcp-C8FeHhCA.js";import{P as ne}from"./index-Dig_TVyF.js";import{i as $e}from"./DotsVertical-DU62Ovco.js";import{a as Re}from"./Settings02-NWpe6nkq.js";import{s as Fe}from"./Trash01-CLPACLPe.js";import{A as ve,ag as Ve}from"./agent-icon-Dwc2UhoB.js";import{u as be}from"./use-navigate-to-agent-CG7-kp4S.js";import{C as Ne}from"./card-oTGN-YLV.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-JxMlNoaR.js";import{u as qe}from"./use-create-virtual-mcp-B_irsl9D.js";import{c as Je,b as Qe,d as Ue,A as Xe,e as Ye,g as Ze,a as et,f as tt}from"./alert-dialog-P1MELuo2.js";import{S as st}from"./search-input-DQ1Xzm_b.js";import{s as je}from"./Plus-DgDw4N5v.js";import"./ChevronDown-aTqoLskN.js";import"./ChevronRight-D_eqesT2.js";import"./dialog-Dv_lEigV.js";import"./X-BI3qXgCM.js";import"./RefreshCcw01-BQD-u-1H.js";import"./collection-search-D8Ek-RA1.js";import"./SearchMd-DIPAhwlI.js";import"./drawer-WXY2u6pv.js";import"./use-mobile-BpBXbl16.js";import"./integration-icon-BXMU-Z0-.js";import"./Container-RTpXHcc_.js";import"./use-connection-PZAuCSXO.js";import"./use-collections-DcKD6Qxv.js";import"./use-mcp-tools-Bv5yUcCZ.js";import"./checkbox-COiFtX5D.js";import"./Lock01-C1fACGdb.js";import"./extract-connection-data-Cvlutde4.js";import"./constants-n9yTcILK.js";import"./collections-h5KZ86rd.js";import"./AlertCircle--Y_xi7pz.js";import"./Tool01-DK8Fhe6_.js";import"./XClose-xaUxE8BL.js";import"./ArrowNarrowLeft-adl7K_Ob.js";import"./XCircle-C15LvzjS.js";import"./ArrowUpRight-DrcSZgbj.js";import"./ZapSquare-CzhlLfPR.js";import"./CheckCircle-DeN4Arf9.js";import"./ChevronUp-BJsJc2K_.js";import"./Star01-BNCw32N6.js";import"./Palette-CSi1xvBX.js";import"./LinkExternal01-CZ54w6Ys.js";import"./Sun-BIhz6_CP.js";import"./Play-ZwqBA0Gj.js";import"./Shield01-yW6P30XX.js";import"./User01-C_p7EKq6.js";import"./Zap-DUrCsyVy.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,a=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let r;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(r=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=r):r=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==a||t[12]!==f||t[13]!==c||t[14]!==r||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:a,className:"w-48",children:[c,r,m]}),t[11]=a,t[12]=f,t[13]=c,t[14]=r,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let a;t[10]!==d||t[11]!==i.id?(a=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=a):a=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==a?(u=s.jsxs(U,{onClick:a,children:[n,"Settings"]}),t[14]=a,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let r;t[18]!==u||t[19]!==c?(r=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=r):r=t[20];let x;t[21]!==f||t[22]!==r?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,r]}),t[21]=f,t[22]=r,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:a}=qe(f),[n,u]=P.useState(null),[c,r]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==a||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(rt),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?r(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let re,ae;e[30]===Symbol.for("react.memo_cache_sentinel")?(re=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),r(!0)},e[30]=re,e[31]=ae):(re=e[30],ae=e[31]);let J;e[32]!==a||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:re,onImportDeco:ae,isCreating:a,align:"end"})]}),e[32]=a,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),r(!0)},isCreating:a,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=a,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:r}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function rt(e){return Ge(e.id)}export{cs as default};
|
|
1
|
+
import{e as ge,C as ke,j as s,B as pe,s as Ae,r as P,t as w,z as we}from"./index-D3dcRy4-.js";import{D as U,e as Ce,d as ue,c as xe}from"./dropdown-menu-BeTlEYH5.js";import{a as Pe}from"./Users03-kskEQmar.js";import{b as Te,G as Me,I as Oe,S as ze,L as Le,a as Ie}from"./github-repo-picker-CvkiRKr8.js";import{W as Ee,a as Ge}from"./constants-DV1Uc_8Q.js";import{u as Be,b as He}from"./use-virtual-mcp-CLK92_-L.js";import{P as ne}from"./index-B07jP2sp.js";import{i as $e}from"./DotsVertical-BooYL5-r.js";import{a as Re}from"./Settings02-tDR0R-7r.js";import{s as Fe}from"./Trash01-5isrbkO6.js";import{A as ve,ag as Ve}from"./agent-icon-CJBSrXXa.js";import{u as be}from"./use-navigate-to-agent-CeIX1obd.js";import{C as Ne}from"./card-kpHhMcOo.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-Dyal5Xfo.js";import{u as qe}from"./use-create-virtual-mcp-CPp3t7Vk.js";import{c as Je,b as Qe,d as Ue,A as Xe,e as Ye,g as Ze,a as et,f as tt}from"./alert-dialog-DGf6p6RH.js";import{S as st}from"./search-input-Cxdo8FJH.js";import{s as je}from"./Plus-C-OJiAlg.js";import"./ChevronDown-CAze57fI.js";import"./ChevronRight-Df7bIxwE.js";import"./dialog-eYBbNtPx.js";import"./X-KZf37p0i.js";import"./RefreshCcw01-Bw_4FSKr.js";import"./collection-search-G428te1f.js";import"./SearchMd-DRU7KH2R.js";import"./drawer-BnROsLEL.js";import"./use-mobile-BwJlvmat.js";import"./integration-icon-DJHy4-lT.js";import"./Container-Ckr-D4x-.js";import"./use-connection-DATDvleR.js";import"./use-collections-D8VuBtQu.js";import"./use-mcp-tools-Bp4N36ES.js";import"./checkbox-DVSlEbBg.js";import"./Lock01-D_RqxNIk.js";import"./extract-connection-data-CSJgZrtD.js";import"./constants-D21LrFJ4.js";import"./collections-CgvQVGim.js";import"./AlertCircle-BCfEJcld.js";import"./Tool01-JkKJ-VBh.js";import"./XClose-DmXYRRRU.js";import"./ArrowNarrowLeft-dDBZy2uy.js";import"./XCircle-0jhuLEi-.js";import"./ArrowUpRight-DR20SS60.js";import"./ZapSquare-Q_j-wpZU.js";import"./CheckCircle-C29ChaU6.js";import"./ChevronUp-CTU6V7Q0.js";import"./Star01-BSV4P3zw.js";import"./Palette-Du_aKlJW.js";import"./LinkExternal01-BF4nSmdO.js";import"./Sun-NTsERAnx.js";import"./Play-hp4nCWPw.js";import"./Shield01-CyMbm-kt.js";import"./User01-CtVgwrxn.js";import"./Zap-CjGMKfBw.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,a=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let r;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(r=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=r):r=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==a||t[12]!==f||t[13]!==c||t[14]!==r||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:a,className:"w-48",children:[c,r,m]}),t[11]=a,t[12]=f,t[13]=c,t[14]=r,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let a;t[10]!==d||t[11]!==i.id?(a=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=a):a=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==a?(u=s.jsxs(U,{onClick:a,children:[n,"Settings"]}),t[14]=a,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let r;t[18]!==u||t[19]!==c?(r=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=r):r=t[20];let x;t[21]!==f||t[22]!==r?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,r]}),t[21]=f,t[22]=r,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:a}=qe(f),[n,u]=P.useState(null),[c,r]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==a||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(rt),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?r(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let re,ae;e[30]===Symbol.for("react.memo_cache_sentinel")?(re=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),r(!0)},e[30]=re,e[31]=ae):(re=e[30],ae=e[31]);let J;e[32]!==a||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:re,onImportDeco:ae,isCreating:a,align:"end"})]}),e[32]=a,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),r(!0)},isCreating:a,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=a,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:r}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function rt(e){return Ge(e.id)}export{cs as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t,j as i}from"./index-D3dcRy4-.js";import{O as m}from"./select-model-CepjGove.js";import"./checkbox-DVSlEbBg.js";import"./ChevronDown-CAze57fI.js";import"./input-BTdB8RPC.js";import"./dialog-eYBbNtPx.js";import"./X-KZf37p0i.js";import"./drawer-BnROsLEL.js";import"./use-mobile-BwJlvmat.js";import"./select-pbe1Tw3i.js";import"./ChevronUp-CTU6V7Q0.js";import"./skeleton-cT9-y8hq.js";import"./Tool01-JkKJ-VBh.js";import"./RefreshCcw01-Bw_4FSKr.js";import"./SearchMd-DRU7KH2R.js";import"./Settings02-tDR0R-7r.js";import"./use-ai-providers-oEGyGWt1.js";import"./constants-DV1Uc_8Q.js";import"./chat-context-C5B4JHNW.js";import"./use-virtual-mcp-CLK92_-L.js";import"./use-collections-D8VuBtQu.js";import"./use-decopilot-events-BmJPvHjL.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-BtgjavUX.js";import"./use-organization-settings-DlzwYRHw.js";import"./ai-providers-logos-CS4PCiqI.js";import"./Zap-CjGMKfBw.js";import"./AlertCircle-BCfEJcld.js";import"./CheckCircle-C29ChaU6.js";import"./Trash01-5isrbkO6.js";import"./index-B07jP2sp.js";import"./settings-section-zap-Boy4.js";import"./card-kpHhMcOo.js";import"./ArrowUpRight-DR20SS60.js";import"./switch-CrRugnBx.js";import"./toggle-group-B06Rml5A.js";import"./avatar-BiQlJs5k.js";import"./User01-CtVgwrxn.js";import"./alert-dialog-DGf6p6RH.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function T(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{T as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{r as i,b6 as m,j as r,
|
|
1
|
+
import{r as i,b6 as m,j as r,cK as A,cI as w,cJ as T,du as O,be as M,ai as I,b_ as L,dv as v,b$ as z,df as F,ao as G,cL as k,c0 as H,e as n,c as p,ba as D}from"./index-D3dcRy4-.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
5
5
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${f}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
6
|
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},
|
|
7
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Z=N,ee=y,te=_,ae=b,oe=$,le=S,se=h,re=R;function de(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(Z,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ie(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(ee,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(te,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function pe(l){const e=n.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ne,{}),e[3]=o):o=e[3];let s;e[4]!==t?(s=p("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=s):s=e[5];let c;return e[6]!==a||e[7]!==s?(c=r.jsxs(ie,{children:[o,r.jsx(ae,{"data-slot":"alert-dialog-content",className:s,...a})]}),e[6]=a,e[7]=s,e[8]=c):c=e[8],c}function fe(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ge(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ue(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(se,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function me(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(re,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ae(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(D(),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(oe,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ve(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(D({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}export{ve as A,pe as a,fe as b,ue as c,me as d,ge as e,de as f,Ae as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-
|
|
1
|
+
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-D3dcRy4-.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
|
package/dist/client/assets/{automation-list-row-ZhJERDs5.js → automation-list-row-i7idsf84.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as P,s as q,K as k,n as G,o as U,a as K,z as L,r as M,c as Q,j as o,B}from"./index-
|
|
1
|
+
import{e as P,s as q,K as k,n as G,o as U,a as K,z as L,r as M,c as Q,j as o,B}from"./index-D3dcRy4-.js";import{b as V,d as H,e as Y,g as J,c as W,A as X,a as Z,f as ee}from"./alert-dialog-DGf6p6RH.js";import{d as te,c as ne,e as se,D as ie}from"./dropdown-menu-BeTlEYH5.js";import{A as oe,N as re}from"./agent-icon-CJBSrXXa.js";import{i as ae}from"./DotsVertical-BooYL5-r.js";import{s as le}from"./Trash01-5isrbkO6.js";import{i as ce}from"./Zap-CjGMKfBw.js";import{a as ue}from"./use-virtual-mcp-CLK92_-L.js";import{S as $,u as z}from"./constants-DV1Uc_8Q.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const n of t.params)e[n.name]={type:n.type,description:n.description,enum:n.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(11),{org:n}=q(),s=t??$;let r;e[0]!==n.id||e[1]!==s?(r={connectionId:s,orgId:n.id},e[0]=n.id,e[1]=s,e[2]=r):r=e[2];const a=z(r);let i;e[3]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[3]=t,e[4]=i):i=e[4];let u;e[5]!==a?(u=async()=>{const f=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(f.structuredContent??f).triggers.map(me)},e[5]=a,e[6]=u):u=e[6];const l=!!t;let d;return e[7]!==i||e[8]!==u||e[9]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[7]=i,e[8]=u,e[9]=l,e[10]=d):d=e[10],G(d)}function Se(t){const e=P.c(11),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==n.id||e[3]!==t?(a=k.automations(n.id,t),e[2]=n.id,e[3]=t,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[5]=r,e[6]=t,e[7]=i):i=e[7];let u;return e[8]!==a||e[9]!==i?(u={queryKey:a,queryFn:i,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u):u=e[10],G(u)}function Oe(t){const e=P.c(12),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==t||e[3]!==n.id?(a=k.automation(n.id,t),e[2]=t,e[3]=n.id,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[5]=r,e[6]=t,e[7]=i):i=e[7];const u=!!t;let l;return e[8]!==a||e[9]!==i||e[10]!==u?(l={queryKey:a,queryFn:i,enabled:u,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u,e[11]=l):l=e[11],G(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(54),{org:e}=q();let n;t[0]!==e.id?(n={connectionId:$,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=z(n),r=U();let a;t[2]!==e.id||t[3]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[2]=e.id,t[3]=r,t[4]=a):a=t[4];const i=a;let u;t[5]!==e.id||t[6]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[5]=e.id,t[6]=r,t[7]=u):u=t[7];const l=u;let d;t[8]!==s?(d=async m=>{const c=await s.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[8]=s,t[9]=d):d=t[9];let f;t[10]!==i?(f=()=>{i()},t[10]=i,t[11]=f):f=t[11];let b;t[12]!==d||t[13]!==f?(b={mutationFn:d,onSuccess:f,onError:pe},t[12]=d,t[13]=f,t[14]=b):b=t[14];const F=K(b);let D;t[15]!==s?(D=async m=>{const c=await s.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[15]=s,t[16]=D):D=t[16];let g;t[17]!==i||t[18]!==l?(g=(m,c)=>{i(),typeof c.id=="string"&&l(c.id)},t[17]=i,t[18]=l,t[19]=g):g=t[19];let S;t[20]!==D||t[21]!==g?(S={mutationFn:D,onSuccess:g,onError:ge},t[20]=D,t[21]=g,t[22]=S):S=t[22];const N=K(S);let p;t[23]!==s?(p=async m=>{const c=await s.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[23]=s,t[24]=p):p=t[24];let x;t[25]!==i||t[26]!==e.id||t[27]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),i()},t[25]=i,t[26]=e.id,t[27]=r,t[28]=x):x=t[28];let A;t[29]!==x||t[30]!==p?(A={mutationFn:p,onSuccess:x,onError:fe},t[29]=x,t[30]=p,t[31]=A):A=t[31];const v=K(A);let _;t[32]!==s?(_=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[32]=s,t[33]=_):_=t[33];let y;t[34]!==i||t[35]!==l?(y=m=>{i(),l(m.automation_id)},t[34]=i,t[35]=l,t[36]=y):y=t[36];let E;t[37]!==_||t[38]!==y?(E={mutationFn:_,onSuccess:y},t[37]=_,t[38]=y,t[39]=E):E=t[39];const O=K(E);let h;t[40]!==s?(h=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[40]=s,t[41]=h):h=t[41];let T;t[42]!==i||t[43]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[42]=i,t[43]=l,t[44]=T):T=t[44];let j;t[45]!==h||t[46]!==T?(j={mutationFn:h,onSuccess:T},t[45]=h,t[46]=T,t[47]=j):j=t[47];const w=K(j);let C;return t[48]!==F||t[49]!==v||t[50]!==O||t[51]!==w||t[52]!==N?(C={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[48]=F,t[49]=v,t[50]=O,t[51]=w,t[52]=N,t[53]=C):C=t[53],C}function fe(t){L.error(t instanceof Error?t.message:"Failed to delete automation")}function ge(t){L.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){L.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:n,showAgent:s,onClick:r}=t,{remove:a}=de(),[i,u]=M.useState(!1),l=ue(s?n.agent?.id??void 0:void 0);let d;e[0]!==n.id||e[1]!==a?(d=()=>{a.mutate(n.id),u(!1)},e[0]=n.id,e[1]=a,e[2]=d):d=e[2];const f=d;let b;e[3]!==r?(b=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=b):b=e[4];const F=b,D=n.active&&n.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let g;e[5]!==D?(g=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=g):g=e[6];const S=n.active&&n.trigger_count>0?"Active":n.active?"No triggers configured":"Paused";let N;e[7]!==g||e[8]!==S?(N=o.jsx("span",{className:g,"aria-label":S}),e[7]=g,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==s?(p=s&&l&&o.jsx(oe,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=s,e[12]=p):p=e[12];let x;e[13]!==n.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.name}),e[13]=n.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==s?(A=s&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=s,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==n.nearest_next_run_at||e[22]!==n.trigger_count?(_=o.jsx(ye,{triggerCount:n.trigger_count,nextRunAt:n.nearest_next_run_at}),e[21]=n.nearest_next_run_at,e[22]=n.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(ne,{children:[E,o.jsx(se,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==n.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:n.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=n.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let C;e[39]!==f||e[40]!==a.isPending?(C=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:f,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=f,e[40]=a.isPending,e[41]=C):C=e[41];let m;e[42]!==j||e[43]!==C?(m=o.jsxs(Z,{children:[j,C]}),e[42]=j,e[43]=C,e[44]=m):m=e[44];let c;e[45]!==i||e[46]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[45]=i,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=o.jsxs(o.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:n,nextRunAt:s}=t;if(n===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==s||e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:s?o.jsxs(o.Fragment,{children:[o.jsx(re,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(s).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[n," trigger",n===1?"":"s"]})]})}),e[1]=s,e[2]=n,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-
|
|
1
|
+
import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-D3dcRy4-.js";import{s as O}from"./Plus-C-OJiAlg.js";import{i as _}from"./Zap-CjGMKfBw.js";import{S as V}from"./search-input-Cxdo8FJH.js";import{P as p}from"./index-B07jP2sp.js";import{E as B}from"./empty-state-Dyal5Xfo.js";import{c as q,A as D}from"./automation-list-row-i7idsf84.js";import{u as F}from"./use-navigate-to-agent-CeIX1obd.js";import{u as G}from"./use-virtual-mcp-CLK92_-L.js";import"./SearchMd-DRU7KH2R.js";import"./use-mobile-BwJlvmat.js";import"./X-KZf37p0i.js";import"./alert-dialog-DGf6p6RH.js";import"./dropdown-menu-BeTlEYH5.js";import"./ChevronDown-CAze57fI.js";import"./ChevronRight-Df7bIxwE.js";import"./DotsVertical-BooYL5-r.js";import"./agent-icon-CJBSrXXa.js";import"./AlertCircle-BCfEJcld.js";import"./Tool01-JkKJ-VBh.js";import"./XClose-DmXYRRRU.js";import"./RefreshCcw01-Bw_4FSKr.js";import"./ArrowNarrowLeft-dDBZy2uy.js";import"./XCircle-0jhuLEi-.js";import"./ArrowUpRight-DR20SS60.js";import"./ZapSquare-Q_j-wpZU.js";import"./Users03-kskEQmar.js";import"./CheckCircle-C29ChaU6.js";import"./ChevronUp-CTU6V7Q0.js";import"./Container-Ckr-D4x-.js";import"./Star01-BSV4P3zw.js";import"./Palette-Du_aKlJW.js";import"./LinkExternal01-BF4nSmdO.js";import"./Lock01-D_RqxNIk.js";import"./Sun-NTsERAnx.js";import"./Play-hp4nCWPw.js";import"./Settings02-tDR0R-7r.js";import"./Shield01-CyMbm-kt.js";import"./Trash01-5isrbkO6.js";import"./User01-CtVgwrxn.js";import"./constants-DV1Uc_8Q.js";import"./use-collections-D8VuBtQu.js";function Lt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,b=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(b.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{Lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,j as i,r as V,c as m,aX as S,
|
|
1
|
+
import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-D3dcRy4-.js";import{s as L}from"./User01-CtVgwrxn.js";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("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 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("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 _(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"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(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"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=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 G(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=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(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(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{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(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(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(G,{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}H.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{H as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,c as g,j as u,aY as l,aX as v}from"./index-
|
|
1
|
+
import{e as d,c as g,j as u,aY as l,aX as v}from"./index-D3dcRy4-.js";const b=v("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/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as q,a9 as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,z as K,r as C,c as xe}from"./index-CVUETRIB.js";import{S as De,u as Ae}from"./constants-Dsh71ijv.js";import{t as Be,i as Oe}from"./ChevronDown-aTqoLskN.js";import{i as Te}from"./ChevronRight-D_eqesT2.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-BNCw32N6.js";import{n as ze}from"./LinkExternal01-CZ54w6Ys.js";import{s as ye}from"./Plus-DgDw4N5v.js";import{s as Re}from"./Trash01-CLPACLPe.js";import{i as Le}from"./X-BI3qXgCM.js";import{i as $e}from"./Zap-DUrCsyVy.js";import{c as Ue,b as Ke,d as Xe,A as qe,g as Ge,e as Me,a as He,f as Qe}from"./alert-dialog-P1MELuo2.js";import{I as M}from"./input-CL-LUIlC.js";import{T as Ye}from"./textarea-CjtgfBdH.js";import{P as ue}from"./index-Dig_TVyF.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./use-mobile-BpBXbl16.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(Le,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx($e,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(ze,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let z;e[42]!==f?(z=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=z):z=e[43];let R;e[44]!==t.logo||e[45]!==t.name?(R=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=R):R=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,L;e[62]!==_?(T=N=>{N.stopPropagation(),_()},L=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=L):(T=e[63],L=e[64]);const $=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==L||e[72]!==$||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:L,title:$,children:A}),e[69]=G,e[70]=T,e[71]=L,e[72]=$,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx(Re,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==z||e[80]!==R||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[z,R,O,S,E,I,de]}),e[78]=P,e[79]=z,e[80]=R,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(56),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id?(m={connectionId:De,orgId:t.id},s[0]=t.id,s[1]=m):m=s[1];const o=Ae(m),f=Se();let u;s[2]!==t.id?(u=je.brandContext(t.id),s[2]=t.id,s[3]=u):u=s[3];let l;s[4]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[4]=o,s[5]=l):l=s[5];let p;s[6]!==u||s[7]!==l?(p={queryKey:u,queryFn:l},s[6]=u,s[7]=l,s[8]=p):p=s[8];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[9]!==t.id||s[10]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[9]=t.id,s[10]=f,s[11]=d):d=s[11];const a=d;let x;s[12]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[12]=o,s[13]=x):x=s[13];let j;s[14]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[14]=a,s[15]=j):j=s[15];let b;s[16]!==x||s[17]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[16]=x,s[17]=j,s[18]=b):b=s[18];const{mutate:g,isPending:r}=ce(b);let i;s[19]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[19]=o,s[20]=i):i=s[20];let y;s[21]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[21]=a,s[22]=y):y=s[22];let _;s[23]!==y||s[24]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[23]=y,s[24]=i,s[25]=_):_=s[25];const{mutate:H,isPending:F}=ce(_),P=ue,z=ue,R=ue,ie="flex flex-col gap-6";let B;s[26]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[26]=B):B=s[26];let w;s[27]!==g?(w=()=>g(),s[27]=g,s[28]=w):w=s[28];let O;s[29]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[29]=O):O=s[29];let S;s[30]!==r||s[31]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[30]=r,s[31]=w,s[32]=S):S=s[32];let E;s[33]!==e||s[34]!==H||s[35]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[33]=e,s[34]=H,s[35]=F,s[36]=E):E=s[36];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[37]!==o||s[38]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[37]=o,s[38]=a,s[39]=T):T=s[39];const L=h.map(T);let $;s[40]!==L?($=n.jsx("div",{className:G,children:L}),s[40]=L,s[41]=$):$=s[41];let U;s[42]!==S||s[43]!==E||s[44]!==Q||s[45]!==$?(U=n.jsxs("div",{className:ie,children:[S,E,Q,$]}),s[42]=S,s[43]=E,s[44]=Q,s[45]=$,s[46]=U):U=s[46];let D;s[47]!==R.Body||s[48]!==U?(D=n.jsx(R.Body,{children:U}),s[47]=R.Body,s[48]=U,s[49]=D):D=s[49];let A;s[50]!==z.Content||s[51]!==D?(A=n.jsx(z.Content,{children:D}),s[50]=z.Content,s[51]=D,s[52]=A):A=s[52];let I;return s[53]!==P||s[54]!==A?(I=n.jsx(P,{children:A}),s[53]=P,s[54]=A,s[55]=I):I=s[55],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
|
|
1
|
+
import{e as q,a9 as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,z as K,r as C,c as xe}from"./index-D3dcRy4-.js";import{S as De,u as Ae}from"./constants-DV1Uc_8Q.js";import{t as Be,i as Oe}from"./ChevronDown-CAze57fI.js";import{i as Te}from"./ChevronRight-Df7bIxwE.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-BSV4P3zw.js";import{n as ze}from"./LinkExternal01-BF4nSmdO.js";import{s as ye}from"./Plus-C-OJiAlg.js";import{s as Re}from"./Trash01-5isrbkO6.js";import{i as Le}from"./X-KZf37p0i.js";import{i as $e}from"./Zap-CjGMKfBw.js";import{c as Ue,b as Ke,d as Xe,A as qe,g as Ge,e as Me,a as He,f as Qe}from"./alert-dialog-DGf6p6RH.js";import{I as M}from"./input-BTdB8RPC.js";import{T as Ye}from"./textarea-CWhJ3Xwe.js";import{P as ue}from"./index-B07jP2sp.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./use-mobile-BwJlvmat.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(Le,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx($e,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(ze,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let z;e[42]!==f?(z=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=z):z=e[43];let R;e[44]!==t.logo||e[45]!==t.name?(R=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=R):R=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,L;e[62]!==_?(T=N=>{N.stopPropagation(),_()},L=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=L):(T=e[63],L=e[64]);const $=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==L||e[72]!==$||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:L,title:$,children:A}),e[69]=G,e[70]=T,e[71]=L,e[72]=$,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx(Re,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==z||e[80]!==R||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[z,R,O,S,E,I,de]}),e[78]=P,e[79]=z,e[80]=R,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(56),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id?(m={connectionId:De,orgId:t.id},s[0]=t.id,s[1]=m):m=s[1];const o=Ae(m),f=Se();let u;s[2]!==t.id?(u=je.brandContext(t.id),s[2]=t.id,s[3]=u):u=s[3];let l;s[4]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[4]=o,s[5]=l):l=s[5];let p;s[6]!==u||s[7]!==l?(p={queryKey:u,queryFn:l},s[6]=u,s[7]=l,s[8]=p):p=s[8];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[9]!==t.id||s[10]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[9]=t.id,s[10]=f,s[11]=d):d=s[11];const a=d;let x;s[12]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[12]=o,s[13]=x):x=s[13];let j;s[14]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[14]=a,s[15]=j):j=s[15];let b;s[16]!==x||s[17]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[16]=x,s[17]=j,s[18]=b):b=s[18];const{mutate:g,isPending:r}=ce(b);let i;s[19]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[19]=o,s[20]=i):i=s[20];let y;s[21]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[21]=a,s[22]=y):y=s[22];let _;s[23]!==y||s[24]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[23]=y,s[24]=i,s[25]=_):_=s[25];const{mutate:H,isPending:F}=ce(_),P=ue,z=ue,R=ue,ie="flex flex-col gap-6";let B;s[26]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[26]=B):B=s[26];let w;s[27]!==g?(w=()=>g(),s[27]=g,s[28]=w):w=s[28];let O;s[29]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[29]=O):O=s[29];let S;s[30]!==r||s[31]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[30]=r,s[31]=w,s[32]=S):S=s[32];let E;s[33]!==e||s[34]!==H||s[35]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[33]=e,s[34]=H,s[35]=F,s[36]=E):E=s[36];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[37]!==o||s[38]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[37]=o,s[38]=a,s[39]=T):T=s[39];const L=h.map(T);let $;s[40]!==L?($=n.jsx("div",{className:G,children:L}),s[40]=L,s[41]=$):$=s[41];let U;s[42]!==S||s[43]!==E||s[44]!==Q||s[45]!==$?(U=n.jsxs("div",{className:ie,children:[S,E,Q,$]}),s[42]=S,s[43]=E,s[44]=Q,s[45]=$,s[46]=U):U=s[46];let D;s[47]!==R.Body||s[48]!==U?(D=n.jsx(R.Body,{children:U}),s[47]=R.Body,s[48]=U,s[49]=D):D=s[49];let A;s[50]!==z.Content||s[51]!==D?(A=n.jsx(z.Content,{children:D}),s[50]=z.Content,s[51]=D,s[52]=A):A=s[52];let I;return s[53]!==P||s[54]!==A?(I=n.jsx(P,{children:A}),s[53]=P,s[54]=A,s[55]=I):I=s[55],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,c as n,j as c}from"./index-
|
|
1
|
+
import{e as l,c as n,j as c}from"./index-D3dcRy4-.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bN as Ka,bO as Xa,bl as V,y as f,bP as tt,bQ as la,bR as er,bS as tr,aC as ar,a_ as U,aI as Ne,aK as Le,v as N,a$ as b,aJ as re,bT as rr,bU as $,_ as sr,bb as nr,r as M,e as Ze,ab as ca,o as Ct,s as te,K as Ie,z as ce,a2 as Re,a3 as ue,f as or,d as ir,g as lr,V as cr,b as ua,t as ur,j as xe,C as dr,bV as pr}from"./index-D3dcRy4-.js";import{E as fr,g as mr,S as At,u as Rt}from"./constants-DV1Uc_8Q.js";import{a as hr}from"./use-virtual-mcp-CLK92_-L.js";import{u as gr,a as He}from"./use-ai-providers-oEGyGWt1.js";import{u as da}from"./use-decopilot-events-BmJPvHjL.js";import{u as vr}from"./use-tasks-BtgjavUX.js";import{b as yr,c as br}from"./use-collections-D8VuBtQu.js";import{e as Er}from"./use-organization-settings-DlzwYRHw.js";var De;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(De||(De={}));var Vt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Vt||(Vt={}));De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class at extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof at))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}at.create=e=>new at(e);var Bt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Bt||(Bt={}));var T;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(T||(T={}));const Ir={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},_r={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Sr={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Tr={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},Mr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},wr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function Ce(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Jn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=Ce(s,r.id,_r[n]??[])),a.chat.smart||(a.chat.smart=Ce(s,r.id,Sr[n]??[])),a.chat.thinking||(a.chat.thinking=Ce(s,r.id,Tr[n]??[])),a.image||(a.image=Ce(s,r.id,Mr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=Ce(s,r.id,wr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function Cr(e,t,a){if(e.length===0)return null;const r=Ir[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}var pa="vercel.ai.error",Ar=Symbol.for(pa),qt,zt,Q=class fa extends(zt=Error,qt=Ar,zt){constructor({name:t,message:a,cause:r}){super(a),this[qt]=!0,this.name=t,this.cause=r}static isInstance(t){return fa.hasMarker(t,pa)}static hasMarker(t,a){const r=Symbol.for(a);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function ma(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var ha="AI_InvalidArgumentError",ga=`vercel.ai.error.${ha}`,Rr=Symbol.for(ga),Jt,Wt,xr=class extends(Wt=Q,Jt=Rr,Wt){constructor({message:e,cause:t,argument:a}){super({name:ha,message:e,cause:t}),this[Jt]=!0,this.argument=a}static isInstance(e){return Q.hasMarker(e,ga)}},va="AI_JSONParseError",ya=`vercel.ai.error.${va}`,kr=Symbol.for(ya),Gt,Yt,Ht=class extends(Yt=Q,Gt=kr,Yt){constructor({text:e,cause:t}){super({name:va,message:`JSON parsing failed: Text: ${e}.
|
|
2
2
|
Error message: ${ma(t)}`,cause:t}),this[Gt]=!0,this.text=e}static isInstance(e){return Q.hasMarker(e,ya)}},ba="AI_TypeValidationError",Ea=`vercel.ai.error.${ba}`,Pr=Symbol.for(Ea),Qt,Kt,_e=class It extends(Kt=Q,Qt=Pr,Kt){constructor({value:t,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:ba,message:`${s}: Value: ${JSON.stringify(t)}.
|
|
3
3
|
Error message: ${ma(a)}`,cause:a}),this[Qt]=!0,this.value=t,this.context=r}static isInstance(t){return Q.hasMarker(t,Ea)}static wrap({value:t,cause:a,context:r}){var s,n,i;return It.isInstance(a)&&a.value===t&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new It({value:t,cause:a,context:r})}},Fe=({prefix:e,size:t=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(t);for(let o=0;o<t;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(e==null)return s;if(a.includes(r))throw new xr({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${e}${r}${s()}`},Or=Fe();function ge(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((a,r)=>{t[r.toLowerCase()]=a});else{Array.isArray(e)||(e=Object.entries(e));for(const[a,r]of e)r!=null&&(t[a.toLowerCase()]=r)}return t}var Nr=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Dr=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Xt(e){const t=JSON.parse(e);return t===null||typeof t!="object"||Nr.test(e)===!1&&Dr.test(e)===!1?t:$r(t)}function $r(e){let t=[e];for(;t.length;){const a=t;t=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&t.push(n)}}}return e}function jr(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Xt(e)}try{return Xt(e)}finally{Error.stackTraceLimit=t}}function xt(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:a}=e;if(a!=null)for(const r of Object.keys(a))a[r]=le(a[r])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(le):le(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(le)),e.allOf!=null&&(e.allOf=e.allOf.map(le)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(le));const{definitions:t}=e;if(t!=null)for(const a of Object.keys(t))t[a]=le(t[a]);return e}function le(e){return typeof e=="boolean"?e:xt(e)}var Lr=Symbol("Let zodToJsonSchema decide on which parser to use"),ea={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Zr=e=>typeof e=="string"?{...ea,name:e}:{...ea,...e};function q(){return{}}function Fr(e,t){var a,r,s;const n={type:"array"};return(a=e.type)!=null&&a._def&&((s=(r=e.type)==null?void 0:r._def)==null?void 0:s.typeName)!==T.ZodAny&&(n.items=O(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function Ur(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const a of e.checks)switch(a.kind){case"min":a.inclusive?t.minimum=a.value:t.exclusiveMinimum=a.value;break;case"max":a.inclusive?t.maximum=a.value:t.exclusiveMaximum=a.value;break;case"multipleOf":t.multipleOf=a.value;break}return t}function Vr(){return{type:"boolean"}}function Ia(e,t){return O(e.type._def,t)}var Br=(e,t)=>O(e.innerType._def,t);function _a(e,t,a){const r=a??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>_a(e,t,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qr(e)}}var qr=e=>{const t={type:"integer",format:"unix-time"};for(const a of e.checks)switch(a.kind){case"min":t.minimum=a.value;break;case"max":t.maximum=a.value;break}return t};function zr(e,t){return{...O(e.innerType._def,t),default:e.defaultValue()}}function Jr(e,t){return t.effectStrategy==="input"?O(e.schema._def,t):q()}function Wr(e){return{type:"string",enum:Array.from(e.values)}}var Gr=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Yr(e,t){const a=[O(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),O(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(Gr(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function Hr(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var yt=void 0,W={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(yt===void 0&&(yt=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),yt),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Sa(e,t){const a={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":G(a,"email",r.message,t);break;case"format:idn-email":G(a,"idn-email",r.message,t);break;case"pattern:zod":F(a,W.email,r.message,t);break}break;case"url":G(a,"uri",r.message,t);break;case"uuid":G(a,"uuid",r.message,t);break;case"regex":F(a,r.regex,r.message,t);break;case"cuid":F(a,W.cuid,r.message,t);break;case"cuid2":F(a,W.cuid2,r.message,t);break;case"startsWith":F(a,RegExp(`^${bt(r.value,t)}`),r.message,t);break;case"endsWith":F(a,RegExp(`${bt(r.value,t)}$`),r.message,t);break;case"datetime":G(a,"date-time",r.message,t);break;case"date":G(a,"date",r.message,t);break;case"time":G(a,"time",r.message,t);break;case"duration":G(a,"duration",r.message,t);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{F(a,RegExp(bt(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&G(a,"ipv4",r.message,t),r.version!=="v4"&&G(a,"ipv6",r.message,t);break}case"base64url":F(a,W.base64url,r.message,t);break;case"jwt":F(a,W.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&F(a,W.ipv4Cidr,r.message,t),r.version!=="v4"&&F(a,W.ipv6Cidr,r.message,t);break}case"emoji":F(a,W.emoji(),r.message,t);break;case"ulid":{F(a,W.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{G(a,"binary",r.message,t);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{F(a,W.base64,r.message,t);break}}break}case"nanoid":F(a,W.nanoid,r.message,t)}return a}function bt(e,t){return t.patternStrategy==="escape"?Kr(e):e}var Qr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Kr(e){let t="";for(let a=0;a<e.length;a++)Qr.has(e[a])||(t+="\\"),t+=e[a];return t}function G(e,t,a,r){var s;e.format||(s=e.anyOf)!=null&&s.some(n=>n.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...a&&r.errorMessages&&{errorMessage:{format:a}}})):e.format=t}function F(e,t,a,r){var s;e.pattern||(s=e.allOf)!=null&&s.some(n=>n.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:ta(t,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):e.pattern=ta(t,r)}function ta(e,t){var a;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},s=r.i?e.source.toLowerCase():e.source;let n="",i=!1,o=!1,u=!1;for(let l=0;l<s.length;l++){if(i){n+=s[l],i=!1;continue}if(r.i){if(o){if(s[l].match(/[a-z]/)){u?(n+=s[l],n+=`${s[l-2]}-${s[l]}`.toUpperCase(),u=!1):s[l+1]==="-"&&((a=s[l+2])!=null&&a.match(/[a-z]/))?(n+=s[l],u=!0):n+=`${s[l]}${s[l].toUpperCase()}`;continue}}else if(s[l].match(/[a-z]/)){n+=`[${s[l]}${s[l].toUpperCase()}]`;continue}}if(r.m){if(s[l]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[l]==="$"){n+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-
|
|
1
|
+
import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-D3dcRy4-.js";import{i as m}from"./ChevronDown-CAze57fI.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|