@alook/app 0.0.99 → 0.0.101
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/bundled/email-worker/index.js +18 -6
- package/bundled/web/.open-next/.build/durable-objects/queue.js +5 -5
- package/bundled/web/.open-next/assets/BUILD_ID +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0-grycx2tn0o4.js → 0.9oyh86wn1fd.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0.wmvlzzu_8e0.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{0tvembqw.e82g.js → 01yvpio9kzobl.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/04-19vra169mj.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{16_j-kl72ldc4.js → 07ju9-jia-17m.js} +2 -2
- package/bundled/web/.open-next/assets/_next/static/chunks/0ecg50a33jlsr.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0hyshwdxcbwbq.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{0dhez0ocwb1sn.js → 0r775oyts5ozc.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{07mm2xbk2l5.8.js → 0rt6~o9u6663h.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0fuk9p58--.z9.js → 0uayv05d6mntr.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0x2fen2lqx6j3.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/10rvnbe-gw6a7.js +3 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/10ux4o4nkn.sj.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/171xnnpyz4y3d.css +1 -0
- package/bundled/web/.open-next/cache/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/_global-error.cache +1 -1
- package/bundled/web/.open-next/cache/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/_not-found.cache +1 -1
- package/bundled/web/.open-next/cache/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/privacy.cache +1 -1
- package/bundled/web/.open-next/cache/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/sitemap.xml.cache +1 -1
- package/bundled/web/.open-next/cloudflare/cache-assets-manifest.sql +1 -1
- package/bundled/web/.open-next/cloudflare/init.js +1 -1
- package/bundled/web/.open-next/dynamodb-provider/dynamodb-cache.json +1 -1
- package/bundled/web/.open-next/middleware/handler.mjs +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/BUILD_ID +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/build-manifest.json +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/prerender-manifest.json +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/invite/[token]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/studio/new/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/activity/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/[convId]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/email/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/files/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/meetings/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/new/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/calendar/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/flags/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/help/email-setup/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/home/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/issues/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/runtimes/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/settings/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/[traceId]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/unread/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/workspaces/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(auth)/sign-in/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/[id]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__11hxiyn._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0i4u2y-._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0iw.~u_._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0j3ag~p._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0j_~vur._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0mk4o2l._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0ow_nxn._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0s~hhx-._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{[root-of-the-server]__0r7fdlr._.js → [root-of-the-server]__05g0phj._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__07of89~._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +4 -4
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_02.xen~._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0.q_x36._.js → _06a692f._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0_.06ux._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0a8f3fa._.js → _0c-ma68._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0u~xh2v._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0xhx.5_._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0wtsjmd._.js → _0~twhbc._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_12yhe5_._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_13__3im._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_0stugv_._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_0~23g-y._.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_calendar_page_tsx_01geiyd._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_home_home-page_tsx_0to84tv._.js +1 -37
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_lib_api_ts_0uf2r1p._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-build-manifest.js +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-manifest.json +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.json +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs +55 -91
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +123 -123
- package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +3 -3
- package/bundled/web/migrations/0034_agent_skill_daemon_id.sql +9 -0
- package/bundled/web/wrangler.toml +1 -1
- package/bundled/ws-do/index.js +18 -6
- package/dist/cli/index.js +193 -233
- package/dist/cli/session-runner.js +17 -4
- package/dist/index.js +43 -19
- package/package.json +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/01mduafj8.t03.js +0 -37
- package/bundled/web/.open-next/assets/_next/static/chunks/051._099hez6h.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/09m73_4eia.5a.css +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/09tp3dnnhv6a0.js +0 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/0aw17s_pfw2u1.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0slwbsjlzqxt6.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0svwh_nhh5rxk.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/14byu.0wtroj8.js +0 -1
- /package/bundled/web/.open-next/assets/_next/static/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/_buildManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/_clientMiddlewareManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/_ssgManifest.js +0 -0
- /package/bundled/web/.open-next/cache/{GDrv2wl3f0uavEhQh6kAN → P6QBCMByXCOFPEUBvhHF6}/robots.txt.cache +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,222862,636557,e=>{"use strict";class t extends Error{status;details;constructor(e,t,n){super(e),this.name="ApiError",this.status=t,this.details=n}get isNetworkError(){return 0===this.status}get isRateLimit(){return 429===this.status}get isUnauthorized(){return 401===this.status}}function n(e,t){return"validation error"===e&&t?.length?function(e){let[t,...n]=e.split(":"),a=n.join(":").trim();if(!a)return e;let i=t.trim(),r=i.trim().replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),o=a.replace(/^required$/i,"is required"),s=o.toLowerCase().replace(/[_-]+/g," "),l=i.toLowerCase().replace(/[_-]+/g," ");return l&&s.startsWith(`${l} `)&&(o=o.slice(i.length).trimStart()),r?`${r} ${o}`:o}(t[0]):e}async function a(e,a){let i;try{i=await fetch(""+e,{...a,credentials:"include",headers:{"Content-Type":"application/json",...a?.headers}})}catch(e){if(e instanceof TypeError)throw new t("Unable to connect — check your network",0);throw e}if(401===i.status)throw window.location.href="/sign-in",new t("Unauthorized",401);if(!i.ok){let e,a;try{let t=await i.json();e=t.error,a=t.details}catch{}if(429===i.status)throw new t("Please wait a moment before trying again",429);if(i.status>=500)throw new t(n(e,a)||"Something went wrong — please try again",i.status,a);throw new t(n(e,a)||"Something went wrong",i.status,a)}if(204!==i.status)return i.json()}function i(e,t){let n=new URLSearchParams({workspace_id:e,...t});return`?${n.toString()}`}e.s(["ApiError",0,t],636557);let r=async(e,n,r,o)=>{let s;if(!o||0===o.length)return a(`/api/conversations/${e}/messages${i(r)}`,{method:"POST",body:JSON.stringify({content:n})});let l=new FormData;for(let e of(l.append("content",n),o))l.append("file",e);try{s=await fetch(`/api/conversations/${e}/messages${i(r)}`,{method:"POST",credentials:"include",body:l})}catch(e){if(e instanceof TypeError)throw new t("Unable to connect — check your network",0);throw e}if(401===s.status)throw window.location.href="/sign-in",new t("Unauthorized",401);if(!s.ok){let e,n;try{let t=await s.json();e=t.error,n=t.details}catch{}if(429===s.status)throw new t("Please wait a moment before trying again",429);if(s.status>=500)throw new t(e||"Something went wrong — please try again",s.status,n);throw new t(e||"Something went wrong",s.status,n)}return s.json()},o=async(e,n,r,o)=>{let s;if(!o||0===o.length)return a(`/api/conversations/${e}/buffered-messages${i(r)}`,{method:"POST",body:JSON.stringify({content:n})});let l=new FormData;for(let e of(l.append("content",n),o))l.append("file",e);try{s=await fetch(`/api/conversations/${e}/buffered-messages${i(r)}`,{method:"POST",credentials:"include",body:l})}catch(e){if(e instanceof TypeError)throw new t("Unable to connect — check your network",0);throw e}if(401===s.status)throw window.location.href="/sign-in",new t("Unauthorized",401);if(!s.ok){let e,n;try{let t=await s.json();e=t.error,n=t.details}catch{}if(429===s.status)throw new t(e||"Maximum follow-ups reached",429);if(s.status>=500)throw new t(e||"Something went wrong — please try again",s.status,n);throw new t(e||"Something went wrong",s.status,n)}return s.json()},s=async(e,t)=>{let n=new URLSearchParams({workspace_id:t}),a=await fetch(`/api/email/${e}/body?${n}`,{credentials:"include"});if(!a.ok)return{content:"(body not available)",isHtml:!1};let i=a.headers.get("Content-Type")??"";return{content:await a.text(),isHtml:i.includes("text/html")}},l=async(e,n)=>{let a=new FormData;a.append("file",e);let r=await fetch(`/api/email/upload${i(n)}`,{method:"POST",credentials:"include",body:a});if(!r.ok)throw new t(await r.text().catch(()=>"Upload failed"),r.status);return r.json()},d=async(e,n)=>{let r;if(!n.files||0===n.files.length)return a(`/api/issues${i(e)}`,{method:"POST",body:JSON.stringify({agent_id:n.agent_id,title:n.title,description:n.description})});let o=new FormData;for(let e of(n.agent_id&&o.append("agent_id",n.agent_id),o.append("title",n.title),o.append("description",n.description??""),n.files))o.append("file",e);try{r=await fetch(`/api/issues${i(e)}`,{method:"POST",credentials:"include",body:o})}catch(e){if(e instanceof TypeError)throw new t("Unable to connect — check your network",0);throw e}if(401===r.status)throw window.location.href="/sign-in",new t("Unauthorized",401);if(!r.ok){let e,n;try{let t=await r.json();e=t.error,n=t.details}catch{}if(429===r.status)throw new t("Please wait a moment before trying again",429);if(r.status>=500)throw new t(e||"Something went wrong — please try again",r.status,n);throw new t(e||"Something went wrong",r.status,n)}return r.json()},u=async(e,t)=>{let n=new URLSearchParams({workspace_id:t}),a=await fetch(`/api/artifacts/${e}/content?${n}`,{credentials:"include"});return a.ok?a.text():"(content not available)"};e.s(["acceptInvite",0,e=>a(`/api/invite/${e}`,{method:"POST"}),"addWhitelistEmail",0,(e,t,n)=>a(`/api/agents/${e}/whitelist${i(n)}`,{method:"POST",body:JSON.stringify({email:t})}),"approveMeeting",0,(e,t,n)=>a(`/api/agents/${e}/meetings/${t}/approve${i(n)}`,{method:"POST"}),"cancelActiveTask",0,(e,t)=>a(`/api/conversations/${e}/active-task${i(t)}`,{method:"DELETE"}),"chatInit",0,(e,t,n)=>a(`/api/agents/${e}/chat-init${i(t)}`,{method:"POST",body:JSON.stringify({...n?{channel:n}:{}})}),"checkFreshness",0,(e,t)=>{let n={};return e.conversationId&&(n.conversation_id=e.conversationId),e.agentId&&(n.agent_id=e.agentId),e.channel&&(n.channel=e.channel),a(`/api/conversations/check-fresh${i(t,n)}`)},"conversationInit",0,(e,t,n)=>{let r={};return n?.newestMessageId&&(r.newest_message_id=n.newestMessageId),a(`/api/conversations/${e}/init${i(t,r)}`)},"createAgent",0,(e,t)=>a(`/api/agents${i(t)}`,{method:"POST",body:JSON.stringify(e)}),"createAgentLink",0,(e,t)=>a(`/api/agent-links${i(t)}`,{method:"POST",body:JSON.stringify(e)}),"createBufferedMessage",0,o,"createCalendarEvent",0,(e,t)=>a(`/api/calendar${i(t)}`,{method:"POST",body:JSON.stringify(e)}),"createChannelApi",0,(e,t)=>a(`/api/channels${i(e)}`,{method:"POST",body:JSON.stringify({name:t})}),"createConversation",0,(e,t,n)=>a(`/api/conversations${i(t)}`,{method:"POST",body:JSON.stringify({agent_id:e,...n?{channel:n}:{}})}),"createEmailAccount",0,(e,t,n)=>a(`/api/agents/${e}/email-accounts${i(n)}`,{method:"POST",body:JSON.stringify(t)}),"createInvite",0,e=>a(`/api/workspaces/${e}/invites${i(e)}`,{method:"POST"}),"createIssue",0,d,"createMachineToken",0,(e,t)=>a(`/api/machine-tokens${t?i(t):""}`,{method:"POST",body:JSON.stringify({name:e||"default"})}),"createMeeting",0,(e,t,n)=>a(`/api/agents/${e}/meetings${i(t)}`,{method:"POST",body:JSON.stringify(n)}),"deleteAgent",0,(e,t)=>a(`/api/agents/${e}${i(t)}`,{method:"DELETE"}),"deleteAgentLink",0,(e,t)=>a(`/api/agent-links/${e}${i(t)}`,{method:"DELETE"}),"deleteBufferedMessage",0,(e,t,n)=>a(`/api/conversations/${e}/buffered-messages/${t}${i(n)}`,{method:"DELETE"}),"deleteCalendarEvent",0,(e,t,n)=>a(`/api/calendar/${e}${i(t)}`,{method:"DELETE",...n&&n.scope?{headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}:{}}),"deleteChannelApi",0,(e,t)=>a(`/api/channels/${e}${i(t)}`,{method:"DELETE"}),"deleteEmail",0,(e,t)=>a(`/api/email/${e}${i(t)}`,{method:"DELETE"}),"deleteEmailAccount",0,(e,t,n)=>a(`/api/agents/${e}/email-accounts/${t}${i(n)}`,{method:"DELETE"}),"deleteIssue",0,(e,t)=>a(`/api/issues/${t}${i(e)}`,{method:"DELETE"}),"deleteMachine",0,(e,t)=>a(`/api/runtimes/machine${i(t,{daemon_id:e})}`,{method:"DELETE"}),"deleteMeeting",0,(e,t,n)=>a(`/api/agents/${e}/meetings/${t}${i(n)}`,{method:"DELETE"}),"deleteWorkspace",0,(e,t)=>a(`/api/workspaces/${e}${i(e)}`,{method:"DELETE",body:JSON.stringify({confirm_name:t})}),"fetchLatestCliVersion",0,()=>a("/api/cli/latest-version"),"fetchModelOptions",0,()=>a("/api/config/model-options"),"flagMessage",0,(e,t)=>a(`/api/flags${i(e)}`,{method:"POST",body:JSON.stringify({messageId:t})}),"getActiveTask",0,(e,t)=>a(`/api/conversations/${e}/active-task${i(t)}`),"getAgentSkills",0,(e,t)=>a(`/api/agents/${e}/skills${i(t)}`),"getArtifactContent",0,u,"getCalendarEvent",0,(e,t)=>a(`/api/calendar/${e}${i(t)}`),"getEmail",0,(e,t)=>a(`/api/email/${e}${i(t)}`),"getEmailBody",0,s,"getEmailThread",0,(e,t)=>a(`/api/email/${e}/thread${i(t)}`),"getFlaggedCount",0,e=>a(`/api/flags/count${i(e)}`),"getInboxCount",0,(e,t)=>{let n={};return t?.types?.length&&(n.types=t.types.join(",")),a(`/api/inbox/count${i(e,n)}`)},"getInviteInfo",0,e=>a(`/api/invite/${e}`),"getIssue",0,(e,t)=>a(`/api/issues/${t}${i(e)}`),"getMemberMe",0,e=>a(`/api/members/me${i(e)}`),"getMinCliVersion",0,()=>a("/api/config/min-version"),"getTask",0,(e,t)=>a(`/api/tasks/${e}${i(t)}`),"getTaskMessages",0,(e,t,n)=>a(`/api/tasks/${e}/messages${i(t,n?{since:String(n)}:void 0)}`),"getTrace",0,(e,t)=>a(`/api/traces/${e}${i(t)}`),"getWorkspaceOverview",0,e=>a(`/api/workspaces/${e}/overview${i(e)}`),"grantAgentAccess",0,(e,t,n)=>a(`/api/agents/${t}/access${i(e)}`,{method:"POST",body:JSON.stringify({user_id:n})}),"listAgentAccess",0,(e,t)=>a(`/api/agents/${t}/access${i(e)}`),"listAgentActiveTaskCounts",0,e=>a(`/api/agents/active-task-counts${i(e)}`),"listAgentActivity",0,(e,t,n)=>{let r={};return n?.limit&&(r.limit=String(n.limit)),n?.before&&(r.before=n.before),n?.beforeId&&(r.before_id=n.beforeId),n?.status&&(r.status=n.status),n?.type&&(r.type=n.type),a(`/api/agents/${e}/activity${i(t,r)}`)},"listAgentLinks",0,e=>a(`/api/agent-links${i(e)}`),"listAgentPins",0,e=>a(`/api/agents/pins${i(e)}`),"listAgents",0,e=>a(`/api/agents${i(e)}`),"listArtifacts",0,(e,t)=>a(`/api/artifacts${i(t,{conversation_id:e})}`),"listBufferedMessages",0,(e,t)=>a(`/api/conversations/${e}/buffered-messages${i(t)}`),"listCalendarEvents",0,(e,t)=>{let n={};return t?.agentId&&(n.agentId=t.agentId),t?.from&&(n.from=t.from),t?.to&&(n.to=t.to),a(`/api/calendar${i(e,n)}`)},"listChannels",0,e=>a(`/api/channels${i(e)}`),"listEmailAccounts",0,(e,t)=>a(`/api/agents/${e}/email-accounts${i(t)}`),"listEmails",0,(e,t,n,r)=>a(`/api/email${i(t,{agentId:e,...n?{folder:n}:{},...r?{address:r}:{}})}`),"listFlaggedItems",0,(e,t)=>{let n={};return t?.limit&&(n.limit=String(t.limit)),t?.before&&(n.before=t.before),a(`/api/flags${i(e,n)}`)},"listFlaggedMessageIds",0,(e,t)=>a(`/api/flags${i(e,{conversation_id:t,ids_only:"true"})}`),"listInboxItems",0,(e,t)=>{let n={};return t?.limit&&(n.limit=String(t.limit)),t?.before&&(n.before=t.before),t?.types?.length&&(n.types=t.types.join(",")),a(`/api/inbox${i(e,n)}`)},"listInvites",0,e=>a(`/api/workspaces/${e}/invites${i(e)}`),"listIssues",0,(e,t)=>{let n={};return t?.agentId&&(n.agentId=t.agentId),t?.status&&(n.status=t.status),t?.terminal!==void 0&&(n.terminal=String(t.terminal)),a(`/api/issues${i(e,n)}`)},"listMeetings",0,(e,t)=>a(`/api/agents/${e}/meetings${i(t)}`),"listMembers",0,e=>a(`/api/workspaces/${e}/members${i(e)}`),"listMessages",0,(e,t,n)=>{let r={};return n?.limit&&(r.limit=String(n.limit)),n?.before&&(r.before=n.before),n?.beforeId&&(r.before_id=n.beforeId),a(`/api/conversations/${e}/messages${i(t,r)}`)},"listMessagesAroundTask",0,(e,t,n)=>a(`/api/conversations/${e}/messages${i(t,{around_task:n})}`),"listPreviousConversations",0,(e,t,n)=>{let r={exclude:n.exclude,before:n.before};return n.channel&&(r.channel=n.channel),n.limit&&(r.limit=String(n.limit)),a(`/api/agents/${e}/conversations${i(t,r)}`)},"listRuntimes",0,e=>a(`/api/runtimes${i(e)}`),"listTraces",0,(e,t)=>{let n={};return t?.limit&&(n.limit=String(t.limit)),t?.before&&(n.before=t.before),t?.status&&(n.status=t.status),t?.multiAgent&&(n.multiAgent="true"),t?.agentId&&(n.agentId=t.agentId),t?.channel&&(n.channel=t.channel),a(`/api/traces${i(e,n)}`)},"listWhitelist",0,(e,t)=>a(`/api/agents/${e}/whitelist${i(t)}`),"listWorkspaceActiveTasks",0,e=>a(`/api/agents/active-tasks${i(e)}`),"listWorkspaces",0,()=>a("/api/workspaces"),"markAllInboxRead",0,e=>a(`/api/inbox/read-all${i(e)}`,{method:"POST"}),"markInboxRead",0,(e,t)=>a(`/api/inbox/read${i(t)}`,{method:"POST",body:JSON.stringify({conversationId:e})}),"pinAgent",0,(e,t)=>a(`/api/agents/${t}/pin${i(e)}`,{method:"POST"}),"removeMember",0,(e,t)=>a(`/api/workspaces/${e}/members/${t}${i(e)}`,{method:"DELETE"}),"removeWhitelistEmail",0,(e,t,n)=>a(`/api/agents/${e}/whitelist/${t}${i(n)}`,{method:"DELETE"}),"renameChannelApi",0,(e,t,n)=>a(`/api/channels/${e}${i(t)}`,{method:"PATCH",body:JSON.stringify({name:n})}),"reorderAgentPins",0,(e,t)=>a(`/api/agents/pins/reorder${i(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"reorderChannelsApi",0,(e,t)=>a(`/api/channels/reorder${i(e)}`,{method:"PUT",body:JSON.stringify({ordered_channel_ids:t})}),"reorderUnpinnedAgents",0,(e,t)=>a(`/api/agents/sidebar/reorder${i(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"requestWorkspaceBrowse",0,(e,t,n,r)=>a(`/api/agents/${e}/workspace/browse${i(t)}`,{method:"POST",body:JSON.stringify({request_type:n,path:r})}),"retryTask",0,(e,t)=>a(`/api/tasks/${e}/retry${i(t)}`,{method:"POST"}),"revokeAgentAccess",0,(e,t,n,r=!1)=>a(`/api/agents/${t}/access/${n}${i(e)}${r?"&remove_whitelist=true":""}`,{method:"DELETE"}),"revokeInvite",0,(e,t)=>a(`/api/workspaces/${e}/invites/${t}${i(e)}`,{method:"DELETE"}),"sendEmail",0,(e,t,n,r,o,s,l,d)=>a(`/api/email/send${i(o)}`,{method:"POST",body:JSON.stringify({agentId:e,to:t,subject:n,htmlBody:r,attachments:s,...l,customAccountId:d})}),"sendMessage",0,r,"stopMeeting",0,(e,t,n)=>a(`/api/agents/${e}/meetings/${t}/stop${i(n)}`,{method:"POST"}),"syncEmailAccount",0,(e,t,n)=>a(`/api/agents/${e}/email-accounts/${t}/sync${i(n)}`,{method:"POST"}),"triggerRuntimeRescan",0,(e,t)=>a(`/api/runtimes/${e}/rescan${i(t)}`,{method:"POST"}),"triggerRuntimeUpdate",0,(e,t)=>a(`/api/runtimes/${e}/update${i(t)}`,{method:"POST"}),"unflagMessage",0,(e,t)=>a(`/api/flags/${t}${i(e)}`,{method:"DELETE"}),"unpinAgent",0,(e,t)=>a(`/api/agents/${t}/pin${i(e)}`,{method:"DELETE"}),"updateAgent",0,(e,t,n)=>a(`/api/agents/${e}${i(n)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateAgentLink",0,(e,t,n)=>a(`/api/agent-links/${e}${i(n)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateCalendarEvent",0,(e,t,n)=>a(`/api/calendar/${e}${i(n)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateEmailStatus",0,(e,t,n)=>a(`/api/email/${e}${i(t)}`,{method:"PATCH",body:JSON.stringify({status:n})}),"updateIssue",0,(e,t,n)=>a(`/api/issues/${t}${i(e)}`,{method:"PATCH",body:JSON.stringify(n)}),"updateMemberMe",0,(e,t)=>a(`/api/members/me${i(e)}`,{method:"PATCH",body:JSON.stringify({global_instruction:t})}),"updateWorkspace",0,(e,t)=>a(`/api/workspaces/${e}${i(e)}`,{method:"PATCH",body:JSON.stringify(t)}),"uploadEmailAttachment",0,l],222862)},208020,(e,t,n)=>{t.exports=e.r(170928)},406963,e=>{"use strict";var t=e.i(298699);let n=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),a=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 i={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 r=(0,t.createContext)({}),o=(0,t.forwardRef)(({color:e,size:a,strokeWidth:o,absoluteStrokeWidth:s,className:l="",children:d,iconNode:u,...c},p)=>{let{size:g=24,strokeWidth:m=2,absoluteStrokeWidth:f=!1,color:h="currentColor",className:v=""}=(0,t.useContext)(r)??{},b=s??f?24*Number(o??m)/Number(a??g):o??m;return(0,t.createElement)("svg",{ref:p,...i,width:a??g??i.width,height:a??g??i.height,stroke:e??h,strokeWidth:b,className:n("lucide",v,l),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...u.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(d)?d:[d]])});e.s(["default",0,(e,i)=>{let r=(0,t.forwardRef)(({className:r,...s},l)=>(0,t.createElement)(o,{ref:l,iconNode:i,className:n(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...s}));return r.displayName=a(e),r}],406963)},931764,536460,e=>{"use strict";e.i(459119);var t=e.i(298699),n=e.i(92615),a=e.i(673664),i=e.i(893205),r=e.i(390072),o=e.i(240003);let s=t.createContext(void 0);function l(e=!1){let n=t.useContext(s);if(void 0===n&&!e)throw Error((0,o.default)(16));return n}function d(e){return(0,n.isHTMLElement)(e)&&"BUTTON"===e.tagName}e.s(["CompositeRootContext",0,s,"useCompositeRootContext",0,l],536460),e.s(["useButton",0,function(e={}){let{disabled:n=!1,focusableWhenDisabled:o,tabIndex:s=0,native:u=!0,composite:c}=e,p=t.useRef(null),g=l(!0),m=c??void 0!==g,{props:f}=function(e){let{focusableWhenDisabled:n,disabled:a,composite:i=!1,tabIndex:r=0,isNativeButton:o}=e,s=i&&!1!==n,l=i&&!1===n;return{props:t.useMemo(()=>{let e={onKeyDown(e){a&&n&&"Tab"!==e.key&&e.preventDefault()}};return i||(e.tabIndex=r,!o&&a&&(e.tabIndex=n?r:-1)),(o&&(n||s)||!o&&a)&&(e["aria-disabled"]=a),o&&(!n||l)&&(e.disabled=a),e},[i,a,n,s,l,o,r])}}({focusableWhenDisabled:o,disabled:n,composite:m,tabIndex:s,isNativeButton:u}),h=t.useCallback(()=>{let e=p.current;d(e)&&m&&n&&void 0===f.disabled&&e.disabled&&(e.disabled=!1)},[n,f.disabled,m]);return(0,i.useIsoLayoutEffect)(h,[h]),{getButtonProps:t.useCallback((e={})=>{let{onClick:t,onMouseDown:a,onKeyUp:i,onKeyDown:o,onPointerDown:s,...l}=e;return(0,r.mergeProps)({onClick(e){n?e.preventDefault():t?.(e)},onMouseDown(e){n||a?.(e)},onKeyDown(e){var a;if(n||((0,r.makeEventPreventable)(e),o?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,s=e.currentTarget,l=d(s),c=!u&&(a=s,!!(a?.tagName==="A"&&a?.href)),p=i&&(u?l:!c),g="Enter"===e.key,f=" "===e.key,h=s.getAttribute("role"),v=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(i&&m&&f){if(e.defaultPrevented&&v)return;e.preventDefault(),c||u&&l?(s.click(),e.preventBaseUIHandler()):p&&(t?.(e),e.preventBaseUIHandler());return}p&&(!u&&(f||g)&&e.preventDefault(),!u&&g&&t?.(e))},onKeyUp(e){n||(((0,r.makeEventPreventable)(e),i?.(e),e.target===e.currentTarget&&u&&m&&d(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||u||m||" "!==e.key||t?.(e)))},onPointerDown(e){n?e.preventDefault():s?.(e)}},u?{type:"button"}:{role:"button"},f,l)},[n,f,m,u]),buttonRef:(0,a.useStableCallback)(e=>{p.current=e,h()})}}],931764)},294237,e=>{"use strict";var t=e.i(7284);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=t.clsx;e.s(["cva",0,(e,t)=>i=>{var r;if((null==t?void 0:t.variants)==null)return a(e,null==i?void 0:i.class,null==i?void 0:i.className);let{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(e=>{let t=null==i?void 0:i[e],a=null==s?void 0:s[e];if(null===t)return null;let r=n(t)||n(a);return o[e][r]}),d=i&&Object.entries(i).reduce((e,t)=>{let[n,a]=t;return void 0===a||(e[n]=a),e},{});return a(e,l,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:a,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...s,...d}[t]):({...s,...d})[t]===n})?[...e,n,a]:e},[]),null==i?void 0:i.class,null==i?void 0:i.className)}])},186339,e=>{"use strict";var t=e.i(368075);e.i(459119);var n=e.i(298699),a=e.i(931764),i=e.i(863764);let r=n.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,focusableWhenDisabled:s=!1,nativeButton:l=!0,style:d,...u}=e,{getButtonProps:c,buttonRef:p}=(0,a.useButton)({disabled:o,focusableWhenDisabled:s,native:l});return(0,i.useRenderElement)("button",e,{state:{disabled:o},ref:[t,p],props:[u,c]})});var o=e.i(294237),s=e.i(613349);let l=(0,o.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:n="default",size:a="default",...i}){return(0,t.jsx)(r,{"data-slot":"button",className:(0,s.cn)(l({variant:n,size:a,className:e})),...i})},"buttonVariants",0,l],186339)},55916,e=>{"use strict";e.s([],580637),e.i(580637),e.i(459119);var t,n,a,i=e.i(298699),r=e.i(240003);let o=i.createContext(!1),s=i.createContext(void 0);function l(e){let t=i.useContext(s);if(!1===e&&void 0===t)throw Error((0,r.default)(27));return t}var d=e.i(863764),u=e.i(620965),c=e.i(620972);let p={...u.popupStateMapping,...c.transitionStatusMapping},g=i.forwardRef(function(e,t){let{render:n,className:a,style:i,forceRender:r=!1,...o}=e,{store:s}=l(),u=s.useState("open"),c=s.useState("nested"),g=s.useState("mounted"),m=s.useState("transitionStatus");return(0,d.useRenderElement)("div",e,{state:{open:u,transitionStatus:m},ref:[s.context.backdropRef,t],stateAttributesMapping:p,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:r||!c})});var m=e.i(931764),f=e.i(146770),h=e.i(271509);let v=i.forwardRef(function(e,t){let{render:n,className:a,style:i,disabled:r=!1,nativeButton:o=!0,...s}=e,{store:u}=l(),c=u.useState("open"),{getButtonProps:p,buttonRef:g}=(0,m.useButton)({disabled:r,native:o});return(0,d.useRenderElement)("button",e,{state:{disabled:r},ref:[t,g],props:[{onClick:function(e){c&&u.setOpen(!1,(0,f.createChangeEventDetails)(h.REASONS.closePress,e.nativeEvent))}},s,p]})});var b=e.i(384555);let S=i.forwardRef(function(e,t){let{render:n,className:a,style:i,id:r,...o}=e,{store:s}=l(),u=(0,b.useBaseUiId)(r);return s.useSyncedValueWithCleanup("descriptionElementId",u),(0,d.useRenderElement)("p",e,{ref:t,props:[{id:u},o]})});var y=e.i(603309);let $=((t={}).nestedDialogs="--nested-dialogs",t),w=((n={})[n.open=u.CommonPopupDataAttributes.open]="open",n[n.closed=u.CommonPopupDataAttributes.closed]="closed",n[n.startingStyle=u.CommonPopupDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=u.CommonPopupDataAttributes.endingStyle]="endingStyle",n.nested="data-nested",n.nestedDialogOpen="data-nested-dialog-open",n),E=i.createContext(void 0);function x(){let e=i.useContext(E);if(void 0===e)throw Error((0,r.default)(26));return e}var C=e.i(593053),k=e.i(58658),O=e.i(461403),P=e.i(368075);let T={...u.popupStateMapping,...c.transitionStatusMapping,nestedDialogOpen:e=>e?{[w.nestedDialogOpen]:""}:null},D=i.forwardRef(function(e,t){let{render:n,className:a,style:i,finalFocus:r,initialFocus:o,...s}=e,{store:u}=l(),c=u.useState("descriptionElementId"),p=u.useState("disablePointerDismissal"),g=u.useState("floatingRootContext"),m=u.useState("popupProps"),f=u.useState("modal"),h=u.useState("mounted"),v=u.useState("nested"),b=u.useState("nestedOpenDialogCount"),S=u.useState("open"),w=u.useState("openMethod"),E=u.useState("titleElementId"),D=u.useState("transitionStatus"),A=u.useState("role"),I=g.useState("floatingId"),R=s.id??I;x(),(0,C.useOpenChangeComplete)({open:S,ref:u.context.popupRef,onComplete(){S&&u.context.onOpenChangeComplete?.(!0)}});let N=void 0===o?function(e){return"touch"!==e||u.context.popupRef.current}:o,M=u.useStateSetter("popupElement"),_=(0,d.useRenderElement)("div",e,{state:{open:S,nested:v,transitionStatus:D,nestedDialogOpen:b>0},props:[m,{id:R,"aria-labelledby":E??void 0,"aria-describedby":c??void 0,role:A,...O.FOCUSABLE_POPUP_PROPS,hidden:!h,onKeyDown(e){k.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},style:{[$.nestedDialogs]:b}},s],ref:[t,u.context.popupRef,M],stateAttributesMapping:T});return(0,P.jsx)(y.FloatingFocusManager,{context:g,openInteractionType:w,disabled:!h,closeOnFocusOut:!p,initialFocus:N,returnFocus:r,modal:!1!==f,restoreFocus:"popup",children:_})});var A=e.i(182946),I=e.i(126041),R=e.i(450821);let N=i.forwardRef(function(e,t){let{keepMounted:n=!1,...a}=e,{store:i}=l(),r=i.useState("mounted"),o=i.useState("modal"),s=i.useState("open");return r||n?(0,P.jsx)(E.Provider,{value:n,children:(0,P.jsxs)(I.FloatingPortal,{ref:t,...a,children:[r&&!0===o&&(0,P.jsx)(R.InternalBackdrop,{ref:i.context.internalBackdropRef,inert:(0,A.inertValue)(!s)}),e.children]})}):null});var M=e.i(646951),_=e.i(627498),j=e.i(366767),U=e.i(390072),L=e.i(114733),B=e.i(444153);function J({store:e,dialogRoot:t}){let{parentContext:n,isDrawer:a}=t,r=e.useState("open"),o=e.useState("disablePointerDismissal"),s=e.useState("modal"),l=e.useState("popupElement"),d=e.useState("floatingRootContext"),[u,c]=i.useState(0),[p,g]=i.useState(0),m=0===u,f=(0,L.useDismiss)(d,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let n=(0,B.getTarget)(t);return!!m&&!o&&(!s||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||(0,B.contains)(n,l)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:m});(0,_.useScrollLock)(r&&!0===s,l),e.useContextCallback("onNestedDialogOpen",(e,t)=>{c(e),g(t)}),e.useContextCallback("onNestedDialogClose",()=>{c(0),g(0)}),i.useEffect(()=>(n?.onNestedDialogOpen&&r&&n.onNestedDialogOpen(u+1,p+ +!!a),n?.onNestedDialogClose&&!r&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&r&&n.onNestedDialogClose()}),[a,r,u,p,n]);let h=f.reference??j.EMPTY_OBJECT,v=f.trigger??j.EMPTY_OBJECT,b=i.useMemo(()=>(0,U.mergeProps)(O.FOCUSABLE_POPUP_PROPS,f.floating),[f.floating]);return(0,O.usePopupInteractionProps)(e,{activeTriggerProps:h,inactiveTriggerProps:v,popupProps:b,nestedOpenDialogCount:u,nestedOpenDrawerCount:p}),null}var z=e.i(142449),F=e.i(657140),W=e.i(441289),H=e.i(360299);let K={...W.popupStoreSelectors,modal:(0,z.createSelector)(e=>e.modal),nested:(0,z.createSelector)(e=>e.nested),nestedOpenDialogCount:(0,z.createSelector)(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:(0,z.createSelector)(e=>e.nestedOpenDrawerCount),disablePointerDismissal:(0,z.createSelector)(e=>e.disablePointerDismissal),openMethod:(0,z.createSelector)(e=>e.openMethod),descriptionElementId:(0,z.createSelector)(e=>e.descriptionElementId),titleElementId:(0,z.createSelector)(e=>e.titleElementId),viewportElement:(0,z.createSelector)(e=>e.viewportElement),role:(0,z.createSelector)(e=>e.role)};class V extends F.ReactStore{constructor(e,t,n=!1){const a=new H.PopupTriggerMap,r=function(e={}){return{...(0,W.createInitialPopupStoreState)(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);r.floatingRootContext=(0,W.createPopupFloatingRootContext)(a,t,n),super(r,{popupRef:i.createRef(),backdropRef:i.createRef(),internalBackdropRef:i.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:a,onOpenChange:void 0,onOpenChangeComplete:void 0},K)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};(0,O.setOpenTriggerState)(n,e,t.trigger),this.update(n)};static useStore(e,t){return(0,O.usePopupStore)(e,(e,n)=>new V(t,e,n),!0).store}}let q=((a={})[a.open=u.CommonPopupDataAttributes.open]="open",a[a.closed=u.CommonPopupDataAttributes.closed]="closed",a[a.startingStyle=u.CommonPopupDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=u.CommonPopupDataAttributes.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a),Y={...u.popupStateMapping,...c.transitionStatusMapping,nested:e=>e?{[q.nested]:""}:null,nestedDialogOpen:e=>e?{[q.nestedDialogOpen]:""}:null},G=i.forwardRef(function(e,t){let{render:n,className:a,style:i,children:r,...o}=e,s=x(),{store:u}=l(),c=u.useState("open"),p=u.useState("nested"),g=u.useState("transitionStatus"),m=u.useState("nestedOpenDialogCount"),f=u.useState("mounted"),h=u.useStateSetter("viewportElement");return(0,d.useRenderElement)("div",e,{enabled:s||f,state:{open:c,nested:p,transitionStatus:g,nestedDialogOpen:m>0},ref:[t,h],stateAttributesMapping:Y,props:[{role:"presentation",hidden:!f,style:{pointerEvents:c?void 0:"none"},children:r},o]})}),Z=i.forwardRef(function(e,t){let{render:n,className:a,style:i,id:r,...o}=e,{store:s}=l(),u=(0,b.useBaseUiId)(r);return s.useSyncedValueWithCleanup("titleElementId",u),(0,d.useRenderElement)("h2",e,{ref:t,props:[{id:u},o]})});var X=e.i(526728),Q=e.i(996529),ee=e.i(2663);let et=i.forwardRef(function(e,t){let{render:n,className:a,style:o,disabled:s=!1,nativeButton:c=!0,id:p,payload:g,handle:f,...h}=e,v=l(!0),S=f?.store??v?.store;if(!S)throw Error((0,r.default)(79));let y=(0,b.useBaseUiId)(p),$=S.useState("floatingRootContext"),w=S.useState("isOpenedByTrigger",y),E=S.useState("triggerPopupId",y),x=i.useRef(null),{registerTrigger:C,isMountedByThisTrigger:k}=(0,O.useTriggerDataForwarding)(y,x,S,{payload:g}),{getButtonProps:P,buttonRef:T}=(0,m.useButton)({disabled:s,native:c}),D=(0,Q.useClick)($,{enabled:null!=$}),A=(0,ee.useOpenMethodTriggerProps)(()=>S.select("open"),e=>{S.set("openMethod",e)}),I=S.useState("triggerProps",k);return(0,d.useRenderElement)("button",e,{state:{disabled:s,open:w},ref:[T,t,C,x],props:[D.reference,I,A,{[X.CLICK_TRIGGER_IDENTIFIER]:"",id:y,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":E},h,P],stateAttributesMapping:u.triggerOpenStateMapping})});class en{constructor(e){this.store=e??new V}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,f.createChangeEventDetails)(h.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,f.createChangeEventDetails)(h.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,f.createChangeEventDetails)(h.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Backdrop",0,g,"Close",0,v,"Description",0,S,"Handle",0,en,"Popup",0,D,"Portal",0,N,"Root",0,function(e){return function(e,t="dialog"){let{children:n,open:a,defaultOpen:r=!1,onOpenChange:d,onOpenChangeComplete:u,disablePointerDismissal:c=!1,modal:p=!0,actionsRef:g,handle:m,triggerId:v,defaultTriggerId:b=null}=e,S="alert-dialog"===t,y=l(!0),$={modal:!!S||p,disablePointerDismissal:S||c,nested:!!y,role:S?"alertdialog":"dialog"},w=V.useStore(m?.store,{open:r,openProp:a,activeTriggerId:b,triggerIdProp:v,...$});(0,M.useOnFirstRender)(()=>{let e=void 0===a&&!1===w.state.open&&!0===r?{open:!0,activeTriggerId:b}:null;S?w.update(e?{...$,...e}:$):e&&w.update(e)}),w.useControlledProp("openProp",a),w.useControlledProp("triggerIdProp",v),w.useSyncedValues($),w.useContextCallback("onOpenChange",d),w.useContextCallback("onOpenChangeComplete",u);let E=w.useState("open"),x=w.useState("mounted"),C=w.useState("payload"),k=function(e){let{store:t,parentContext:n,actionsRef:a,isDrawer:r}=e,o=t.useState("open");(0,O.usePopupRootSync)(t,o),(0,O.useImplicitActiveTrigger)(t);let{forceUnmount:s}=(0,O.useOpenStateTransitions)(o,t),l=i.useCallback(()=>{t.setOpen(!1,(0,f.createChangeEventDetails)(h.REASONS.imperativeAction))},[t]);return i.useImperativeHandle(a,()=>({unmount:s,close:l}),[s,l]),{parentContext:n,isDrawer:r}}({store:w,actionsRef:g,parentContext:y?.store.context,isDrawer:"drawer"===t}),T=i.useMemo(()=>({store:w}),[w]);return(0,P.jsx)(o.Provider,{value:!1,children:(0,P.jsxs)(s.Provider,{value:T,children:[(E||x)&&(0,P.jsx)(J,{store:w,dialogRoot:k}),"function"==typeof n?n({payload:C}):n]})})}(e,i.useContext(o)?"drawer":"dialog")},"Title",0,Z,"Trigger",0,et,"Viewport",0,G,"createHandle",0,function(){return new en}],301455);var ea=e.i(301455);e.s(["Dialog",0,ea],55916)},852665,e=>{"use strict";let t=(0,e.i(406963).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",0,t])},779646,49695,e=>{"use strict";var t=e.i(368075),n=e.i(55916),a=e.i(613349),i=e.i(186339),r=e.i(852665);e.s(["XIcon",()=>r.default],49695);var r=r;function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function s({className:e,...i}){return(0,t.jsx)(n.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...i})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function({...e}){return(0,t.jsx)(n.Dialog.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,children:l,showCloseButton:d=!0,...u}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(s,{forceRender:!0}),(0,t.jsxs)(n.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[l,d&&(0,t.jsxs)(n.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(i.Button,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(r.default,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...i}){return(0,t.jsx)(n.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...i})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:o,...s}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,a.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...s,children:[o,r&&(0,t.jsx)(n.Dialog.Close,{render:(0,t.jsx)(i.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2",e),...n})},"DialogTitle",0,function({className:e,...i}){return(0,t.jsx)(n.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.cn)("font-heading text-base leading-none font-medium",e),...i})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(n.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}],779646)}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|