@orgsdk/cli 0.1.0 → 0.2.1
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/README.md +21 -7
- package/bin/orgsdk.mjs +1 -1
- package/dist/THIRD_PARTY_NOTICES.txt +278 -0
- package/dist/runtime/README.md +9 -7
- package/dist/runtime/cli.js +12 -13
- package/dist/runtime/client.js +79 -17
- package/dist/runtime/contract.js +39 -6
- package/dist/runtime/executor-configuration.js +1 -1
- package/dist/runtime/isolated-actions.js +4 -5
- package/dist/runtime/isolated-worker.js +5 -0
- package/dist/runtime/mcp/aliases.js +29 -0
- package/dist/runtime/mcp/client.js +239 -0
- package/dist/runtime/mcp/contract.js +57 -0
- package/dist/runtime/mcp/functions.js +40 -0
- package/dist/runtime/mcp/network.js +61 -0
- package/dist/runtime/mcp/schema-types.js +35 -0
- package/dist/runtime/mcp/transport.js +18 -0
- package/dist/runtime/project-data.js +1 -1
- package/dist/runtime/register-executor.js +23 -0
- package/dist/runtime/runner.js +30 -24
- package/dist/runtime/sdk-declarations.js +8 -1
- package/dist/runtime/session-job-contract.js +29 -0
- package/dist/runtime/session-job.js +256 -0
- package/dist/runtime/session-plugin-call.js +33 -0
- package/dist/runtime/sessions/manager.js +5 -3
- package/dist/runtime/sessions/process.js +3 -3
- package/dist/runtime/sessions/session-runtime.js +7 -3
- package/dist/runtime/sessions/worker-guard.js +20 -0
- package/dist/runtime/spawn-job.js +69 -0
- package/dist/runtime/supervisor.js +102 -146
- package/dist/runtime/worker.js +48 -45
- package/dist/server/{bun-driver-JKOGHIVX.js → bun-driver-DTZUUCI3.js} +1 -1
- package/dist/server/{chunk-WCVBLUNL.js → chunk-S5SFX3JM.js} +24 -0
- package/dist/server/index.js +2628 -1230
- package/dist/server/migrations/0003_remote-mcp.sql +17 -0
- package/dist/server/migrations/meta/0003_snapshot.json +3395 -0
- package/dist/server/migrations/meta/_journal.json +7 -0
- package/dist/server/{node-driver-FRDSYDBU.js → node-driver-HDJKKWXQ.js} +1 -1
- package/dist/server/out/404/index.html +1 -1
- package/dist/server/out/404.html +1 -1
- package/dist/server/out/__next.!KHdvcmtzcGFjZSk.__PAGE__.txt +10 -10
- package/dist/server/out/__next._full.txt +11 -11
- package/dist/server/out/__next._tree.txt +2 -2
- package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +1 -0
- package/dist/server/out/_next/static/chunks/0c-3k17txbh0-.js +1 -0
- package/dist/server/out/_next/static/chunks/0cwfl2xanfapu.js +1 -0
- package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +1 -0
- package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +1 -0
- package/dist/server/out/_next/static/chunks/0huhp5j8dlai8.js +1 -0
- package/dist/server/out/_next/static/chunks/0khjy8qh1ll42.js +1 -0
- package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +1 -0
- package/dist/server/out/_next/static/chunks/0rlc9tihf4po6.css +1 -0
- package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +1 -0
- package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +1 -0
- package/dist/server/out/_next/static/chunks/{280w168xxgtwt.js → 0y5lgqdwpeabb.js} +4 -4
- package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +1 -0
- package/dist/server/out/_next/static/chunks/1-75euysc3lin.js +22 -0
- package/dist/server/out/_next/static/chunks/10aam78qxauw0.js +1 -0
- package/dist/server/out/_next/static/chunks/12ro_nqb83zku.js +1 -0
- package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +3 -0
- package/dist/server/out/_next/static/chunks/1c1ayx3fqtub5.js +31 -0
- package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +1 -0
- package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +1 -0
- package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +1 -0
- package/dist/server/out/_next/static/chunks/1iklteprcoims.js +1 -0
- package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +1 -0
- package/dist/server/out/_next/static/chunks/1tnzhqkfwk7l8.js +1 -0
- package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +3 -0
- package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +1 -0
- package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +1 -0
- package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +1 -0
- package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +1 -0
- package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +1 -0
- package/dist/server/out/_next/static/chunks/2lxgam-nk-e9a.js +3 -0
- package/dist/server/out/_next/static/chunks/{3dx108d0g6032.js → 2navy2mx7--vk.js} +1 -1
- package/dist/server/out/_next/static/chunks/2ngzwwqeitkk7.js +1 -0
- package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +1 -0
- package/dist/server/out/_next/static/chunks/2z60o39-yshg2.js +1 -0
- package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +1 -0
- package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +1 -0
- package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +1 -0
- package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +1 -0
- package/dist/server/out/_next/static/chunks/3xs2ji0dgkbmc.js +1 -0
- package/dist/server/out/_next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
- package/dist/server/out/_not-found/__next._full.txt +4 -4
- package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +3 -3
- package/dist/server/out/_not-found/__next._tree.txt +2 -2
- package/dist/server/out/_not-found/index.html +1 -1
- package/dist/server/out/_not-found/index.txt +4 -4
- package/dist/server/out/accounts/2fa/__next._full.txt +9 -9
- package/dist/server/out/accounts/2fa/__next._tree.txt +2 -2
- package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +8 -8
- package/dist/server/out/accounts/2fa/index.html +1 -1
- package/dist/server/out/accounts/2fa/index.txt +9 -9
- package/dist/server/out/accounts/email/__next._full.txt +8 -8
- package/dist/server/out/accounts/email/__next._tree.txt +2 -2
- package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/email/index.html +1 -1
- package/dist/server/out/accounts/email/index.txt +8 -8
- package/dist/server/out/accounts/login/__next._full.txt +8 -8
- package/dist/server/out/accounts/login/__next._tree.txt +2 -2
- package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/login/index.html +1 -1
- package/dist/server/out/accounts/login/index.txt +8 -8
- package/dist/server/out/accounts/logout/__next._full.txt +8 -8
- package/dist/server/out/accounts/logout/__next._tree.txt +2 -2
- package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/logout/index.html +1 -1
- package/dist/server/out/accounts/logout/index.txt +8 -8
- package/dist/server/out/accounts/password/change/__next._full.txt +8 -8
- package/dist/server/out/accounts/password/change/__next._tree.txt +2 -2
- package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/password/change/index.html +1 -1
- package/dist/server/out/accounts/password/change/index.txt +8 -8
- package/dist/server/out/accounts/password/reset/__next._full.txt +6 -6
- package/dist/server/out/accounts/password/reset/__next._tree.txt +2 -2
- package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +5 -5
- package/dist/server/out/accounts/password/reset/index.html +1 -1
- package/dist/server/out/accounts/password/reset/index.txt +6 -6
- package/dist/server/out/accounts/signup/__next._full.txt +8 -8
- package/dist/server/out/accounts/signup/__next._tree.txt +2 -2
- package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/signup/index.html +1 -1
- package/dist/server/out/accounts/signup/index.txt +8 -8
- package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +15 -15
- package/dist/server/out/actions/__next._full.txt +16 -16
- package/dist/server/out/actions/__next._tree.txt +2 -2
- package/dist/server/out/actions/index.html +1 -1
- package/dist/server/out/actions/index.txt +16 -16
- package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +8 -8
- package/dist/server/out/agents/__next._full.txt +9 -9
- package/dist/server/out/agents/__next._tree.txt +2 -2
- package/dist/server/out/agents/index.html +1 -1
- package/dist/server/out/agents/index.txt +9 -9
- package/dist/server/out/apple-touch-icon.png +0 -0
- package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +10 -10
- package/dist/server/out/approvals/__next._full.txt +11 -11
- package/dist/server/out/approvals/__next._tree.txt +2 -2
- package/dist/server/out/approvals/index.html +1 -1
- package/dist/server/out/approvals/index.txt +11 -11
- package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +12 -12
- package/dist/server/out/artifacts/__next._full.txt +13 -13
- package/dist/server/out/artifacts/__next._tree.txt +2 -2
- package/dist/server/out/artifacts/index.html +1 -1
- package/dist/server/out/artifacts/index.txt +13 -13
- package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +10 -10
- package/dist/server/out/audit/__next._full.txt +11 -11
- package/dist/server/out/audit/__next._tree.txt +2 -2
- package/dist/server/out/audit/index.html +1 -1
- package/dist/server/out/audit/index.txt +11 -11
- package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +8 -8
- package/dist/server/out/chat/__next._full.txt +9 -9
- package/dist/server/out/chat/__next._tree.txt +2 -2
- package/dist/server/out/chat/index.html +1 -1
- package/dist/server/out/chat/index.txt +9 -9
- package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +10 -10
- package/dist/server/out/connections/__next._full.txt +11 -11
- package/dist/server/out/connections/__next._tree.txt +2 -2
- package/dist/server/out/connections/index.html +1 -1
- package/dist/server/out/connections/index.txt +11 -11
- package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +11 -11
- package/dist/server/out/credentials/__next._full.txt +12 -12
- package/dist/server/out/credentials/__next._tree.txt +2 -2
- package/dist/server/out/credentials/index.html +1 -1
- package/dist/server/out/credentials/index.txt +12 -12
- package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +10 -10
- package/dist/server/out/documents/__next._full.txt +11 -11
- package/dist/server/out/documents/__next._tree.txt +2 -2
- package/dist/server/out/documents/index.html +1 -1
- package/dist/server/out/documents/index.txt +11 -11
- package/dist/server/out/favicon.ico +0 -0
- package/dist/server/out/favicon.png +0 -0
- package/dist/server/out/favicon.svg +4 -7
- package/dist/server/out/index.html +1 -1
- package/dist/server/out/index.txt +11 -11
- package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +10 -10
- package/dist/server/out/people/__next._full.txt +11 -11
- package/dist/server/out/people/__next._tree.txt +2 -2
- package/dist/server/out/people/index.html +1 -1
- package/dist/server/out/people/index.txt +11 -11
- package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +13 -13
- package/dist/server/out/plugins/__next._full.txt +14 -14
- package/dist/server/out/plugins/__next._tree.txt +2 -2
- package/dist/server/out/plugins/index.html +1 -1
- package/dist/server/out/plugins/index.txt +14 -14
- package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +10 -10
- package/dist/server/out/projects/__next._full.txt +11 -11
- package/dist/server/out/projects/__next._tree.txt +2 -2
- package/dist/server/out/projects/index.html +1 -1
- package/dist/server/out/projects/index.txt +11 -11
- package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +12 -12
- package/dist/server/out/runs/__next._full.txt +13 -13
- package/dist/server/out/runs/__next._tree.txt +2 -2
- package/dist/server/out/runs/index.html +1 -1
- package/dist/server/out/runs/index.txt +13 -13
- package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +12 -12
- package/dist/server/out/schedules/__next._full.txt +13 -13
- package/dist/server/out/schedules/__next._tree.txt +2 -2
- package/dist/server/out/schedules/index.html +1 -1
- package/dist/server/out/schedules/index.txt +13 -13
- package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +10 -10
- package/dist/server/out/settings/__next._full.txt +11 -11
- package/dist/server/out/settings/__next._tree.txt +2 -2
- package/dist/server/out/settings/index.html +1 -1
- package/dist/server/out/settings/index.txt +11 -11
- package/dist/server/out/setup/__next._full.txt +8 -8
- package/dist/server/out/setup/__next._tree.txt +2 -2
- package/dist/server/out/setup/__next.setup.__PAGE__.txt +7 -7
- package/dist/server/out/setup/index.html +1 -1
- package/dist/server/out/setup/index.txt +8 -8
- package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +10 -10
- package/dist/server/out/tables/__next._full.txt +11 -11
- package/dist/server/out/tables/__next._tree.txt +2 -2
- package/dist/server/out/tables/index.html +1 -1
- package/dist/server/out/tables/index.txt +11 -11
- package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +10 -10
- package/dist/server/out/webhooks/__next._full.txt +11 -11
- package/dist/server/out/webhooks/__next._tree.txt +2 -2
- package/dist/server/out/webhooks/index.html +1 -1
- package/dist/server/out/webhooks/index.txt +11 -11
- package/dist/server/out/workspaces/invite/__next._full.txt +7 -7
- package/dist/server/out/workspaces/invite/__next._tree.txt +2 -2
- package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +6 -6
- package/dist/server/out/workspaces/invite/index.html +1 -1
- package/dist/server/out/workspaces/invite/index.txt +7 -7
- package/docs/browser-sessions.md +85 -0
- package/docs/npm-distribution.md +16 -17
- package/docs/remote-mcp.md +51 -0
- package/package.json +53 -20
- package/runtime/README.md +9 -7
- package/dist/runtime/generated/schema.d.ts +0 -6443
- package/dist/server/out/THIRD_PARTY_NOTICES.md +0 -13
- package/dist/server/out/_next/static/chunks/016glzdsa3q5_.js +0 -1
- package/dist/server/out/_next/static/chunks/05i1qq0mw887k.js +0 -1
- package/dist/server/out/_next/static/chunks/06tt8wiyre1ez.js +0 -1
- package/dist/server/out/_next/static/chunks/0cm9i2msjsy--.js +0 -1
- package/dist/server/out/_next/static/chunks/0hq5dvj7fy64b.js +0 -1
- package/dist/server/out/_next/static/chunks/0ma4vl-fj0tmu.js +0 -1
- package/dist/server/out/_next/static/chunks/0noal-jqjivtf.js +0 -1
- package/dist/server/out/_next/static/chunks/0spckmsiek0gd.js +0 -1
- package/dist/server/out/_next/static/chunks/103sekujf0rxr.js +0 -1
- package/dist/server/out/_next/static/chunks/10h8kpcnjfe_v.js +0 -1
- package/dist/server/out/_next/static/chunks/16_aurf9162_6.js +0 -1
- package/dist/server/out/_next/static/chunks/1c48yx15nlt6w.js +0 -1
- package/dist/server/out/_next/static/chunks/1jp827_2p_wkf.js +0 -1
- package/dist/server/out/_next/static/chunks/1kdk-viqnjs3j.js +0 -1
- package/dist/server/out/_next/static/chunks/1mlfee105fhl7.js +0 -1
- package/dist/server/out/_next/static/chunks/1q9jpzm9b6zy9.js +0 -1
- package/dist/server/out/_next/static/chunks/1v0-a7pehktp9.js +0 -22
- package/dist/server/out/_next/static/chunks/24qxhh2dqvhaa.js +0 -1
- package/dist/server/out/_next/static/chunks/253gnn8ai3i89.js +0 -1
- package/dist/server/out/_next/static/chunks/27umf0z4povug.js +0 -1
- package/dist/server/out/_next/static/chunks/2a_c2xcjy62fq.css +0 -1
- package/dist/server/out/_next/static/chunks/2mvlvogrl6o0u.js +0 -1
- package/dist/server/out/_next/static/chunks/2xzrcwr9q6195.js +0 -1
- package/dist/server/out/_next/static/chunks/2yi6lq56xoijl.js +0 -31
- package/dist/server/out/_next/static/chunks/30g0jo299pr8e.js +0 -1
- package/dist/server/out/_next/static/chunks/36tf56rgybjz0.js +0 -3
- package/dist/server/out/_next/static/chunks/39dofrhzg_uju.js +0 -1
- package/dist/server/out/_next/static/chunks/3a8aanmz3kfof.js +0 -1
- package/dist/server/out/_next/static/chunks/3bd3k15tx3lj1.js +0 -1
- package/dist/server/out/_next/static/chunks/3d34pxerfr389.js +0 -1
- package/dist/server/out/_next/static/chunks/3elab9vgx7_ok.js +0 -1
- package/dist/server/out/_next/static/chunks/3gvae9c-5pi5z.js +0 -1
- package/dist/server/out/_next/static/chunks/3hzia782sc9pf.js +0 -1
- package/dist/server/out/_next/static/chunks/3jl4k-15i8847.js +0 -1
- package/dist/server/out/_next/static/chunks/3lb23el6qno6s.js +0 -1
- package/dist/server/out/_next/static/chunks/3prum3lr5470i.js +0 -3
- package/dist/server/out/_next/static/chunks/3prwkrciuqwjg.js +0 -1
- package/dist/server/out/_next/static/chunks/3txmqtuo5xgfd.js +0 -3
- package/dist/server/out/third-party-licenses/monaco-editor.txt +0 -21
- package/dist/server/out/third-party-licenses/zod.txt +0 -21
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → pj0R4_8zvgkN95QPXRHgC}/_buildManifest.js +0 -0
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → pj0R4_8zvgkN95QPXRHgC}/_clientMiddlewareManifest.js +0 -0
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → pj0R4_8zvgkN95QPXRHgC}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809),s=e.r(18050),i=a._(e.r(71645)),c=e.r(95057),l=e.r(8372),u=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),y=e.r(9396);function x(t){var r;let n,o,a,[x,b]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),j=(0,i.useRef)(null),{href:w,as:v,children:S,prefetch:N=null,passHref:P,replace:C,shallow:T,scroll:U,onClick:E,onMouseEnter:_,onTouchStart:R,legacyBehavior:L=!1,onNavigate:O,transitionTypes:$,ref:k,unstable_dynamicOnHover:A,...F}=t;n=S,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let I=i.default.useContext(l.AppRouterContext),M=!1!==N,B=!1===N?"none":!0===N?"full":"auto",D="none"!==B?"auto"===B?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,K="string"==typeof(r=v||w)?r:(0,c.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=i.default.Children.only(n)}let q=L?o&&"object"==typeof o&&o.ref:k,z,G=i.default.useCallback(e=>(null!==I&&(j.current=(0,p.mountLinkInstance)(e,K,I,D,M,b,z)),()=>{j.current&&((0,p.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,p.unmountPrefetchableInstance)(e)}),[M,K,I,D,b,z]),W={ref:(0,u.useMergedRef)(G,q),onClick(t){L||"function"!=typeof E||E(t),L&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,o,a,s,i,c="none"){if("u">typeof window){let l,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{navigate:d}=e.r(32916);d(r,o?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,i,c)}}(t,K,j,C,U,O,$,B)},onMouseEnter(e){L||"function"!=typeof _||_(e),L&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),I&&M&&(0,p.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),I&&M&&(0,p.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,d.isAbsoluteUrl)(K)?W.href=K:L&&!P&&("a"!==o.type||"href"in o.props)||(W.href=(0,f.addBasePath)(K)),a=L?i.default.cloneElement(o,W):(0,s.jsx)("a",{...F,...W,children:n}),(0,s.jsx)(g.Provider,{value:x,children:a})}let g=(0,i.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",i=e.hash||"",c=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),c&&"object"==typeof c&&(c=String(a.urlQueryToSearchParams(c)));let u=e.search||c&&`?${c}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),i&&"#"!==i[0]&&(i="#"+i),u&&"?"!==u[0]&&(u="?"+u),o=o.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${l}${o}${u}${i}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return i(e)}},73668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),o=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return j},NormalizeError:function(){return g},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return a},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return u},isAbsoluteUrl:function(){return c},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class g extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},76046,e=>{e.i(44362);var t=e.i(5506);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},86441,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(73656),o=e.i(71645),a=e.i(896),s=e.i(18879),i=e.i(11105);function c(){return(0,t.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,t.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,t.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,t.jsx)(i.F,{submitLabel:"Confirm password",onSubmit:async e=>(await n.U.auth.reauthenticate.mutate({password:(0,s.f)(e,"password")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(i.F,{submitLabel:"Confirm code",onSubmit:async e=>(await n.U.auth.mfaReauthenticate.mutate({code:(0,s.f)(e,"code")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}e.s(["f",0,function({children:e}){let[s,i]=(0,o.useState)(),[l,u]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=new AbortController;return(0,n.m)(e.signal).then(t=>{e.signal.aborted||i(t)}).catch(()=>{e.signal.aborted||u(!0)}),()=>{e.abort()}},[]);let[d,f]=(0,o.useState)(!1);return l?(0,t.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):s?s.is_authenticated?(0,t.jsxs)(a.T,{value:()=>{f(!0)},children:[e,d&&(0,t.jsx)(c,{})]}):(0,t.jsxs)("p",{children:["Please ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,t.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,896,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(76046),o=e.i(95813);let a=(0,r.createContext)(void 0);function s(){let e=(0,r.useContext)(a);return(t,r)=>e&&(0,n.$)(t)?(e(),n.z):(0,o.f)(t,r)}e.s(["T",0,a,"G",0,s],896);var i=e.i(19455),c=e.i(93479);e.s(["j",0,function({label:e,...r}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(c.f,{...r})]})},"F",0,function({children:e,submitLabel:n,onSubmit:o}){let a=s(),[c,l]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[f,h]=(0,r.useState)("");async function p(e){e.preventDefault();let t=new FormData(e.currentTarget);l(!0),d(""),h("");try{h(await o(t)??"")}catch(e){d(a(e,"Unable to save. Please try again."))}finally{l(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{p(e)},children:[(0,t.jsxs)("fieldset",{disabled:c,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(i.f,{type:"submit",disabled:c,children:c?"Please wait…":n})]}),u&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:u}),f&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:f})]})}],11105)},15448,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:o,children:a,showAccountNavigation:s=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[s&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),o&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:o}),a]})]})]})}])},45187,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(73656),o=e.i(95813),a=e.i(18879),s=e.i(19455),i=e.i(15448),c=e.i(86441),l=e.i(896),u=e.i(11105);function d(){let e=(0,l.G)(),[i,c]=(0,r.useState)(),[d,f]=(0,r.useState)(!1),[h,p]=(0,r.useState)(""),[m,y]=(0,r.useState)([]),[x,g]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=!0;return n.U.auth.authenticators.query().then(t=>{e&&c(t.some(e=>"totp"===e.type))}).catch(t=>{e&&g((0,o.f)(t,"Unable to load authenticators."))}),()=>{e=!1}},[]),(0,t.jsxs)(t.Fragment,{children:[x&&(0,t.jsx)("p",{role:"alert",className:"error",children:x}),void 0===i&&!x&&(0,t.jsx)("p",{role:"status",children:"Loading security settings…"}),!1===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm",children:"Add two-factor authentication using an authenticator app. You will enter a code when signing in."}),h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm",children:"Add an account in your authenticator app with this setup key. Select time-based codes."}),(0,t.jsx)("code",{className:"block break-all rounded bg-slate-100 p-3 text-sm",children:h}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(u.F,{submitLabel:"Enable two-factor authentication",onSubmit:async e=>(await n.U.auth.enableTotp.mutate({code:(0,a.f)(e,"code")}),c(!0),p(""),"Two-factor authentication enabled. Generate recovery codes below."),children:(0,t.jsx)(u.j,{label:"Code from your authenticator",name:"code",autoComplete:"one-time-code",inputMode:"numeric",required:!0})})})]}):(0,t.jsx)(s.f,{disabled:d,onClick:()=>{g(""),f(!0),n.U.auth.totpSetup.mutate().then(e=>{if(c(e.enabled),!e.enabled){if(!e.secret)throw Error("Unable to start authenticator setup. Reload and try again.");p(e.secret)}}).catch(t=>{g(e(t,"Unable to start setup."))}).finally(()=>{f(!1)})},children:d?"Preparing setup…":"Set up authenticator"})]}),!0===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm",children:"Two-factor authentication is enabled."}),(0,t.jsx)("h2",{className:"mt-6",children:"Recovery codes"}),(0,t.jsx)("p",{className:"text-sm",children:"Save these codes somewhere safe. Each code can be used once if you lose access to your authenticator. Generating new codes replaces your previous codes."}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(u.F,{submitLabel:"Show recovery codes",onSubmit:async()=>{let e=await n.U.auth.recoveryCodes.query();return 0===e.unused_codes.length?"These codes have already been shown. Use your saved copy or generate new codes.":(y(e.unused_codes),"Store these codes somewhere safe.")},children:null})}),(0,t.jsx)(u.F,{submitLabel:"Generate new recovery codes",onSubmit:async()=>(y((await n.U.auth.generateRecoveryCodes.mutate()).unused_codes),"Store your recovery codes before leaving this page."),children:null}),m.length>0&&(0,t.jsx)("pre",{className:"mt-4 overflow-x-auto rounded bg-slate-100 p-4","aria-label":"Recovery codes",children:m.join("\n")}),(0,t.jsxs)("details",{className:"mt-8 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Disable two-factor authentication"}),(0,t.jsx)("p",{className:"text-sm",children:"Your next sign-in will require only your password. Confirm your identity below if requested."}),(0,t.jsx)(u.F,{submitLabel:"Disable two-factor authentication",onSubmit:async()=>(await n.U.auth.disableTotp.mutate(),c(!1),y([]),"Two-factor authentication disabled."),children:null})]})]})]})}e.s(["TwoFactor",0,function(){return(0,t.jsx)(i.f,{title:"Two-factor authentication",description:"Protect your account with an authenticator and recovery codes.",showAccountNavigation:!0,children:(0,t.jsx)(c.f,{children:(0,t.jsx)(d,{})})})}])},93479,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(39689);let o=r.forwardRef(({className:e,type:r,...o},a)=>(0,t.jsx)("input",{type:r,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));o.displayName="Input",e.s(["f",0,o])},2716,e=>{var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72520,e=>{let n=(0,e.i(75254).f)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["f",0,n],72520)},95468,e=>{let n=(0,e.i(75254).f)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["f",0,n],95468)},13581,90629,e=>{var n=e.i(71645),s=e.i(95813);e.s(["f",0,function(e,i=0){let[t,r]=(0,n.useState)(),[a,l]=(0,n.useState)(""),[c,o]=(0,n.useState)(!0),d=(0,n.useRef)(void 0),u=(0,n.useRef)(!1),h=(0,n.useCallback)(async()=>{d.current?.abort();let n=new AbortController;d.current=n;try{let s=await e(n.signal);if(n.signal.aborted||!u.current)return;r(s),l("")}catch(e){!n.signal.aborted&&u.current&&l((0,s.f)(e))}finally{!n.signal.aborted&&u.current&&o(!1)}},[e]);return(0,n.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,d.current?.abort(),clearInterval(e)}},[h,i]),{data:t,error:a,isLoading:c,refresh:h}}],13581);var i=e.i(18050),t=e.i(19455);e.s(["f",0,function({isLoading:e,error:n,refresh:s}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,n?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:n}),(0,i.jsx)(t.f,{variant:"outline",onClick:()=>{s()},children:"Try again"})]}):void 0]})}],90629)},295,e=>{var n=e.i(18050),s=e.i(21218),i=e.i(45423),t=e.i(27025),r=e.i(60243),a=e.i(97625),l=e.i(72520),c=e.i(95468),o=e.i(71645),d=e.i(13581),u=e.i(15080),h=e.i(94757),p=e.i(19455),j=e.i(90629),x=e.i(10505);function f({label:e,value:s,hint:i,onClick:t,hasWarning:r=!1}){return(0,n.jsxs)("button",{type:"button",onClick:t,className:`signal-card ${r?"has-warning":""}`,children:[(0,n.jsx)("span",{className:"eyebrow",children:e}),(0,n.jsx)("strong",{children:s}),(0,n.jsx)("span",{children:i})]})}function g({icon:e,label:s,description:i,onClick:t}){return(0,n.jsxs)("button",{type:"button",className:"quick-action",onClick:t,children:[(0,n.jsx)(e,{size:19,"aria-hidden":"true"}),(0,n.jsx)("strong",{children:s}),(0,n.jsx)("span",{children:i})]})}async function v(e,n){let[s,i,t,r,a,l]=await Promise.all([(0,u.f)(e),(0,u.q)(e),(0,u.t)(e),(0,u.i)(e),n?(0,u.h)(e):Promise.resolve([]),(0,u.p)(e)]);return{runs:s,projects:i,actions:t,approvals:r,tokens:a,plugins:l}}function k({navigate:e,openRun:u}){let{canManage:m}=(0,h.useWorkspace)(),b=(0,o.useCallback)(e=>v(e,m),[m]),y=(0,d.f)(b,1e4),w=y.data,C=w?.approvals.filter(e=>"pending"===e.status)??[],N=w?.runs.filter(e=>x.B.includes(e.status))??[],z=w?.runs.find(e=>"failed"===e.status||"interrupted"===e.status),R=[{label:"Create a project",done:(w?.projects.length??0)>0,view:"work"},{label:"Connect an external client",done:(w?.tokens.length??0)>0,view:"connections"},{label:"Create your first action",done:(w?.actions.length??0)>0,view:"actions"},{label:"Complete a run",done:w?.runs.some(e=>"succeeded"===e.status)??!1,view:"runs"}];return(0,n.jsxs)("div",{className:"overview",children:[(0,n.jsx)(j.f,{...y}),w?(0,n.jsxs)(n.Fragment,{children:[R.some(e=>!e.done)?(0,n.jsxs)("section",{className:"panel first-run",children:[(0,n.jsxs)("div",{className:"panel-title",children:[(0,n.jsx)("h2",{children:"Get your workspace running"}),(0,n.jsxs)("span",{className:"badge",children:[R.filter(e=>e.done).length," of ",R.length," ","complete"]})]}),(0,n.jsx)("p",{className:"small",children:"Connect your tools, publish an action and inspect its first result."}),(0,n.jsx)("div",{className:"onboarding-steps",children:R.map(s=>(0,n.jsxs)("button",{className:s.done?"is-complete":"",onClick:()=>{e(s.view)},children:[(0,n.jsx)(c.f,{size:17}),s.label,(0,n.jsx)(l.f,{size:14})]},s.label))})]}):void 0,(0,n.jsxs)("section",{className:"signal-grid","aria-label":"Workspace signals",children:[(0,n.jsx)(f,{label:"Actions",value:String(w.actions.length),hint:"Reusable workflows",onClick:()=>{e("actions")}}),(0,n.jsx)(f,{label:"Pending approvals",value:String(C.length),hint:"Decisions waiting for you",hasWarning:C.length>0,onClick:()=>{e("approvals")}}),(0,n.jsx)(f,{label:"Runs in progress",value:String(N.length),hint:`${String(w.runs.length)} total runs`,onClick:()=>{e("runs")}}),(0,n.jsx)(f,{label:"Projects",value:String(w.projects.length),hint:`${String(w.plugins.length)} installed plugins`,onClick:()=>{e("connections")}})]}),C.length>0?(0,n.jsxs)("section",{className:"next-action",children:[(0,n.jsx)(i.f,{size:20}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{children:[C.length," approval",1===C.length?"":"s"," ","waiting"]}),(0,n.jsx)("p",{children:"Review the requested work before it proceeds."})]}),(0,n.jsx)(p.f,{onClick:()=>{e("approvals")},children:"Review approvals"})]}):void 0,z&&0===C.length?(0,n.jsxs)("section",{className:"next-action",children:[(0,n.jsx)(s.f,{size:20}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{children:"Review the latest failed run"}),(0,n.jsx)("p",{children:"Inspect the result and trace before deciding whether to retry."})]}),(0,n.jsx)(p.f,{onClick:()=>{u(z.id)},children:"Open run"})]}):void 0,N.length>0?(0,n.jsxs)("section",{className:"panel running-region","aria-label":"Running now",children:[(0,n.jsxs)("h2",{children:[(0,n.jsx)(s.f,{size:17})," Running now"]}),N.map(e=>(0,n.jsxs)("div",{className:"resource-row",children:[(0,n.jsx)("span",{children:(0,x.N)(e,w.projects)}),(0,n.jsx)(x.k,{status:e.status}),(0,n.jsx)(p.f,{variant:"outline",size:"sm",onClick:()=>{u(e.id)},children:"View run"})]},e.id))]}):void 0,(0,n.jsxs)("section",{className:"panel",children:[(0,n.jsxs)("div",{className:"panel-title",children:[(0,n.jsx)("h2",{children:"Recent runs"}),(0,n.jsxs)(p.f,{variant:"ghost",size:"sm",onClick:()=>{e("runs")},children:["All runs ",(0,n.jsx)(l.f,{size:14})]})]}),0===w.runs.length?(0,n.jsxs)("div",{className:"resource-empty",children:[(0,n.jsx)(c.f,{size:28}),(0,n.jsx)("h3",{children:"Ready for your first run"}),(0,n.jsx)("p",{children:"Connect an external client or create an action to get started."}),(0,n.jsx)(p.f,{onClick:()=>{e("connections")},children:"Connect a client"})]}):w.runs.slice(0,5).map(e=>(0,n.jsxs)("div",{className:"resource-row",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:(0,x.N)(e,w.projects)}),(0,n.jsx)("small",{children:new Date(e.created_at).toLocaleString()})]}),(0,n.jsx)(x.k,{status:e.status}),(0,n.jsx)(p.f,{variant:"ghost",size:"sm",onClick:()=>{u(e.id)},children:"Open"})]},e.id))]}),(0,n.jsxs)("section",{className:"quick-grid","aria-label":"Quick actions",children:[(0,n.jsx)(g,{icon:a.f,label:"Build an action",description:"Write, version and run a workflow.",onClick:()=>{e("actions")}}),(0,n.jsx)(g,{icon:t.f,label:"Configure a project",description:"Set up its runner, integrations and data access.",onClick:()=>{e("work")}}),(0,n.jsx)(g,{icon:r.f,label:"Manage connections",description:"Connect clients and secure credentials.",onClick:()=>{e("connections")}})]})]}):void 0]})}e.s(["default",0,function(){let{goTo:e,openRun:s}=(0,h.useWorkspace)();return(0,n.jsx)(k,{navigate:e,openRun:s})}],295)},10505,21218,e=>{var n=e.i(18050),s=e.i(75254);let i=(0,s.f)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["f",0,i],21218);var t=e.i(95468);let r=(0,s.f)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]),a=(0,s.f)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),l=(0,s.f)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function c(e){return({chat:"Chat task",code:"Code execution",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let s={succeeded:t.f,waiting_approval:a,running:i,queued:r,failed:l,cancelled:l,interrupted:l}[e]??r;return(0,n.jsxs)("span",{className:`run-status status-${e}`,children:[(0,n.jsx)(s,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,n){let s=n.find(n=>n.id===e.project)?.name??"Project";return"chat"===e.operation?`${s} \xb7 ${(function(e,n){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,n)){let s=Reflect.get(e,n);if("string"==typeof s)return s}return""})(e.inputs,"message").slice(0,70)}`:`${s} \xb7 ${c(e.operation)}`},"T",0,c],10505)}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{let t=(0,e.i(75254).f)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["f",0,t],95468)},27612,e=>{let t=(0,e.i(75254).f)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["f",0,t],27612)},13581,90629,e=>{var t=e.i(71645),s=e.i(95813);e.s(["f",0,function(e,n=0){let[i,a]=(0,t.useState)(),[r,c]=(0,t.useState)(""),[o,l]=(0,t.useState)(!0),d=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{d.current?.abort();let t=new AbortController;d.current=t;try{let s=await e(t.signal);if(t.signal.aborted||!u.current)return;a(s),c("")}catch(e){!t.signal.aborted&&u.current&&c((0,s.f)(e))}finally{!t.signal.aborted&&u.current&&l(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=n>0?setInterval(()=>{h()},n):void 0;return()=>{u.current=!1,d.current?.abort(),clearInterval(e)}},[h,n]),{data:i,error:r,isLoading:o,refresh:h}}],13581);var n=e.i(18050),i=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:s}){return(0,n.jsxs)(n.Fragment,{children:[e?(0,n.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,n.jsxs)("div",{className:"error",role:"alert",children:[(0,n.jsx)("p",{children:t}),(0,n.jsx)(i.f,{variant:"outline",onClick:()=>{s()},children:"Try again"})]}):void 0]})}],90629)},16271,e=>{var t=e.i(18050),s=e.i(60243),n=e.i(75254);let i=(0,n.f)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var a=e.i(65261);let r=(0,n.f)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]);var c=e.i(27612),o=e.i(71645),l=e.i(73656),d=e.i(95813),u=e.i(15080),h=e.i(13581),p=e.i(19455),j=e.i(93479),v=e.i(90629),f=e.i(87309),x=e.i(94757),m=e.i(59037),g=e.i(75016),k=e.i(10505);let y=[["catalog:read","Discover granted projects, actions and SDK"],["code:execute","Execute one-off code in selected projects"],["actions:write","Create and version actions in selected projects"],["actions:run","Execute granted saved actions"],["actions:test","Run isolated mocked action tests"],["runs:read","Inspect this client's own runs"],["runs:cancel","Cancel this client's own runs"]],b=y.map(([e])=>e),C=["catalog:read","actions:run","runs:read","runs:cancel"];async function w(e,t){let[s,n]=await Promise.all([(0,u.q)(e),(0,u.t)(e)]),i=await Promise.all(n.filter(e=>e.project===t).map(async t=>(await l.U.actions.versions.query({id:t.id},{signal:e})).map(e=>({...e,actionName:t.name,project:t.project}))));return{projects:s.filter(e=>e.id===t),versions:i.flat()}}function N(e,t,s){return s?[...e,t]:e.filter(e=>e!==t)}function _({canManage:e,navigate:n}){let{selected:S,projects:M,setDirty:P}=(0,x.useWorkspace)(),q=(0,h.f)(u.h),z=(0,o.useCallback)(e=>w(e,S),[S]),R=(0,h.f)(z),T=new Set(R.data?.versions.map(e=>e.id)),A=(q.data??[]).filter(e=>e.projects.includes(S)||e.action_versions.some(e=>T.has(e))),L=M.find(e=>e.id===S)?.name??"this project",[$,E]=(0,o.useState)(S?[S]:[]),[O,U]=(0,o.useState)([]),[D,V]=(0,o.useState)("projects"),B=(0,f.h)(),[H,I]=(0,o.useState)(""),[K,F]=(0,o.useState)(b),[G,J]=(0,o.useState)(""),[W,Y]=(0,o.useState)(!1),[Q,X]=(0,o.useState)(""),[Z,ee]=(0,o.useState)("");(0,m.f)(""!==H.trim()||""!==G,P);let et=async e=>{Y(!0),X(""),ee("");try{await e(),await q.refresh()}catch(e){X((0,d.f)(e))}finally{Y(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(s.f,{size:18})," Connect an agent over MCP"]}),(0,t.jsxs)("p",{children:["Choose what your agent can do in ",L,", then add the MCP connection to its client. Your project controls the actions, plugins and workspace data available to it."]}),(0,t.jsxs)("div",{className:"my-4 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(g.f,{href:`/projects/?${new URLSearchParams({project:S,tab:"access"}).toString()}`,children:"Review data access"}),(0,t.jsx)(g.f,{href:`/plugins/?${new URLSearchParams({project:S}).toString()}`,children:"Manage project plugins"})]}),(0,t.jsxs)("div",{className:"two-columns",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{children:"1. Create a scoped token"}),(0,t.jsx)("p",{className:"small",children:"Give each client its own token. Select only the access it needs, then save the token in that client."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{children:"2. Configure your client"}),(0,t.jsxs)("p",{className:"small",children:["Use this workspace domain with the MCP endpoint ",(0,t.jsx)("code",{children:"/mcp/"}),", or the typed tRPC API at ",(0,t.jsx)("code",{children:"/trpc"}),". Send the token as"," ",(0,t.jsx)("code",{children:"Authorization: Bearer <token>"}),"."]}),(0,t.jsxs)(p.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(`${location.origin}/mcp/`).then(()=>{ee("MCP endpoint copied.")}).catch(()=>{X("Could not copy. Use this workspace domain followed by /mcp/.")})},children:[(0,t.jsx)(i,{size:13}),"Copy MCP endpoint"]})]})]}),(0,t.jsx)("p",{className:"small",children:"Activity reflects requests observed locally since tracking began, not whether a client is online. Recently used means a request in the last seven days; inactive means no request in that window. Never used means no observed request, including tokens issued before tracking began."})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:["Clients with access to ",L]}),(0,t.jsx)(p.f,{variant:"outline",size:"sm",onClick:()=>{q.refresh()},children:"Refresh activity"})]}),(0,t.jsx)(v.f,{...q}),(0,t.jsx)(v.f,{...R}),q.data?(0,t.jsxs)("p",{className:"small",children:[A.filter(e=>!e.revoked&&e.request_count>0).length," ","current tokens used ·"," ",A.filter(e=>!e.revoked&&0===e.request_count).length," ","never observed · ",A.filter(e=>e.revoked).length," ","revoked"]}):void 0,q.isLoading||R.isLoading||q.error||R.error||0!==A.length?void 0:(0,t.jsx)("p",{children:"No clients have been granted access to this project yet."}),A.map(s=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsx)(a.f,{size:17}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:s.name}),(0,t.jsxs)("small",{children:["Scoped client token · ",(0,k.A)(s.scopes)," ·"," ",s.activity_state.replaceAll("_"," ")]}),(0,t.jsxs)("small",{children:["Projects:"," ",s.projects.map(e=>R.data?.projects.find(t=>t.id===e)?.name??e).join(", ")||"None"]}),(0,t.jsxs)("small",{children:["Exact action versions:"," ",s.action_versions.map(e=>{let t=R.data?.versions.find(t=>t.id===e);return t?`${t.actionName} \xb7 version ${String(t.number)}`:e}).join(", ")||"None"]}),(0,t.jsxs)("small",{children:[s.request_count," requests · ",s.success_count," successful · ",s.error_count," errors · ",s.trpc_request_count," tRPC ·"," ",s.mcp_request_count," MCP"]}),(0,t.jsxs)("small",{children:["First observed:"," ",s.first_used_at?new Date(s.first_used_at).toLocaleString():"Never"," ","· Last observed:"," ",s.last_used_at?new Date(s.last_used_at).toLocaleString():"Never"]}),s.last_used_at?(0,t.jsxs)("small",{children:["Last outcome: ",s.last_outcome," · ",s.last_transport," · HTTP ",s.last_status_code]}):void 0]}),e&&!s.revoked?(0,t.jsxs)(p.f,{variant:"outline",size:"sm",disabled:W,onClick:()=>{et(async()=>{await B({title:"Revoke this client's access?",description:"The client will no longer be able to use this workspace with its token.",actionLabel:"Revoke token"})&&(await l.U.tokens.revoke.mutate({id:s.id}),ee("Client token revoked."))})},children:[(0,t.jsx)(c.f,{size:13}),"Revoke"]}):void 0]},s.id))]}),(0,t.jsx)("p",{className:"small",children:"Counts include requests with a valid token identity and current membership, including scope denials. Errors include HTTP failures and MCP protocol or tool errors, even with HTTP 200. Request bodies and secrets are not stored."}),e?(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Create access token"}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),et(async()=>{J((await l.U.tokens.create.mutate({name:H,scopes:K,projects:"projects"===D?$:[],action_versions:"versions"===D?O:[]})).token),I(""),ee("Token created. Copy it now; it will not be shown again.")})},children:[(0,t.jsxs)("label",{children:["Client name",(0,t.jsx)(j.f,{required:!0,value:H,disabled:W,onChange:e=>{I(e.target.value)},placeholder:"e.g. Local MCP client"})]}),(0,t.jsxs)("label",{children:["Permission preset",(0,t.jsxs)("select",{disabled:W,defaultValue:"author",onChange:e=>{let t="author"===e.target.value;F(t?b:C),V(t?"projects":"versions")},children:[(0,t.jsx)("option",{value:"author",children:"Authoring client — explore code, save and test actions"}),(0,t.jsx)("option",{value:"runner",children:"Action runner — execute selected saved versions"})]})]}),(0,t.jsxs)("fieldset",{children:[(0,t.jsx)("legend",{children:"Actual operations granted"}),y.map(([e,s])=>(0,t.jsxs)("label",{className:"check",children:[(0,t.jsx)(j.f,{type:"checkbox",checked:K.includes(e),disabled:W,onChange:t=>{F(s=>t.target.checked?[...s,e]:s.filter(t=>t!==e))}}),s," ",(0,t.jsx)("code",{children:e})]},e))]}),(0,t.jsxs)("fieldset",{disabled:W,children:[(0,t.jsx)("legend",{children:"Resource grants"}),(0,t.jsxs)("label",{children:["Grant access to",(0,t.jsxs)("select",{value:D,onChange:e=>{V(e.target.value)},children:[(0,t.jsx)("option",{value:"projects",children:"Selected projects"}),(0,t.jsx)("option",{value:"versions",children:"Exact immutable action versions"})]})]}),(0,t.jsx)(v.f,{...R}),"projects"===D?R.data?.projects.map(e=>(0,t.jsxs)("label",{className:"check",children:[(0,t.jsx)("input",{type:"checkbox",checked:$.includes(e.id),onChange:t=>{E(s=>N(s,e.id,t.target.checked))}}),e.name]},e.id)):R.data?.versions.map(e=>(0,t.jsxs)("label",{className:"check",children:[(0,t.jsx)("input",{type:"checkbox",checked:O.includes(e.id),onChange:t=>{U(s=>N(s,e.id,t.target.checked))}}),e.actionName," · version ",e.number," ·"," ",R.data?.projects.find(t=>t.id===e.project)?.name]},e.id)),"versions"===D&&K.some(e=>["code:execute","actions:write"].includes(e))?(0,t.jsx)("p",{className:"error",children:"Code execution and action authoring require a project grant. Remove these operations or select projects."}):null,(0,t.jsx)("p",{className:"small",children:"Project grants include current and future actions in those projects. Exact-version grants permit only the versions selected here. Clients cannot manage plugins, credentials, grants or approvals. Existing keys retain their current authority until revoked."})]}),(0,t.jsx)(p.f,{type:"submit",disabled:W||!!G||0===K.length||("projects"===D?0===$.length:0===O.length||K.some(e=>["code:execute","actions:write"].includes(e))),children:"Create token"})]}),G?(0,t.jsxs)("div",{className:"issued-token",children:[(0,t.jsxs)("label",{children:["New access token",(0,t.jsx)(j.f,{type:"password",readOnly:!0,autoComplete:"off",value:G})]}),(0,t.jsxs)("p",{className:"small",children:["Configure your client’s HTTP MCP transport with this workspace’s"," ",(0,t.jsx)("code",{children:"/mcp/"})," endpoint and an"," ",(0,t.jsx)("code",{children:"Authorization: Bearer"})," header containing this token. Keep the token in the client’s secret configuration. OrgSDK does not require a model account."]}),(0,t.jsx)(p.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(JSON.stringify({mcpServers:{orgsdk:{type:"http",url:`${location.origin}/mcp/`,headers:{Authorization:`Bearer ${G}`}}}},null,2)).then(()=>{ee("MCP configuration copied. Store it privately in your client configuration.")}).catch(()=>{X("Clipboard unavailable. Configure the endpoint and authorization header manually.")})},children:"Copy MCP configuration"}),(0,t.jsxs)(p.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(G).then(()=>{ee("Token copied.")}).catch(()=>{X("Clipboard access failed. Select and copy the new token field.")})},children:[(0,t.jsx)(i,{size:13}),"Copy token"]}),(0,t.jsx)(p.f,{variant:"ghost",onClick:()=>{J("")},children:"Dismiss token"})]}):void 0]}):(0,t.jsx)("p",{className:"notice",children:"Only owners and admins can issue or revoke access tokens."}),(0,t.jsxs)("div",{className:"quick-grid",children:[(0,t.jsxs)("button",{className:"quick-action",onClick:()=>{n("credentials")},children:[(0,t.jsx)(a.f,{size:18}),(0,t.jsx)("strong",{children:"Credentials"}),(0,t.jsx)("span",{children:"Manage encrypted provider secrets."})]}),(0,t.jsxs)("button",{className:"quick-action",onClick:()=>{n("plugins")},children:[(0,t.jsx)(r,{size:18}),(0,t.jsx)("strong",{children:"Plugins"}),(0,t.jsx)("span",{children:"Install and configure your projects’ integrations."})]})]}),Q?(0,t.jsx)("p",{className:"error",role:"alert",children:Q}):void 0,Z?(0,t.jsx)("p",{className:"notice",role:"status",children:Z}):void 0]})}e.s(["default",0,function(){let{canManage:e,goTo:s,selected:n}=(0,x.useWorkspace)();return(0,t.jsx)(_,{canManage:e,navigate:s},n)}],16271)},93479,e=>{var t=e.i(18050),s=e.i(71645),n=e.i(39689);let i=s.forwardRef(({className:e,type:s,...i},a)=>(0,t.jsx)("input",{type:s,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...i}));i.displayName="Input",e.s(["f",0,i])},10505,21218,e=>{var t=e.i(18050),s=e.i(75254);let n=(0,s.f)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["f",0,n],21218);var i=e.i(95468);let a=(0,s.f)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]),r=(0,s.f)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),c=(0,s.f)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function o(e){return({chat:"Chat task",code:"Code execution",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let s={succeeded:i.f,waiting_approval:r,running:n,queued:a,failed:c,cancelled:c,interrupted:c}[e]??a;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(s,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let s=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${s} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let s=Reflect.get(e,t);if("string"==typeof s)return s}return""})(e.inputs,"message").slice(0,70)}`:`${s} \xb7 ${o(e.operation)}`},"T",0,o],10505)},59037,e=>{var t=e.i(71645);e.s(["f",0,function(e,s){(0,t.useEffect)(()=>{s(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),s(!1)}},[e,s])}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),s=e.r(18050),i=o._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),f=e.r(18967),d=e.r(5550),p=e.r(88540),m=e.r(91949),h=e.r(73668),g=e.r(9396);function x(t){var r;let n,a,o,[x,b]=(0,i.useOptimistic)(m.IDLE_LINK_STATUS),j=(0,i.useRef)(null),{href:w,as:v,children:N,prefetch:S=null,passHref:C,replace:P,shallow:_,scroll:k,onClick:E,onMouseEnter:T,onTouchStart:O,legacyBehavior:L=!1,onNavigate:U,transitionTypes:R,ref:A,unstable_dynamicOnHover:M,...$}=t;n=N,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let I=i.default.useContext(u.AppRouterContext),B=!1!==S,F=!1===S?"none":!0===S?"full":"auto",D="none"!==F?"auto"===F?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,q="string"==typeof(r=v||w)?r:(0,l.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");a=i.default.Children.only(n)}let K=L?a&&"object"==typeof a&&a.ref:A,z,W=i.default.useCallback(e=>(null!==I&&(j.current=(0,m.mountLinkInstance)(e,q,I,D,B,b,z)),()=>{j.current&&((0,m.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,m.unmountPrefetchableInstance)(e)}),[B,q,I,D,b,z]),V={ref:(0,c.useMergedRef)(W,K),onClick(t){L||"function"!=typeof E||E(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,o,s,i,l="none"){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,a?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i,l)}}(t,q,j,P,k,U,R,F)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),I&&B&&(0,m.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){L||"function"!=typeof O||O(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),I&&B&&(0,m.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,f.isAbsoluteUrl)(q)?V.href=q:L&&!C&&("a"!==a.type||"href"in a.props)||(V.href=(0,d.addBasePath)(q)),o=L?i.default.cloneElement(a,V):(0,s.jsx)("a",{...$,...V,children:n}),(0,s.jsx)(y.Provider,{value:x,children:o})}let y=(0,i.createContext)(m.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},73668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return j},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return h},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return s},getDisplayName:function(){return f},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let h="u">typeof performance,g=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},70307,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(71645),a=e.i(73656),o=e.i(95813),s=e.i(15448),i=e.i(19455),l=e.i(93479),u=e.i(18879);e.s(["default",0,function(){let[e,c]=(0,n.useState)(),[f,d]=(0,n.useState)(""),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(!1),[x,y]=(0,n.useState)(0);return(0,n.useEffect)(()=>{let e=new AbortController;return a.U.auth.setupStatus.query(void 0,{signal:e.signal}).then(t=>{e.signal.aborted||c(t)}).catch(t=>{e.signal.aborted||d((0,o.f)(t))}),()=>{e.abort()}},[x]),(0,t.jsxs)(s.f,{title:"Set up your workspace",description:"Create your local administrator and first project. Configure a runner and connect your external client after signing in.",children:[h&&(0,t.jsxs)("div",{role:"status",children:[(0,t.jsx)("p",{children:"Your workspace is ready. Sign in to get started."}),(0,t.jsx)(i.f,{asChild:!0,children:(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in"})})]}),!h&&e?.setup_required===!1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:"This server is already set up."}),(0,t.jsx)(i.f,{asChild:!0,children:(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in"})})]}),!h&&e?.setup_required&&(0,t.jsx)("form",{className:"space-y-4",onSubmit:t=>{t.preventDefault();let r=new FormData(t.currentTarget);m(!0),d(""),(async()=>{try{let t=(0,u.f)(r,"password1");if(t!==(0,u.f)(r,"password2"))throw Error("The passwords do not match.");await a.U.auth.setup.mutate({domain:e.hostname,workspace_name:(0,u.f)(r,"workspace_name"),username:(0,u.f)(r,"username"),email:(0,u.f)(r,"email"),password1:t,password2:(0,u.f)(r,"password2"),project_name:(0,u.f)(r,"project_name")}),g(!0)}catch(e){d((0,o.f)(e))}finally{m(!1)}})()},children:(0,t.jsxs)("fieldset",{disabled:p,className:"space-y-4 border-0 p-0",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Workspace name",(0,t.jsx)(l.f,{name:"workspace_name",autoComplete:"organization",required:!0,maxLength:100})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Username",(0,t.jsx)(l.f,{name:"username",autoComplete:"username",required:!0,maxLength:150})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Email",(0,t.jsx)(l.f,{name:"email",type:"email",autoComplete:"email",required:!0})]}),(0,t.jsx)("p",{className:"small",children:"Use this email to sign in. No email verification is needed."}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Password",(0,t.jsx)(l.f,{name:"password1",type:"password",autoComplete:"new-password",required:!0})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["Confirm password",(0,t.jsx)(l.f,{name:"password2",type:"password",autoComplete:"new-password",required:!0})]}),(0,t.jsxs)("label",{className:"block text-sm font-medium",children:["First project name",(0,t.jsx)(l.f,{name:"project_name",defaultValue:"My project",maxLength:100})]}),(0,t.jsx)(i.f,{type:"submit",children:p?"Creating workspace…":"Create workspace"})]})}),!h&&!e&&!f&&(0,t.jsx)("p",{role:"status",children:"Checking this installation…"}),f&&(0,t.jsxs)("div",{role:"alert",children:[(0,t.jsx)("p",{className:"error",children:f}),!e&&(0,t.jsx)(i.f,{variant:"outline",onClick:()=>{d(""),y(e=>e+1)},children:"Try again"})]})]})}])},15448,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:a,children:o,showAccountNavigation:s=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[s&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),a&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:a}),o]})]})]})}])},93479,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(39689);let a=r.forwardRef(({className:e,type:r,...a},o)=>(0,t.jsx)("input",{type:r,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));a.displayName="Input",e.s(["f",0,a])},2716,e=>{var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81140,e=>{var t=Object.defineProperty,n=(e,n)=>t(e,"name",{value:n,configurable:!0}),r=!!("u">typeof window&&window.document&&window.document.createElement);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return n(function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}function a(e){if(!r)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function i(e){return"IFRAME"===e.tagName}n(o,"composeEventHandlers"),n(function(e){if(!r)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),n(a,"getOwnerDocument"),n(function e(t,n=!1){let{activeElement:r}=a(t);if(!r?.nodeName)return null;if(i(r)&&r.contentDocument)return e(r.contentDocument.body,n);if(n){let e=r.getAttribute("aria-activedescendant");if(e){let t=a(r).getElementById(e);if(t)return t}}return r},"getActiveElement"),n(i,"isFrame"),e.s(["f",0,o])},30030,e=>{var t=e.i(71645),n=e.i(18050),r=Object.defineProperty,o=(e,t)=>r(e,"name",{value:t,configurable:!0});function a(e,r=[]){let s=[];function c(r,a){let i=t.createContext(a);i.displayName=r+"Context";let c=s.length;s=[...s,a];let l=o(r=>{let{scope:o,children:a,...s}=r,l=o?.[e]?.[c]||i,u=t.useMemo(()=>s,Object.values(s));return(0,n.jsx)(l.Provider,{value:u,children:a})},"Provider");function u(n,o,s={}){let{optional:l=!1}=s,d=o?.[e]?.[c]||i,f=t.useContext(d);if(f)return f;if(void 0!==a)return a;if(!l)throw Error(`\`${n}\` must be used within \`${r}\``)}return l.displayName=r+"Provider",o(u,"useContext"),[l,u]}o(c,"createContext");let l=o(()=>{let n=s.map(e=>t.createContext(e));return o(function(r){let o=r?.[e]||n;return t.useMemo(()=>({[`__scope${e}`]:{...r,[e]:o}}),[r,o])},"useScope")},"createScope");return l.scopeName=e,[c,i(l,...r)]}function i(...e){let n=e[0];if(1===e.length)return n;let r=o(()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return o(function(e){let o=r.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return t.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return r.scopeName=n.scopeName,r}o(function(e,r){let a=t.createContext(r);a.displayName=e+"Context";let i=o(e=>{let{children:r,...o}=e,i=t.useMemo(()=>o,Object.values(o));return(0,n.jsx)(a.Provider,{value:i,children:r})},"Provider");function s(n,o={}){let{optional:i=!1}=o,c=t.useContext(a);if(c)return c;if(void 0!==r)return r;if(!i)throw Error(`\`${n}\` must be used within \`${e}\``)}return i.displayName=e+"Provider",o(s,"useContext"),[i,s]},"createContext"),o(a,"createContextScope"),o(i,"composeContextScopes"),e.s(["f",0,a])},26330,48425,30207,e=>{var t,n=e.i(71645),r=e.i(81140),o=e.i(74080),a=e.i(91918),i=e.i(18050),s=Object.defineProperty,c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,a.B)(`Primitive.${t}`),o=n.forwardRef((e,n)=>{let{asChild:o,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(o?r:t,{...a,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function l(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}s(l,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),e.s(["V",0,c,"u",0,l],48425);var u=e.i(20783),d=e.i(34620),f=Object.defineProperty,p=n[" useInsertionEffect ".trim().toString()];function h(e){let t=n.useRef(e);return"function"==typeof p?p(()=>{t.current=e}):(0,d.f)(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}f(h,"name",{value:"useCallbackRef",configurable:!0}),e.s(["f",0,h],30207);var m=Object.defineProperty,v=(e,t)=>m(e,"name",{value:t,configurable:!0}),g="dismissableLayer.update",y=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),b=n.forwardRef(v(function(e,o){let{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,...b}=e,w=n.useContext(y),[x,C]=n.useState(null),S=x?.ownerDocument??globalThis?.document,[,N]=n.useState({}),R=(0,u.f)(o,C),D=Array.from(w.layers),[M]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),P=M?D.indexOf(M):-1,A=x?D.indexOf(x):-1,O=w.layersWithOutsidePointerEventsDisabled.size>0,L=A>=P,T=n.useRef(!1),I=E(e=>{d?.(e),p?.(e),e.defaultPrevented||m?.()},{ownerDocument:S,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:w.dismissableSurfaces,shouldHandlePointerDownOutside:n.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...w.branches].some(t=>t.contains(e));return L&&!t},[w.branches,L])}),F=k(e=>{if(s&&T.current)return;let t=e.target;![...w.branches].some(e=>e.contains(t))&&(f?.(e),p?.(e),e.defaultPrevented||m?.())},S),W=!!x&&A===D.length-1,_=h(e=>{"Escape"===e.key&&(l?.(e),!e.defaultPrevented&&m&&(e.preventDefault(),m()))});return n.useEffect(()=>{if(W)return S.addEventListener("keydown",_,{capture:!0}),()=>S.removeEventListener("keydown",_,{capture:!0})},[S,W,_]),n.useEffect(()=>{if(x)return a&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(t=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(x)),w.layers.add(x),j(),()=>{a&&(w.layersWithOutsidePointerEventsDisabled.delete(x),0===w.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=t))}},[x,S,a,w]),n.useEffect(()=>()=>{x&&(w.layers.delete(x),w.layersWithOutsidePointerEventsDisabled.delete(x),j())},[x,w]),n.useEffect(()=>{let e=v(()=>N({}),"handleUpdate");return document.addEventListener(g,e),()=>document.removeEventListener(g,e)},[]),(0,i.jsx)(c.div,{...b,ref:R,style:{pointerEvents:O?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,r.f)(e.onFocusCapture,F.onFocusCapture),onBlurCapture:(0,r.f)(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:(0,r.f)(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function w(){let e=n.useContext(y),[t,r]=n.useState(null);return n.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}v(w,"useDismissableLayerSurface");var x=v(()=>!0,"IS_TRUE");function E(e,t){let{ownerDocument:r=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=x}=t,c=h(e),l=n.useRef(!1),u=n.useRef(!1),d=n.useRef(new Map),f=n.useRef(()=>{});return n.useEffect(()=>{function e(){u.current=!1,a.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function n(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...i].some(e=>e.contains(t))||d.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}v(e,"resetOutsideInteraction"),v(t,"isOutsideInteractionIntercepted"),v(n,"handleInteractionCapture"),v(p,"handleInteractionBubble");let h=v(n=>{if(n.target&&!l.current){let i=function(){r.removeEventListener("click",f.current);let n=t();e(),n||C("dismissableLayer.pointerDownOutside",c,p,{discrete:!0})};if(v(i,"handleAndDispatchPointerDownOutsideEvent"),!s(n.target)){r.removeEventListener("click",f.current),e(),l.current=!1;return}let p={originalEvent:n};u.current=!0,a.current=o&&0===n.button,d.current.clear(),o&&0===n.button?(r.removeEventListener("click",f.current),f.current=i,r.addEventListener("click",f.current,{once:!0})):i()}else r.removeEventListener("click",f.current),e();l.current=!1},"handlePointerDown"),m=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of m)r.addEventListener(e,n,!0),r.addEventListener(e,p);let g=window.setTimeout(()=>{r.addEventListener("pointerdown",h)},0);return()=>{for(let e of(window.clearTimeout(g),r.removeEventListener("pointerdown",h),r.removeEventListener("click",f.current),m))r.removeEventListener(e,n,!0),r.removeEventListener(e,p)}},[r,c,o,a,i,s]),{onPointerDownCapture:v(()=>l.current=!0,"onPointerDownCapture")}}function k(e,t=globalThis?.document){let r=h(e),o=n.useRef(!1);return n.useEffect(()=>{let e=v(e=>{e.target&&!o.current&&C("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:v(()=>o.current=!0,"onFocusCapture"),onBlurCapture:v(()=>o.current=!1,"onBlurCapture")}}function j(){let e=new CustomEvent(g);document.dispatchEvent(e)}function C(e,t,n,{discrete:r}){let o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?l(o,a):o.dispatchEvent(a)}v(E,"usePointerDownOutside"),v(k,"useFocusOutside"),v(j,"dispatchUpdate"),v(C,"handleAndDispatchCustomEvent"),e.s(["V",0,b,"y",0,w],26330)},3536,e=>{var t=e.i(71645),n=Object.defineProperty,r=(e,t)=>n(e,"name",{value:t,configurable:!0}),o=0,a=null;function i(){t.useEffect(()=>{a||(a={start:s(),end:s()});let{start:e,end:t}=a;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),o++,()=>{1===o&&(a?.start.remove(),a?.end.remove(),a=null),o=Math.max(0,o-1)}},[])}function s(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}r(function(e){return i(),e.children},"FocusGuards"),r(i,"useFocusGuards"),r(s,"createFocusGuard"),e.s(["f",0,i])},65491,e=>{var t=e.i(71645),n=e.i(20783),r=e.i(48425),o=e.i(30207),a=e.i(18050),i=Object.defineProperty,s=(e,t)=>i(e,"name",{value:t,configurable:!0}),c="focusScope.autoFocusOnMount",l="focusScope.autoFocusOnUnmount",u={bubbles:!1,cancelable:!0},d=t.forwardRef(s(function(e,i){let{loop:d=!1,trapped:f=!1,branches:p,onMountAutoFocus:h,onUnmountAutoFocus:y,...b}=e,[w,k]=t.useState(null),j=(0,o.f)(h),S=(0,o.f)(y),N=t.useRef(null),R=(0,n.f)(i,k),D=t.useRef(p);t.useEffect(()=>{D.current=p});let M=t.useCallback(e=>!!e&&(!!w?.contains(e)||!!D.current?.some(t=>t.contains(e))),[w]),P=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(f){let e=function(e){if(P.paused||!w)return;let t=e.target;M(t)?N.current=t:x(N.current,{select:!0})},t=function(e){if(P.paused||!w)return;let t=e.relatedTarget;null!==t&&(M(t)||x(N.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&x(w)};s(e,"handleFocusIn"),s(t,"handleFocusOut"),s(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(n);return w&&r.observe(w,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[f,w,P.paused,M]),t.useEffect(()=>{if(w){E.add(P);let e=document.activeElement;if(!w.contains(e)){let t=new CustomEvent(c,u);w.addEventListener(c,j),w.dispatchEvent(t),t.defaultPrevented||(m(C(g(w)),{select:!0}),document.activeElement===e&&x(w))}return()=>{w.removeEventListener(c,j);let t=w.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(l,u);w.addEventListener(l,S),w.dispatchEvent(r),r.defaultPrevented||x(e??t.body,{select:!0}),w.removeEventListener(l,S),E.remove(P)},0)}}},[w,j,S,P]);let A=t.useCallback(e=>{if(!d&&!f||P.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,o]=v(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),d&&x(o,{select:!0})):(e.preventDefault(),d&&x(r,{select:!0})):n===t&&e.preventDefault()}},[d,f,P.paused]);return(0,a.jsx)(r.V.div,{tabIndex:-1,...b,ref:R,onKeyDown:A})},"FocusScope")),f=t.createContext(null);function p({registry:e,children:t}){return e?(0,a.jsx)(f.Provider,{value:e,children:t}):t}function h(){let[e,n]=t.useState([]);return{nodes:e,registry:t.useMemo(()=>({add:s(e=>n(t=>t.includes(e)?t:[...t,e]),"add"),remove:s(e=>n(t=>t.filter(t=>t!==e)),"remove")}),[])}}function m(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(x(r,{select:t}),document.activeElement!==n)return}function v(e){let t=g(e);return[y(t,e),y(t.reverse(),e)]}function g(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function y(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):b(r,{upTo:t})))return r}function b(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function w(e){return"INPUT"===e.tagName&&"function"==typeof e.select}function x(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&w(e)&&t&&e.select()}}s(p,"FocusScopeBranchProvider"),s(h,"useFocusScopeBranchRegistry"),s(function(e){let n=t.useContext(f);t.useEffect(()=>{if(e&&n)return n.add(e),()=>n.remove(e)},[e,n])},"useFocusScopeBranch"),s(m,"focusFirst"),s(v,"getTabbableEdges"),s(g,"getTabbableCandidates"),s(y,"findVisible"),s(b,"isHidden"),s(w,"isSelectableInput"),s(x,"focus");var E=k();function k(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=j(e,t)).unshift(t)},remove(t){e=j(e,t),e[0]?.resume()}}}function j(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function C(e){return e.filter(e=>"A"!==e.tagName)}s(k,"createFocusScopesStack"),s(j,"arrayRemove"),s(C,"removeLinks"),e.s(["v",0,d,"l",0,p,"D",0,h])},10772,e=>{var t=e.i(71645),n=e.i(34620),r=Object.defineProperty,o=t[" useId ".trim().toString()]||(()=>void 0),a=0;function i(e){let[r,i]=t.useState(o());return(0,n.f)(()=>{e||i(e=>e??String(a++))},[e]),e||(r?`radix-${r}`:"")}r(i,"name",{value:"useId",configurable:!0}),e.s(["f",0,i])},74606,96626,e=>{var t=e.i(71645),n=e.i(74080),r=e.i(48425),o=e.i(34620),a=e.i(18050),i=Object.defineProperty,s=t.forwardRef(i(function(e,i){let{container:s,...c}=e,[l,u]=t.useState(!1);(0,o.f)(()=>u(!0),[]);let d=s||l&&globalThis?.document?.body;return d?n.createPortal((0,a.jsx)(r.V.div,{...c,ref:i}),d):null},"name",{value:"Portal",configurable:!0}));e.s(["f",0,s],74606);var c=Object.defineProperty,l=(e,t)=>c(e,"name",{value:t,configurable:!0});function u(e,n){return t.useReducer((e,t)=>n[e][t]??e,e)}l(u,"useStateMachine");var d=l(e=>{let{present:n,children:r}=e,o=f(n),a="function"==typeof r?r({present:o.isPresent}):t.Children.only(r),i=h(o.ref,v(a));return"function"==typeof r||o.isPresent?t.cloneElement(a,{ref:i}):null},"Presence");function f(e){let[n,r]=t.useState(),a=t.useRef(null),i=t.useRef(e),s=t.useRef("none"),c=t.useRef(void 0),[d,f]=u(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return t.useEffect(()=>{"mounted"===d?(s.current=c.current??m(a.current),c.current=void 0):s.current="none"},[d]),(0,o.f)(()=>{let t=a.current,n=i.current;if(n!==e){let r=s.current,o=m(t);e?(c.current=o,f("MOUNT")):"none"===o||t?.display==="none"?f("UNMOUNT"):n&&r!==o?f("ANIMATION_OUT"):f("UNMOUNT"),i.current=e}},[e,f]),(0,o.f)(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=l(r=>{let o=m(a.current).includes(CSS.escape(r.animationName));if(r.target===n&&o&&(f("ANIMATION_END"),!i.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},"handleAnimationEnd"),o=l(e=>{e.target===n&&(s.current=m(a.current))},"handleAnimationStart");return n.addEventListener("animationstart",o),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",o),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:t.useCallback(e=>{if(e){let t=getComputedStyle(e);a.current=t,c.current=m(t)}else a.current=null;r(e)},[])}}function p(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function h(...e){let n=t.useRef(e);return n.current=e,t.useCallback(e=>{let t=n.current,r=!1,o=t.map(t=>{let n=p(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<o.length;e++){let n=o[e];"function"==typeof n?n():p(t[e],null)}}},[])}function m(e){return e?.animationName||"none"}function v(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}l(f,"usePresence"),l(p,"setRef"),l(h,"useStableComposedRefs"),l(m,"getAnimationName"),l(v,"getElementRef"),e.s(["f",0,d],96626)},69340,e=>{var t=e.i(71645),n=e.i(34620),r=Object.defineProperty,o=t[" useEffectEvent ".trim().toString()],a=t[" useInsertionEffect ".trim().toString()];function i(e){if("function"==typeof o)return o(e);let r=t.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof a?a(()=>{r.current=e}):(0,n.f)(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}r(i,"name",{value:"useEffectEvent",configurable:!0});var s=Object.defineProperty,c=(e,t)=>s(e,"name",{value:t,configurable:!0}),l=t[" useInsertionEffect ".trim().toString()]||n.f;function u({prop:e,defaultProp:n,onChange:r=c(()=>{},"onChange"),caller:o}){let[a,i,s]=d({defaultProp:n,onChange:r}),l=void 0!==e,p=l?e:a;return[p,t.useCallback(t=>{if(l){let n=f(t)?t(e):t;n!==e&&s.current?.(n)}else i(t)},[l,e,i,s])]}function d({defaultProp:e,onChange:n}){let[r,o]=t.useState(e),a=t.useRef(r),i=t.useRef(n);return l(()=>{i.current=n},[n]),t.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,o,i]}function f(e){return"function"==typeof e}c(u,"useControllableState"),c(d,"useUncontrolledState"),c(f,"isFunction");var p=Symbol("RADIX:SYNC_STATE");c(function(e,n,r,o){let{prop:a,defaultProp:s,onChange:c,caller:l}=n,u=void 0!==a,d=i(c),f=[{...r,state:s}];o&&f.push(o);let[h,m]=t.useReducer((t,n)=>{if(n.type===p)return{...t,state:n.state};let r=e(t,n);return u&&!Object.is(r.state,t.state)&&d(r.state),r},...f),v=h.state,g=t.useRef(v);t.useEffect(()=>{g.current!==v&&(g.current=v,u||d(v))},[v,g,u]);let y=t.useMemo(()=>void 0!==a?{...h,state:a}:h,[h,a]);return t.useEffect(()=>{u&&!Object.is(a,h.state)&&m({type:p,state:a})},[a,h.state,u]),[y,m]},"useControllableStateReducer"),e.s(["f",0,u],69340)},34620,e=>{var t=e.i(71645),n=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["f",0,n])},86312,e=>{var t=new WeakMap,n=new WeakMap,r={},o=0,a=function(e){return e&&(e.host||a(e.parentNode))},i=function(e,i,s,c){var l=(Array.isArray(e)?e:[e]).map(function(e){if(i.contains(e))return e;var t=a(e);return t&&i.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",i,". Doing nothing"),null)}).filter(function(e){return!!e});r[s]||(r[s]=new WeakMap);var u=r[s],d=[],f=new Set,p=new Set(l),h=function(e){!e||f.has(e)||(f.add(e),h(e.parentNode))};l.forEach(h);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))m(e);else try{var r=e.getAttribute(c),o=null!==r&&"false"!==r,a=(t.get(e)||0)+1,i=(u.get(e)||0)+1;t.set(e,a),u.set(e,i),d.push(e),1===a&&o&&n.set(e,!0),1===i&&e.setAttribute(s,"true"),o||e.setAttribute(c,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(i),f.clear(),o++,function(){d.forEach(function(e){var r=t.get(e)-1,o=u.get(e)-1;t.set(e,r),u.set(e,o),r||(n.has(e)||e.removeAttribute(c),n.delete(e)),o||e.removeAttribute(s)}),--o||(t=new WeakMap,t=new WeakMap,n=new WeakMap,r={})}};e.s(["f",0,function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),i(r,o,n,"aria-hidden")):function(){return null}}])},75254,e=>{var t=e.i(71645);let n=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.createContext)({}),i=(0,t.forwardRef)(({color:e,size:r,strokeWidth:i,absoluteStrokeWidth:s,className:c="",children:l,iconNode:u,...d},f)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:v="currentColor",className:g=""}=(0,t.useContext)(a)??{},y=s??m?24*Number(i??h)/Number(r??p):i??h;return(0,t.createElement)("svg",{ref:f,...o,width:r??p??o.width,height:r??p??o.height,stroke:e??v,strokeWidth:y,className:n("lucide",g,c),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(d)&&{"aria-hidden":"true"},...d},[...u.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(l)?l:[l]])});e.s(["f",0,(e,o)=>{let a=(0,t.forwardRef)(({className:a,...s},c)=>(0,t.createElement)(i,{ref:c,iconNode:o,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...s}));return a.displayName=r(e),a}],75254)},45423,e=>{let t=(0,e.i(75254).f)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["f",0,t],45423)},60243,e=>{let t=(0,e.i(75254).f)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]);e.s(["f",0,t],60243)},59208,e=>{let t=(0,e.i(75254).f)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["f",0,t],59208)},97625,e=>{let t=(0,e.i(75254).f)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["f",0,t],97625)},75782,94351,e=>{var t=e.i(75254);let n=(0,t.f)("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);e.s(["f",0,n],75782);let r=(0,t.f)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["f",0,r],94351)},27025,e=>{let t=(0,e.i(75254).f)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["f",0,t],27025)},27516,10980,e=>{var t=e.i(75254);let n=(0,t.f)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["f",0,n],27516);let r=(0,t.f)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);e.s(["f",0,r],10980)},65261,e=>{let t=(0,e.i(75254).f)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["f",0,t],65261)},92161,37727,e=>{var t=e.i(75254);let n=(0,t.f)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["f",0,n],92161);let r=(0,t.f)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,r],37727)},88844,e=>{let t=(0,e.i(75254).f)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["f",0,t],88844)},31343,e=>{let t=(0,e.i(75254).f)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["f",0,t],31343)},7233,e=>{let t=(0,e.i(75254).f)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["f",0,t],7233)},39616,30325,e=>{var t=e.i(75254);let n=(0,t.f)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["f",0,n],39616);let r=(0,t.f)("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]);e.s(["f",0,r],30325)},61911,e=>{let t=(0,e.i(75254).f)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["f",0,t],61911)},85369,e=>{var t,n,r,o,a,i,s,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var u=("function"==typeof SuppressedError&&SuppressedError,e.i(71645)),d="right-scroll-bar-position",f="width-before-scroll-bar";function p(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var h="u">typeof window?u.useLayoutEffect:u.useEffect,m=new WeakMap,v=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,a={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}}).options=c({async:!0,ssr:!1},t),a),g=function(){},y=u.forwardRef(function(e,t){var n,r,o,a,i=u.useRef(null),s=u.useState({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:g}),d=s[0],f=s[1],y=e.forwardProps,b=e.children,w=e.className,x=e.removeScrollBar,E=e.enabled,k=e.shards,j=e.sideCar,C=e.noRelative,S=e.noIsolation,N=e.inert,R=e.allowPinchZoom,D=e.as,M=e.gapMode,P=l(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=(n=[i,t],r=function(e){return n.forEach(function(t){return p(t,e)})},(o=(0,u.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,a=o.facade,h(function(){var e=m.get(a);if(e){var t=new Set(e),r=new Set(n),o=a.current;t.forEach(function(e){r.has(e)||p(e,null)}),r.forEach(function(e){t.has(e)||p(e,o)})}m.set(a,n)},[n]),a),O=c(c({},P),d);return u.createElement(u.Fragment,null,E&&u.createElement(j,{sideCar:v,removeScrollBar:x,shards:k,noRelative:C,noIsolation:S,inert:N,setCallbacks:f,allowPinchZoom:!!R,lockRef:i,gapMode:M}),y?u.cloneElement(u.Children.only(b),c(c({},O),{ref:A})):u.createElement(void 0===D?"div":D,c({},O,{className:w,ref:A}),b))});y.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},y.classNames={fullWidth:f,zeroRight:d};var b=function(e){var t=e.sideCar,n=l(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return u.createElement(r,c({},n))};b.isSideCarExport=!0;var w=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x=function(){var e=w();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},E=function(){var e=x();return function(t){return e(t.styles,t.dynamic),null}},k={left:0,top:0,right:0,gap:0},j=function(e){return parseInt(e||"",10)||0},C=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[j(n),j(r),j(o)]},S=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return k;var t=C(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},N=E(),R="data-scroll-locked",D=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(R,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(d," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(f," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(d," .").concat(d," {\n right: 0 ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(R,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},M=function(){var e=parseInt(document.body.getAttribute(R)||"0",10);return isFinite(e)?e:0},P=function(){u.useEffect(function(){return document.body.setAttribute(R,(M()+1).toString()),function(){var e=M()-1;e<=0?document.body.removeAttribute(R):document.body.setAttribute(R,e.toString())}},[])},A=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;P();var a=u.useMemo(function(){return S(o)},[o]);return u.createElement(N,{styles:D(a,!t,o,n?"":"!important")})},O=!1;if("u">typeof window)try{var L=Object.defineProperty({},"passive",{get:function(){return O=!0,!0}});window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch(e){O=!1}var T=!!O&&{passive:!1},I=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},F=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),W(e,r)){var o=_(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},W=function(e,t){return"v"===e?I(t,"overflowY"):I(t,"overflowX")},_=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},$=function(e,t,n,r,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),s=i*r,c=n.target,l=t.contains(c),u=!1,d=s>0,f=0,p=0;do{if(!c)break;var h=_(e,c),m=h[0],v=h[1]-h[2]-i*m;(m||v)&&W(e,c)&&(f+=v,p+=m);var g=c.parentNode;c=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&c!==document.body||l&&(t.contains(c)||t===c))return d&&(o&&1>Math.abs(f)||!o&&s>f)?u=!0:!d&&(o&&1>Math.abs(p)||!o&&-s>p)&&(u=!0),u},U=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},V=function(e){return[e.deltaX,e.deltaY]},B=function(e){return e&&"current"in e?e.current:e},z=0,K=[];let H=(i=function(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(z++)[0],a=u.useState(E)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(B),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=u.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=U(e),s=n.current,c="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],u=e.target,d=Math.abs(c)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var h=F(d,u);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=F(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(c||l)&&(r.current=o),!o)return!0;var m=r.current||o;return $(m,t,e,"h"===m?c:l,!0)},[]),c=u.useCallback(function(e){if(K.length&&K[K.length-1]===a){var n="deltaY"in e?V(e):U(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(B).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?s(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),l=u.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=u.useCallback(function(e){n.current=U(e),r.current=void 0},[]),f=u.useCallback(function(t){l(t.type,V(t),t.target,s(t,e.lockRef.current))},[]),p=u.useCallback(function(t){l(t.type,U(t),t.target,s(t,e.lockRef.current))},[]);u.useEffect(function(){return K.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,T),document.addEventListener("touchmove",c,T),document.addEventListener("touchstart",d,T),function(){K=K.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,T),document.removeEventListener("touchmove",c,T),document.removeEventListener("touchstart",d,T)}},[]);var h=e.removeScrollBar,m=e.inert;return u.createElement(u.Fragment,null,m?u.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?u.createElement(A,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},v.useMedium(i),b);var q=u.forwardRef(function(e,t){return u.createElement(y,c({},e,{ref:t,sideCar:H}))});q.classNames=y.classNames,e.s(["f",0,q],85369)},87309,93066,e=>{var t=e.i(18050),n=e.i(71645),r=e.i(30030),o=e.i(20783),a=e.i(81140),i=e.i(10772),s=e.i(69340),c=e.i(26330),l=e.i(65491),u=e.i(74606),d=e.i(96626),f=e.i(48425),p=e.i(3536),h=e.i(34620),m=e.i(85369),v=e.i(86312),g=e.i(91918),y=Object.defineProperty,b=(e,t)=>y(e,"name",{value:t,configurable:!0}),w="Dialog",[x,E]=(0,r.f)(w),[k,j]=x(w),C=b(e=>{let{__scopeDialog:r,children:o,open:a,defaultOpen:c,onOpenChange:u,modal:d=!0}=e,f=n.useRef(null),p=n.useRef(null),{nodes:h,registry:m}=(0,l.D)(),[v,g]=(0,s.f)({prop:a,defaultProp:c??!1,onChange:u,caller:w}),[y,b]=n.useState(0),[x,E]=n.useState(0);return(0,t.jsx)(k,{scope:r,triggerRef:f,contentRef:p,contentId:(0,i.f)(),titleId:(0,i.f)(),descriptionId:(0,i.f)(),titlePresent:y>0,descriptionPresent:x>0,setTitleCount:b,setDescriptionCount:E,open:v,onOpenChange:g,onOpenToggle:n.useCallback(()=>g(e=>!e),[g]),modal:d,branchNodes:h,branchRegistry:m,children:o})},"Dialog"),S=n.forwardRef(b(function(e,n){let{__scopeDialog:r,...i}=e,s=j("DialogTrigger",r),c=(0,o.f)(n,s.triggerRef);return(0,t.jsx)(f.V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":z(s.open),...i,ref:c,onClick:(0,a.f)(e.onClick,s.onOpenToggle)})},"DialogTrigger")),N="DialogPortal",[R,D]=x(N,{forceMount:void 0}),M=b(e=>{let{__scopeDialog:r,forceMount:o,children:a,container:i}=e,s=j(N,r);return(0,t.jsx)(R,{scope:r,forceMount:o,children:n.Children.map(a,e=>(0,t.jsx)(d.f,{present:o||s.open,children:(0,t.jsx)(u.f,{asChild:!0,container:i,children:e})}))})},"DialogPortal"),P="DialogOverlay",A=n.forwardRef(b(function(e,n){let r=D(P,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,i=j(P,e.__scopeDialog);return i.modal?(0,t.jsx)(d.f,{present:o||i.open,children:(0,t.jsx)(L,{...a,ref:n})}):null},"DialogOverlay")),O=(0,g.B)("DialogOverlay.RemoveScroll"),L=n.forwardRef(b(function(e,r){let{__scopeDialog:a,...i}=e,s=j(P,a),l=(0,c.y)(),u=(0,o.f)(r,l);return(0,t.jsx)(m.f,{as:O,allowPinchZoom:!0,shards:n.useMemo(()=>[s.contentRef,...s.branchNodes.map(e=>({current:e}))],[s.contentRef,s.branchNodes]),children:(0,t.jsx)(f.V.div,{"data-state":z(s.open),...i,ref:u,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),T="DialogContent",I=n.forwardRef(b(function(e,n){let r=D(T,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,i=j(T,e.__scopeDialog);return(0,t.jsx)(d.f,{present:o||i.open,children:i.modal?(0,t.jsx)(F,{...a,ref:n}):(0,t.jsx)(W,{...a,ref:n})})},"DialogContent")),F=n.forwardRef(b(function(e,r){let i=j(T,e.__scopeDialog),s=n.useRef(null),c=(0,o.f)(r,i.contentRef,s);return n.useEffect(()=>{let e=s.current;if(e)return(0,v.f)(e)},[]),(0,t.jsx)(_,{...e,ref:c,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:(0,a.f)(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:(0,a.f)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,a.f)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),W=n.forwardRef(b(function(e,r){let o=j(T,e.__scopeDialog),a=n.useRef(!1),i=n.useRef(!1);return(0,t.jsx)(_,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||o.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let n=t.target;o.triggerRef.current?.contains(n)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})},"DialogContentNonModal")),_=n.forwardRef(b(function(e,n){let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,"aria-describedby":s,children:u,...d}=e,f=j(T,r);return(0,p.f)(),(0,t.jsx)(l.l,{registry:f.branchRegistry,children:(0,t.jsx)(l.v,{asChild:!0,loop:!0,trapped:o,branches:f.branchNodes,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,t.jsx)(c.V,{role:"dialog",id:f.contentId,"aria-labelledby":f.titlePresent?f.titleId:void 0,"aria-describedby":f.descriptionPresent?B(s,f.descriptionId):s,"data-state":z(f.open),...d,ref:n,deferPointerDownOutside:!0,onDismiss:()=>f.onOpenChange(!1),children:u})})})},"DialogContentImpl")),$=n.forwardRef(b(function(e,n){let{__scopeDialog:r,...o}=e,a=j("DialogTitle",r),{setTitleCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(f.V.h2,{id:a.titleId,...o,ref:n})},"DialogTitle")),U=n.forwardRef(b(function(e,n){let{__scopeDialog:r,...o}=e,a=j("DialogDescription",r),{setDescriptionCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(f.V.p,{id:a.descriptionId,...o,ref:n})},"DialogDescription")),V=n.forwardRef(b(function(e,n){let{__scopeDialog:r,...o}=e,i=j("DialogClose",r);return(0,t.jsx)(f.V.button,{type:"button",...o,ref:n,onClick:(0,a.f)(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function B(...e){let t=new Set;for(let n of e)if("string"==typeof n)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(" "):void 0}function z(e){return e?"open":"closed"}b(B,"concatAriaDescribedby"),b(z,"getState");var K=Object.defineProperty,H=(e,t)=>K(e,"name",{value:t,configurable:!0}),[q,Y]=(0,r.f)("AlertDialog",[E]),X=E(),Z=H(e=>{let{__scopeAlertDialog:n,...r}=e,o=X(n);return(0,t.jsx)(C,{...o,...r,modal:!0})},"AlertDialog");n.forwardRef(H(function(e,n){let{__scopeAlertDialog:r,...o}=e,a=X(r);return(0,t.jsx)(S,{...a,...o,ref:n})},"AlertDialogTrigger"));var G=H(e=>{let{__scopeAlertDialog:n,...r}=e,o=X(n);return(0,t.jsx)(M,{...o,...r})},"AlertDialogPortal"),J=n.forwardRef(H(function(e,n){let{__scopeAlertDialog:r,...o}=e,a=X(r);return(0,t.jsx)(A,{...a,...o,ref:n})},"AlertDialogOverlay")),[Q,ee]=q("AlertDialogContent"),et=n.forwardRef(H(function(e,r){let{__scopeAlertDialog:i,children:s,...c}=e,l=X(i),u=n.useRef(null),d=(0,o.f)(r,u),f=n.useRef(null);return(0,t.jsx)(Q,{scope:i,cancelRef:f,children:(0,t.jsx)(I,{role:"alertdialog",...l,...c,ref:d,onOpenAutoFocus:(0,a.f)(c.onOpenAutoFocus,e=>{e.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:s})})},"AlertDialogContent")),en=n.forwardRef(H(function(e,n){let{__scopeAlertDialog:r,...o}=e,a=X(r);return(0,t.jsx)($,{...a,...o,ref:n})},"AlertDialogTitle")),er=n.forwardRef(H(function(e,n){let{__scopeAlertDialog:r,...o}=e,a=X(r);return(0,t.jsx)(U,{...a,...o,ref:n})},"AlertDialogDescription")),eo=n.forwardRef(H(function(e,n){let{__scopeAlertDialog:r,...o}=e,a=X(r);return(0,t.jsx)(V,{...a,...o,ref:n})},"AlertDialogAction")),ea=n.forwardRef(H(function(e,n){let{__scopeAlertDialog:r,...a}=e,{cancelRef:i}=ee("AlertDialogCancel",r),s=X(r),c=(0,o.f)(n,i);return(0,t.jsx)(V,{...s,...a,ref:c})},"AlertDialogCancel")),ei=e.i(39689);let es=(0,n.forwardRef)(({className:e,...n},r)=>(0,t.jsx)(J,{className:(0,ei.f)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));es.displayName="AlertDialogOverlay";let ec=(0,n.forwardRef)(({className:e,...n},r)=>(0,t.jsxs)(G,{children:[(0,t.jsx)(es,{}),(0,t.jsx)(et,{ref:r,className:(0,ei.f)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 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 sm:rounded-lg",e),...n})]}));ec.displayName="AlertDialogContent";let el=({className:e,...n})=>(0,t.jsx)("div",{className:(0,ei.f)("flex flex-col space-y-2 text-center sm:text-left",e),...n}),eu=({className:e,...n})=>(0,t.jsx)("div",{className:(0,ei.f)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n}),ed=(0,n.forwardRef)(({className:e,...n},r)=>(0,t.jsx)(en,{ref:r,className:(0,ei.f)("text-lg font-semibold",e),...n}));ed.displayName="AlertDialogTitle";let ef=(0,n.forwardRef)(({className:e,...n},r)=>(0,t.jsx)(er,{ref:r,className:(0,ei.f)("text-sm text-muted-foreground",e),...n}));ef.displayName="AlertDialogDescription";let ep=(0,n.forwardRef)(({className:e,...n},r)=>(0,t.jsx)(eo,{ref:r,className:(0,ei.f)("inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground shadow transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",e),...n}));ep.displayName="AlertDialogAction";let eh=(0,n.forwardRef)(({className:e,...n},r)=>(0,t.jsx)(ea,{ref:r,className:(0,ei.f)("secondary inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-4 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",e),...n}));eh.displayName="AlertDialogCancel";let em={title:"Discard unsaved changes?",description:"You have changes that have not been saved. Keep editing to save them.",actionLabel:"Discard changes",cancelLabel:"Keep editing"},ev=(0,n.createContext)(()=>Promise.resolve(!1));function eg(){return(0,n.useContext)(ev)}e.s(["$",0,function({children:e}){let[r,o]=(0,n.useState)(!1),[a,i]=(0,n.useState)(em),s=(0,n.useRef)(void 0);(0,n.useEffect)(()=>()=>{s.current?.(!1)},[]);let c=(0,n.useCallback)((e=em)=>s.current?Promise.resolve(!1):new Promise(t=>{i(e),s.current=t,o(!0)}),[]),l=e=>{s.current?.(e),s.current=void 0,o(!1)};return(0,t.jsxs)(ev,{value:c,children:[e,(0,t.jsx)(Z,{open:r,onOpenChange:e=>{e||l(!1)},children:(0,t.jsxs)(ec,{children:[(0,t.jsxs)(el,{children:[(0,t.jsx)(ed,{children:a.title}),(0,t.jsx)(ef,{children:a.description})]}),(0,t.jsxs)(eu,{children:[(0,t.jsx)(eh,{onClick:()=>{l(!1)},children:a.cancelLabel??"Cancel"}),(0,t.jsx)(ep,{onClick:()=>{l(!0)},children:a.actionLabel})]})]})})]})},"h",0,eg],87309);var ey=e.i(18566);function eb(){let e=Reflect.get(globalThis,"navigation");if(null===e||"object"!=typeof e)return;let t=Reflect.get(e,"currentEntry");return null!==t&&"object"==typeof t?t:void 0}function ew(){let e=eb(),t=e?Reflect.get(e,"key"):void 0;return"string"==typeof t?t:void 0}function ex(e){let t=eb(),n=Reflect.get(globalThis,"navigation");if(e&&null!==n&&"object"==typeof n){let r=Reflect.get(n,"entries");if("function"==typeof r){let o=Reflect.apply(r,n,[]);if(Array.isArray(o)){let n=o.find(t=>null!==t&&"object"==typeof t&&Reflect.get(t,"key")===e);null!==n&&"object"==typeof n&&(t=n)}}}let r=t?Reflect.get(t,"index"):void 0;return"number"==typeof r?r:void 0}e.s(["f",0,function(e){let t=(0,ey.useRouter)(),r=eg(),o=(0,n.useRef)(e);(0,n.useEffect)(()=>{o.current=e},[e]);let a=(0,n.useCallback)(async e=>{e===`${location.pathname}${location.search}`||(!o.current||await r())&&t.push(e)},[t,r]);return(0,n.useEffect)(()=>{let e=ex(),n=ew(),a=location.href,i=history.state,s="idle",c=0,l=()=>{e=ex(),n=ew(),a=location.href,i=history.state},u=e=>{let t=Reflect.get(e,"navigationType");("push"===t||"replace"===t)&&l()},d=u=>{if("allowing"===s){s="idle",l();return}if("restoring"===s){u.stopImmediatePropagation(),s="idle",r().then(e=>{e&&(s="allowing",history.go(c))});return}if(!o.current)return void l();u.stopImmediatePropagation();let d=ex(),f=n?ex(n):e;if(void 0!==f&&void 0!==d&&d!==f){c=d-f,s="restoring",history.go(-c);return}let p=`${location.pathname}${location.search}`;history.pushState(i,"",a),r().then(e=>{e&&t.push(p)})},f=Reflect.get(globalThis,"navigation");return f instanceof EventTarget&&f.addEventListener("currententrychange",u),addEventListener("popstate",d,{capture:!0}),()=>{removeEventListener("popstate",d,{capture:!0}),f instanceof EventTarget&&f.removeEventListener("currententrychange",u)}},[t,r]),{navigateTo:a}}],93066)},69212,e=>{var t=e.i(71645),n=e.i(74080);let r=(0,t.createContext)(null);e.s(["K",0,function({children:e}){let o=(0,t.useContext)(r);return o?(0,n.createPortal)(e,o):null},"q",0,r])},94591,e=>{var t=e.i(45423),n=e.i(27516),r=e.i(10980),o=e.i(27025),a=e.i(60243),i=e.i(59208),s=e.i(97625),c=e.i(75782),l=e.i(94351),u=e.i(65261),d=e.i(88844),f=e.i(31343),p=e.i(39616),h=e.i(30325),m=e.i(61911);let v=[{id:"project",label:"Project",items:[{id:"work",description:"Build the actions and access available to your connected agent.",label:"Overview",href:"/projects/",icon:o.f},{id:"actions",description:"Build, version and run reusable workflows.",label:"Actions",href:"/actions/",icon:s.f},{id:"connections",description:"Connect an external agent to this project's tools over MCP.",label:"Connect MCP",href:"/connections/",icon:a.f},{id:"plugins",description:"Extend the tools available to this project's actions.",label:"Plugins",href:"/plugins/",icon:d.f}]},{id:"activity",label:"Action activity",items:[{id:"runs",description:"Follow execution, review approvals and inspect results.",label:"Runs",href:"/runs/",icon:f.f},{id:"schedules",description:"Manage recurring workflows and their next run.",label:"Schedules",href:"/schedules/",icon:i.f},{id:"webhooks",description:"Register action triggers and inspect delivery health.",label:"Webhooks",href:"/webhooks/",icon:a.f},{id:"approvals",description:"Review work that needs a human decision.",label:"Approvals",href:"/approvals/",icon:t.f}]},{id:"workspace",label:"Workspace",items:[{id:"home",description:"Your workspace at a glance.",label:"Workspace home",href:"/",icon:l.f},{id:"credentials",description:"Manage encrypted provider credentials.",label:"Credentials",href:"/credentials/",icon:u.f},{id:"documents",description:"Knowledge and memory shared across your workspace.",label:"Documents & memory",href:"/documents/",icon:r.f},{id:"tables",label:"Tables",href:"/tables/",icon:h.f},{id:"artifacts",description:"Inspect and download files produced by your runs.",label:"Artifacts",href:"/artifacts/",icon:c.f},{id:"members",description:"Manage access to your workspace.",label:"People",href:"/people/",icon:m.f},{id:"audit",label:"Audit log",href:"/audit/",icon:n.f},{id:"settings",description:"Workspace access and available capabilities.",label:"Settings",href:"/settings/",icon:p.f}]}],g=v.flatMap(e=>e.items),y=g.filter(e=>["credentials","members","audit"].includes(e.id)),b=new Set(v.filter(e=>"activity"===e.id).flatMap(e=>e.items.map(e=>e.id))),w=new Set(v.filter(e=>"workspace"!==e.id).flatMap(e=>e.items.map(e=>e.id))),x=v.filter(e=>"activity"!==e.id).map(e=>({...e,items:e.items.filter(e=>y.every(t=>t.id!==e.id))}));function E(e,t,n=""){let r=function(e,t=""){let n=g.find(t=>t.id===e)?.href??"/";return t?`${n}?${new URLSearchParams({[({runs:"run",actions:"action"})[e]??"record"]:t}).toString()}`:n}(e,n);return t&&w.has(e)?`${r}${r.includes("?")?"&":"?"}${new URLSearchParams({project:t}).toString()}`:r}function k(e){let t="/"===e?"/":`${e.replace(/\/$/,"")}/`;return g.find(e=>e.href===t)?.id??"home"}e.s(["W",0,b,"H",0,function(e,t){return t.get("project")??("work"===k(e)?t.get("record"):null)},"l",0,E,"B",0,function(e,t){return b.has(e)?E("actions",t):E(w.has(e)?e:"work",t)},"t",0,w,"i",0,y,"J",0,x,"n",0,g,"d",0,k])},94757,e=>{e.s(["WorkspaceLayout",()=>k,"useWorkspace",()=>x],94757);var t=e.i(18050),n=e.i(73656),r=e.i(71645),o=e.i(18566),a=e.i(76046),i=e.i(95813),s=e.i(15080),c=e.i(87309),l=e.i(93066),u=e.i(19455),d=e.i(92161),f=e.i(37727),p=e.i(2716),h=e.i(94591),m=e.i(75016),v=e.i(69212),g=e.i(7233);function y({onNavigate:e}){let{projects:n,selected:r,switchProject:o,canManage:a}=x();return(0,t.jsxs)("div",{className:"border-b border-slate-200 px-4 py-4",children:[(0,t.jsx)("label",{htmlFor:"workspace-project",className:"mb-2! text-xs text-slate-500",children:"Project"}),(0,t.jsxs)("select",{id:"workspace-project",value:r,disabled:0===n.length,className:"min-w-0 text-sm",onChange:e=>{o(e.target.value)},children:[r?null:(0,t.jsx)("option",{value:"",children:0===n.length?"No projects yet":"Choose a project"}),n.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]}),a?(0,t.jsxs)(m.f,{className:"mt-3 flex items-center gap-2 text-xs font-medium",href:"/projects/?new=1",onNavigate:e,children:[(0,t.jsx)(g.f,{size:14,"aria-hidden":"true"}),"New project"]}):null]})}function b({tab:e,children:n}){let{projects:o,selected:a,workspace:i}=x(),s=o.find(e=>e.id===a),[c,l]=(0,r.useState)(!1),[g,w]=(0,r.useState)(null),E=(0,r.useRef)(null),k=(0,r.useRef)(null),j=(0,r.useRef)(null),C=(0,r.useRef)(!1),S=()=>{l(!1)};(0,r.useEffect)(()=>{if(!c){C.current&&k.current?.focus(),C.current=!1;return}C.current=!0,E.current?.focus();let e=e=>{if(e.defaultPrevented||("Escape"===e.key&&l(!1),"Tab"!==e.key))return;let t=j.current?.querySelectorAll("a[href], button:not([disabled]), select:not([disabled])"),n=t?.[0],r=t?.[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),n?.focus())};return addEventListener("keydown",e),()=>{removeEventListener("keydown",e)}},[c]),(0,r.useEffect)(()=>{let e=matchMedia("(min-width: 768px)"),t=()=>{e.matches&&l(!1)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[]);let N=h.n.find(t=>t.id===e),R=N?.label??"Projects";return(0,t.jsxs)("div",{className:"shell",children:[c?(0,t.jsx)("div",{className:"drawer-backdrop","aria-hidden":"true",onClick:S}):void 0,(0,t.jsxs)("aside",{ref:j,id:"workspace-navigation",className:`workspace-sidebar ${c?"is-open":""}`,"aria-label":"Workspace navigation",role:c?"dialog":void 0,"aria-modal":!!c||void 0,children:[(0,t.jsxs)("div",{className:"workspace-brand",children:[(0,t.jsx)(p.f,{className:"bot-mark"}),(0,t.jsx)("span",{children:"OrgSDK"}),(0,t.jsx)(u.f,{ref:E,className:"mobile-only icon-button secondary",onClick:S,"aria-label":"Close navigation",children:(0,t.jsx)(f.X,{size:18})})]}),(0,t.jsx)(y,{onNavigate:S}),(0,t.jsx)("nav",{className:"flex flex-col","aria-label":"Project and workspace",children:h.J.map(n=>(0,t.jsxs)("div",{className:`nav-group ${"workspace"===n.id?"mt-auto pt-6":""}`,children:[(0,t.jsx)("p",{className:"eyebrow",children:n.label}),n.items.map(n=>{let r=e===n.id||"actions"===n.id&&h.W.has(e)||"settings"===n.id&&h.i.some(t=>t.id===e),o=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.icon,{size:17,"aria-hidden":"true"}),n.label]});return(0,t.jsx)(m.f,{href:(0,h.l)(n.id,a),"aria-current":r?"page":void 0,className:r?"active":"",onNavigate:S,children:o},n.id)})]},n.id))}),(0,t.jsxs)("div",{className:"workspace-label",children:[(0,t.jsx)("span",{className:"workspace-avatar",children:i.slice(0,1).toUpperCase()}),(0,t.jsxs)("span",{children:[i,(0,t.jsx)("small",{children:"Local workspace"})]})]})]}),(0,t.jsxs)("div",{className:"workspace-body",inert:c,children:[(0,t.jsxs)("header",{className:`workspace-header ${"actions"===e?"workspace-action-header":""}`,children:[(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(u.f,{ref:k,className:"mobile-only icon-button secondary","aria-label":"Open navigation","aria-expanded":c,"aria-controls":"workspace-navigation",onClick:()=>{l(!0)},children:(0,t.jsx)(d.f,{size:18})}),"actions"===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"muted max-w-52 truncate",children:h.t.has(e)?s?.name??"Project":i}),(0,t.jsx)("span",{className:"breadcrumb-divider",children:"/"}),(0,t.jsx)("strong",{children:R})]})]}),"actions"===e?(0,t.jsx)("div",{className:"workspace-page-header",ref:w}):(0,t.jsx)("span",{className:"badge",children:i})]}),(0,t.jsxs)("main",{className:"actions"===e?"action-page":void 0,children:[(0,t.jsxs)("div",{className:"actions"===e?"sr-only":"page-heading",children:[(0,t.jsx)("h1",{children:R}),(0,t.jsx)("p",{children:N?.description})]}),(0,t.jsx)(v.q,{value:g,children:n})]})]})]})}let w=(0,r.createContext)(void 0);function x(){let e=(0,r.useContext)(w);if(!e)throw Error("Workspace screen must be inside the workspace layout.");return e}function E({children:e}){let[c,u]=(0,r.useState)(!1),[d,f]=(0,r.useState)([]),[p,m]=(0,r.useState)(""),[v,g]=(0,r.useState)("Your workspace"),[y,x]=(0,r.useState)(),[k,j]=(0,r.useState)("member"),[C,S]=(0,r.useState)(!1),[N,R]=(0,r.useState)(""),[D,M]=(0,r.useState)(""),[P,A]=(0,r.useState)({key:"",message:""}),O=(0,o.usePathname)(),L=(0,o.useSearchParams)(),{navigateTo:T}=(0,l.f)(C),I=L.get("action"),F=L.get("run"),W=I?`action:${I}`:"",_=F?`run:${F}`:W,$=(0,h.H)(O,L),U=c&&!_&&!!$&&d.every(e=>e.id!==$),V=U?"":p,B=P.key===_?P.message:"",z=U?"This project is unavailable. Choose another project from the sidebar.":B,K=(0,r.useCallback)(async e=>{let[t,r]=await Promise.all([(0,s.q)(e??new AbortController().signal),n.U.workspace.current.query(void 0,e?{signal:e}:void 0)]);e?.aborted||(f(t),m(e=>{for(let n of[e,(0,h.H)(location.pathname,new URLSearchParams(location.search)),function(e){try{return sessionStorage.getItem(`orgsdk:project:v1:${String(e)}`)}catch{return null}}(r.workspace.id)])if(n&&t.some(e=>e.id===n))return n;return t[0]?.id??""}),g(r.workspace.name),x(r.workspace.id),j(r.role??"member"))},[]);return((0,r.useEffect)(()=>{if(V&&void 0!==y)try{sessionStorage.setItem(`orgsdk:project:v1:${String(y)}`,V)}catch{}},[V,y]),(0,r.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let t=await (0,n.m)(e.signal);if(e.signal.aborted)return;if(!t.is_authenticated)return void(0,a.y)();await K(e.signal),e.signal.throwIfAborted(),u(!0)}catch(t){e.signal.aborted||R((0,i.f)(t))}})(),()=>{e.abort()}},[K]),(0,r.useEffect)(()=>{if(!c)return;let e=new AbortController,t=t=>{if(!e.signal.aborted){if(!t||d.every(e=>e.id!==t))throw Error("This record's project is unavailable. Choose another project from the sidebar.");m(t)}};return I||F?(async()=>{try{if(F){let r=await n.U.runs.get.query({id:F},{signal:e.signal});t(r.project)}else if(I){let r=await n.U.actions.get.query({id:I},{signal:e.signal});t(r.project)}e.signal.aborted||A({key:_,message:""})}catch(t){e.signal.aborted||A({key:_,message:(0,i.f)(t)})}finally{e.signal.aborted||M(_)}})():$&&!U&&t($),()=>{e.abort()}},[d,$,U,I,F,_,c]),c)?(0,t.jsx)(w,{value:{projects:d,selected:V,setSelected:m,switchProject:async e=>{d.every(t=>t.id!==e)||await T((0,h.B)((0,h.d)(O),e))},workspace:v,role:k,canManage:"owner"===k||"admin"===k,isDirty:C,setDirty:S,refresh:K,goTo:e=>{T((0,h.l)(e,V))},openRun:e=>{T((0,h.l)("runs",V,e))},navigateTo:T},children:(0,t.jsxs)(b,{tab:(0,h.d)(O),children:[N||z?(0,t.jsx)("div",{className:"error",role:"alert",children:N||z}):void 0,z||_&&_!==D?void 0:e,_&&_!==D?(0,t.jsx)("p",{role:"status",children:"Loading project…"}):void 0]})}):(0,t.jsx)("main",{className:"p-6",children:N?(0,t.jsx)("p",{className:"error",role:"alert",children:N}):(0,t.jsx)("p",{role:"status",children:"Loading your session…"})})}function k({children:e}){return(0,t.jsx)(c.$,{children:(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)("p",{role:"status",children:"Loading workspace…"}),children:(0,t.jsx)(E,{children:e})})})}},75016,e=>{e.s(["f",()=>o]);var t=e.i(18050),n=e.i(22016),r=e.i(94757);function o({href:e,children:a,onNavigate:i,...s}){let{isDirty:c,navigateTo:l}=(0,r.useWorkspace)();return(0,t.jsx)(n.default,{href:e,...s,onNavigate:t=>{i?.(t),c&&(t.preventDefault(),l(e))},children:a})}}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71689,e=>{let t=(0,e.i(75254).f)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["f",0,t],71689)},95468,e=>{let t=(0,e.i(75254).f)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["f",0,t],95468)},27612,e=>{let t=(0,e.i(75254).f)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["f",0,t],27612)},13581,90629,e=>{var t=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,r]=(0,t.useState)(),[n,l]=(0,t.useState)(""),[c,d]=(0,t.useState)(!0),o=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{o.current?.abort();let t=new AbortController;o.current=t;try{let a=await e(t.signal);if(t.signal.aborted||!u.current)return;r(a),l("")}catch(e){!t.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!t.signal.aborted&&u.current&&d(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,i]),{data:s,error:n,isLoading:c,refresh:h}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:t}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],90629)},16118,e=>{var t=e.i(18050),a=e.i(59208);let i=(0,e.i(75254).f)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var s=e.i(31343),r=e.i(27612),n=e.i(71645),l=e.i(40192),c=e.i(54105),d=e.i(19877),o=e.i(73656),u=e.i(95813),h=e.i(13581),f=e.i(15080),p=e.i(19455),x=e.i(90350),m=e.i(31084),b=e.i(24687),v=e.i(90629),j=e.i(87309),g=e.i(10505),y=e.i(94757),w=e.i(75016),k=e.i(59037);async function S(e){let[t,a]=await Promise.all([o.U.schedules.list.query(void 0,{signal:e}),(0,f.t)(e)]);return{schedules:t.results,actions:a}}function N({actionId:e=""}){let{selected:f,setDirty:C}=(0,y.useWorkspace)(),z=(0,h.f)(S),A=(z.data?.actions??[]).filter(t=>t.project===f&&(!e||t.id===e)),$=new Set(A.map(e=>e.id)),U=(z.data?.schedules??[]).filter(e=>$.has(e.action)),R=(0,j.h)(),[L,M]=(0,n.useState)(""),[P,T]=(0,n.useState)(e),[E,_]=(0,n.useState)(x.A),[q,O]=(0,n.useState)("{}"),[D,F]=(0,n.useState)({action:e,cron:x.A,inputs:"{}"}),I=P!==D.action||E!==D.cron||q!==D.inputs;(0,k.f)(I,C);let B=()=>{M(""),T(e),_(x.A),O("{}"),F({action:e,cron:x.A,inputs:"{}"})},[W,H]=(0,n.useState)(!1),[J,V]=(0,n.useState)(""),[K,Z]=(0,n.useState)(""),G=async e=>{H(!0),V(""),Z("");try{await e(),await z.refresh()}catch(e){V((0,u.f)(e))}finally{H(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(a.f,{size:18})," Scheduled work"]}),(0,t.jsxs)("span",{className:"badge",children:[U.length," schedules"]})]}),(0,t.jsx)(v.f,{...z}),z.isLoading||z.error||0!==U.length?void 0:(0,t.jsx)("p",{children:"No schedules yet. Choose an action below to automate it."}),U.map(e=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(w.f,{href:`/actions/?${new URLSearchParams({project:f,action:e.action}).toString()}`,children:(0,t.jsx)("strong",{children:A.find(t=>t.id===e.action)?.name??"Action"})}),(0,t.jsxs)("small",{children:[(0,x.E)(e.cron)," ·"," ",e.enabled?`Next ${new Date(e.next_run_at).toLocaleString(void 0,{timeZone:"UTC"})+" UTC"}`:"Paused"]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsxs)(p.f,{variant:"outline",size:"sm",disabled:W,onClick:()=>{G(async()=>{await o.U.schedules.update.mutate({id:e.id,enabled:!e.enabled}),Z(e.enabled?"Schedule paused.":"Schedule resumed.")})},children:[e.enabled?(0,t.jsx)(i,{size:13}):(0,t.jsx)(s.f,{size:13}),e.enabled?"Pause":"Resume"]}),(0,t.jsx)(p.f,{variant:"ghost",size:"sm",onClick:()=>{(async()=>{if(I&&!await R())return;let t={action:e.action,cron:e.cron,inputs:(0,g.A)(e.inputs)};M(e.id),T(t.action),_(t.cron),O(t.inputs),F(t)})()},children:"Edit"}),(0,t.jsx)(p.f,{variant:"ghost",size:"icon","aria-label":"Delete schedule",disabled:W,onClick:()=>{G(async()=>{await R({title:"Delete this schedule?",description:"Future scheduled runs will stop. Existing runs and their results will be retained.",actionLabel:"Delete schedule"})&&(await o.U.schedules.delete.mutate({id:e.id}),Z("Schedule deleted."))})},children:(0,t.jsx)(r.f,{size:14})})]})]},e.id))]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:L?"Edit schedule":"Create a schedule"}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),G(async()=>{let e={action:P,cron:E,inputs:l.z.record(c.z.string(),d.z.json()).parse(JSON.parse(q))};L?await o.U.schedules.update.mutate({id:L,...e}):await o.U.schedules.create.mutate(e),Z("Schedule saved."),B()})},children:[(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("label",{children:["Action",(0,t.jsxs)("select",{required:!0,value:P,disabled:W,onChange:e=>{T(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"Choose an action"}),A.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})}),(0,t.jsx)(m.f,{value:E,onChange:_,disabled:W}),(0,t.jsxs)("label",{children:["Scheduled inputs (JSON)",(0,t.jsx)(b.f,{className:"code",rows:3,value:q,disabled:W,onChange:e=>{O(e.target.value)}})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(p.f,{type:"submit",disabled:W||!$.has(P),children:"Save schedule"}),L?(0,t.jsx)(p.f,{variant:"outline",type:"button",onClick:()=>{(async()=>{(!I||await R())&&B()})()},children:"Cancel editing"}):void 0]})]})]}),J?(0,t.jsx)("p",{className:"error",role:"alert",children:J}):void 0,K?(0,t.jsx)("p",{className:"notice",role:"status",children:K}):void 0]})}var C=e.i(59140);e.s(["default",0,function(){let{selected:e}=(0,y.useWorkspace)();return(0,t.jsx)(C.c,{current:"schedules",children:a=>(0,t.jsx)(N,{actionId:a},`${e}:${a}`)})}],16118)},93479,e=>{var t=e.i(18050),a=e.i(71645),i=e.i(39689);let s=a.forwardRef(({className:e,type:a,...s},r)=>(0,t.jsx)("input",{type:a,className:(0,i.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...s}));s.displayName="Input",e.s(["f",0,s])},24687,e=>{var t=e.i(18050),a=e.i(71645),i=e.i(39689);let s=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("textarea",{className:(0,i.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...a}));s.displayName="Textarea",e.s(["f",0,s])},59140,e=>{var t=e.i(18050),a=e.i(71645),i=e.i(18566),s=e.i(71689),r=e.i(73656),n=e.i(13581),l=e.i(94757),c=e.i(75016),d=e.i(90629);let o=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:a}){let i=e.project,r=new URLSearchParams({project:i,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(c.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:i}).toString()}`,children:[(0,t.jsx)(s.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:o.map(e=>(0,t.jsx)(c.f,{href:`${e.path}?${r.toString()}`,"aria-current":a===e.id?"page":void 0,className:a===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function h({project:e,actionId:i,current:s,children:l}){let o=(0,a.useCallback)(async t=>{if(!i)return;let a=await r.U.actions.get.query({id:i},{signal:t});if(a.project!==e)throw Error("This action is not available in the selected project.");return a},[i,e]),f=(0,n.f)(o);return i&&(f.isLoading||f.error||f.data?.id!==i)?(0,t.jsx)(d.f,{...f}):(0,t.jsxs)(t.Fragment,{children:[f.data?(0,t.jsx)(u,{action:f.data,current:s}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(c.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(i)]})}e.s(["F",0,u,"c",0,function({current:e,children:a}){let{selected:s}=(0,l.useWorkspace)(),r=(0,i.useSearchParams)().get("action")??"";return(0,t.jsx)(h,{project:s,actionId:r,current:e,children:a},`${s}:${r}`)}])},10505,21218,e=>{var t=e.i(18050),a=e.i(75254);let i=(0,a.f)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["f",0,i],21218);var s=e.i(95468);let r=(0,a.f)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]),n=(0,a.f)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),l=(0,a.f)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function c(e){return({chat:"Chat task",code:"Code execution",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let a={succeeded:s.f,waiting_approval:n,running:i,queued:r,failed:l,cancelled:l,interrupted:l}[e]??r;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(a,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let a=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${a} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let a=Reflect.get(e,t);if("string"==typeof a)return a}return""})(e.inputs,"message").slice(0,70)}`:`${a} \xb7 ${c(e.operation)}`},"T",0,c],10505)},59037,e=>{var t=e.i(71645);e.s(["f",0,function(e,a){(0,t.useEffect)(()=>{a(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),a(!1)}},[e,a])}])}])})();
|