@ai-development-environment/server 0.0.35 → 0.0.36

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.
Files changed (161) hide show
  1. package/package.json +1 -1
  2. package/standalone/.next/BUILD_ID +1 -1
  3. package/standalone/.next/build-manifest.json +3 -3
  4. package/standalone/.next/prerender-manifest.json +3 -3
  5. package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
  6. package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
  7. package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
  8. package/standalone/.next/server/app/[locale]/analytics-events/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
  10. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
  11. package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
  12. package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
  13. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  14. package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  16. package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/console-logs/page_client-reference-manifest.js +1 -1
  18. package/standalone/.next/server/app/[locale]/devices/[id]/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/devices/enroll/page_client-reference-manifest.js +1 -1
  20. package/standalone/.next/server/app/[locale]/devices/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
  22. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  24. package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
  25. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  26. package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
  28. package/standalone/.next/server/app/[locale]/provisioning-profiles/page_client-reference-manifest.js +1 -1
  29. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  30. package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
  31. package/standalone/.next/server/app/[locale]/push-notifications/page_client-reference-manifest.js +1 -1
  32. package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
  34. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  35. package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
  36. package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
  37. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  38. package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/unified-events/page_client-reference-manifest.js +1 -1
  40. package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  42. package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
  43. package/standalone/.next/server/app/_global-error.html +1 -1
  44. package/standalone/.next/server/app/_global-error.rsc +1 -1
  45. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  46. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  47. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  48. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  49. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  50. package/standalone/.next/server/app/_not-found.html +1 -1
  51. package/standalone/.next/server/app/_not-found.rsc +1 -1
  52. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  53. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  54. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  55. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  56. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  57. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  58. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v12ijp._.js +1 -1
  59. package/standalone/.next/server/chunks/ssr/_012q7w6._.js +1 -1
  60. package/standalone/.next/server/chunks/ssr/_07qmjrj._.js +1 -1
  61. package/standalone/.next/server/chunks/ssr/_0dquba3._.js +1 -1
  62. package/standalone/.next/server/chunks/ssr/_0t2jwg3._.js +1 -1
  63. package/standalone/.next/server/chunks/ssr/_1bzibio._.js +1 -1
  64. package/standalone/.next/server/chunks/ssr/_1h1k5ja._.js +1 -1
  65. package/standalone/.next/server/chunks/ssr/_1kle1nm._.js +1 -1
  66. package/standalone/.next/server/chunks/ssr/_1m50niy._.js +1 -1
  67. package/standalone/.next/server/chunks/ssr/_1pja493._.js +1 -1
  68. package/standalone/.next/server/chunks/ssr/_1y98hs-._.js +1 -1
  69. package/standalone/.next/server/chunks/ssr/_1z02bsk._.js +1 -1
  70. package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
  71. package/standalone/.next/server/chunks/ssr/src_components_build-data_build-data-page_tsx_1t2rrh0._.js +2 -2
  72. package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +1 -1
  73. package/standalone/.next/server/chunks/ssr/src_components_builds_coverage-report-page_tsx_1nhwba1._.js +1 -1
  74. package/standalone/.next/server/chunks/ssr/src_components_devices_device-detail-page_tsx_1mut_l4._.js +1 -1
  75. package/standalone/.next/server/chunks/ssr/src_components_devices_devices-page_tsx_1y45lv2._.js +1 -1
  76. package/standalone/.next/server/chunks/ssr/src_components_github_pull-request-detail-page_tsx_1etlamp._.js +1 -1
  77. package/standalone/.next/server/chunks/ssr/src_components_jira_cache-page_tsx_1znt1yl._.js +1 -1
  78. package/standalone/.next/server/chunks/ssr/src_components_jira_ticket-detail-page_tsx_0vmf8nk._.js +2 -2
  79. package/standalone/.next/server/chunks/ssr/src_components_jira_tickets-page_tsx_0_ocldp._.js +1 -1
  80. package/standalone/.next/server/chunks/ssr/src_components_push-notifications_push-notifications-page_tsx_1c_b-t4._.js +1 -1
  81. package/standalone/.next/server/chunks/ssr/src_components_signing-assets_provisioning-profiles-page_tsx_1zr20o7._.js +1 -1
  82. package/standalone/.next/server/chunks/ssr/src_components_skills_skill-sync-page_tsx_15sidhb._.js +1 -1
  83. package/standalone/.next/server/chunks/ssr/src_components_skills_skills-page_tsx_0o1nlbg._.js +1 -1
  84. package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +1 -1
  85. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  86. package/standalone/.next/server/pages/404.html +1 -1
  87. package/standalone/.next/server/pages/500.html +1 -1
  88. package/standalone/.next/server/server-reference-manifest.js +1 -1
  89. package/standalone/.next/server/server-reference-manifest.json +1 -1
  90. package/standalone/.next/static/chunks/{0rrwapb85e3vs.js → 0a8bo5bqge171.js} +1 -1
  91. package/standalone/.next/static/chunks/0bx-vj8k3jlsz.js +35 -0
  92. package/standalone/.next/static/chunks/{1z2n-kfxw0xxf.js → 0s_vkk_t0i4mg.js} +1 -1
  93. package/standalone/.next/static/chunks/12msdp4rhv6ti.js +7 -0
  94. package/standalone/.next/static/chunks/{1rvz2z_cov6ug.js → 15rske_fphtgw.js} +2 -2
  95. package/standalone/.next/static/chunks/19l74y4_uc81t.js +33 -0
  96. package/standalone/.next/static/chunks/{0elijgx6pfo7w.js → 1a5_4cpwnx9uu.js} +1 -1
  97. package/standalone/.next/static/chunks/1a9j-qydwrg8m.js +7 -0
  98. package/standalone/.next/static/chunks/1e-vykrs41myl.js +41 -0
  99. package/standalone/.next/static/chunks/1jwc4nasae27c.js +1 -0
  100. package/standalone/.next/static/chunks/1llwo8aslhpdp.js +1 -0
  101. package/standalone/.next/static/chunks/{2-k0gnjfr6ayw.js → 1nkkb5gu3-rhf.js} +1 -1
  102. package/standalone/.next/static/chunks/1oh9kzyxfy5ih.js +1 -0
  103. package/standalone/.next/static/chunks/1q87ulu5dp43f.js +1 -0
  104. package/standalone/.next/static/chunks/{2i8eu37_ggvr8.js → 1smbfkd1cb015.js} +10 -10
  105. package/standalone/.next/static/chunks/1ynnv9u7cfr4c.js +1 -0
  106. package/standalone/.next/static/chunks/1yx2no0f8qqs5.js +7 -0
  107. package/standalone/.next/static/chunks/{3kswwcsm5y95r.js → 1zw6r-idmbfgl.js} +1 -1
  108. package/standalone/.next/static/chunks/224rpxiffot1u.js +9 -0
  109. package/standalone/.next/static/chunks/24tqnzr1nzhom.js +1 -0
  110. package/standalone/.next/static/chunks/292r4qzwbnzg7.js +45 -0
  111. package/standalone/.next/static/chunks/{3zmi_6t6n2zhl.js → 29bdsmo8ketwt.js} +2 -2
  112. package/standalone/.next/static/chunks/{08n97leuqvfec.js → 29pirjk9q8gfx.js} +1 -1
  113. package/standalone/.next/static/chunks/{0gduhhe5i5fyj.js → 2bdfoatg4qo7w.js} +1 -1
  114. package/standalone/.next/static/chunks/{1mdi8gmbt3v4y.js → 2mzx47_wqfqf6.js} +1 -1
  115. package/standalone/.next/static/chunks/2rplo_7t3zrb9.js +1 -0
  116. package/standalone/.next/static/chunks/{0txd8z6bbq8sd.js → 2rv5r0dwu0nv6.js} +1 -1
  117. package/standalone/.next/static/chunks/2u51t_6-1w566.js +1 -0
  118. package/standalone/.next/static/chunks/{3fdxq7wzqx26o.js → 2xgehciyxxmdl.js} +1 -1
  119. package/standalone/.next/static/chunks/34pq01spesbci.js +1 -0
  120. package/standalone/.next/static/chunks/34pqiakzvfxgg.js +1 -0
  121. package/standalone/.next/static/chunks/{3g004cn7om3tw.js → 35hg231a8ig1t.js} +1 -1
  122. package/standalone/.next/static/chunks/36r84wnfwt4kn.css +1 -0
  123. package/standalone/.next/static/chunks/{11x96hq8bk827.js → 37dd1jthysw7j.js} +1 -1
  124. package/standalone/.next/static/chunks/{2cohukhgw3x39.js → 384f6qhpff4pn.js} +3 -3
  125. package/standalone/.next/static/chunks/3_xim7hqyyfr0.js +1 -0
  126. package/standalone/.next/static/chunks/3eumqpi7f1fek.js +30 -0
  127. package/standalone/.next/static/chunks/{1209uyjs06prv.js → 3hq055db_1oe4.js} +1 -1
  128. package/standalone/.next/static/chunks/3ns362pjxzs4s.js +3 -0
  129. package/standalone/.next/static/chunks/3ojl4tmmy52v4.js +29 -0
  130. package/standalone/.next/static/chunks/3sxc882-vifa-.js +10 -0
  131. package/standalone/.next/static/chunks/40k5mbsz_tzvi.js +1 -0
  132. package/standalone/.next/static/chunks/43pkxbd7uiq6-.js +33 -0
  133. package/standalone/.next/static/chunks/00vmfj3b0p_9v.js +0 -1
  134. package/standalone/.next/static/chunks/05qk7dn22ctyw.js +0 -33
  135. package/standalone/.next/static/chunks/08b5rziqjcmmv.js +0 -9
  136. package/standalone/.next/static/chunks/0hcrlyp4czqm4.js +0 -33
  137. package/standalone/.next/static/chunks/0kkylz4dfb-6-.css +0 -1
  138. package/standalone/.next/static/chunks/0ouxq2tjuuo5p.js +0 -1
  139. package/standalone/.next/static/chunks/0qslkhjg4g4wo.js +0 -1
  140. package/standalone/.next/static/chunks/0sgv58x3pi1lt.js +0 -1
  141. package/standalone/.next/static/chunks/1-uwntvgs-8hy.js +0 -7
  142. package/standalone/.next/static/chunks/175wjcrz57-r8.js +0 -3
  143. package/standalone/.next/static/chunks/1aymjnttvjkz8.js +0 -35
  144. package/standalone/.next/static/chunks/1p0jamt--jvn2.js +0 -1
  145. package/standalone/.next/static/chunks/1wm2l6ainzpua.js +0 -30
  146. package/standalone/.next/static/chunks/2aaudeflwvhrw.js +0 -1
  147. package/standalone/.next/static/chunks/2jj9hlwqhy5pr.js +0 -41
  148. package/standalone/.next/static/chunks/2ldet81o6fvx9.js +0 -7
  149. package/standalone/.next/static/chunks/2nnls3_0a15ot.js +0 -1
  150. package/standalone/.next/static/chunks/32ynps2o_ve-q.js +0 -10
  151. package/standalone/.next/static/chunks/3812zpxehpne1.js +0 -1
  152. package/standalone/.next/static/chunks/398-3q0cwr6rj.js +0 -29
  153. package/standalone/.next/static/chunks/3f0s63l_3ts3k.js +0 -1
  154. package/standalone/.next/static/chunks/3ognjxt-gne6-.js +0 -1
  155. package/standalone/.next/static/chunks/3q82abj2-3h1-.js +0 -1
  156. package/standalone/.next/static/chunks/3zux6x75u6-5-.js +0 -1
  157. package/standalone/.next/static/chunks/4260c5fq33ytz.js +0 -7
  158. package/standalone/.next/static/chunks/448r-ornlfrsf.js +0 -45
  159. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_buildManifest.js +0 -0
  160. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_clientMiddlewareManifest.js +0 -0
  161. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_ssgManifest.js +0 -0
@@ -1,7 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},508734,e=>{"use strict";let t=(0,e.i(456420).default)("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"}]]);e.s(["Copy",0,t],508734)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(a({variant:r}),e),...i})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===a(e)}function o(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function c(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let m=null;function h(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return m??=function(t){let r,n,a,i,{url:f,connectionParams:m,lazy:h=!0,onNonLazyError:g=console.error,lazyCloseTimeout:x=0,keepAlive:y=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:j=5,retryWait:w=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:C=p,on:S,webSocketImpl:N,generateID:k=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:E,jsonMessageReviver:T}=t;if(N){var R;if(!("function"==typeof(R=N)&&"constructor"in R&&"CLOSED"in R&&"CLOSING"in R&&"CONNECTING"in R&&"OPEN"in R))throw Error("Invalid WebSocket implementation provided");r=N}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let D=r,A=(n={},a={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},i={connecting:S?.connecting?[S.connecting]:[],opened:S?.opened?[S.opened]:[],connected:S?.connected?[S.connected]:[],ping:S?.ping?[S.ping]:[],pong:S?.pong?[S.pong]:[],message:S?.message?[a.emit,S.message]:[a.emit],closed:S?.closed?[S.closed]:[],error:S?.error?[S.error]:[]},{onMessage:a.on,on(e,t){let r=i[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...i[e]])r(...t)}});function P(e){let t=[A.on("error",r=>{t.forEach(e=>e()),e(r)}),A.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let O,I=0,$,z=!1,_=0,M=!1;async function q(){clearTimeout($);let[e,t]=await (O??(O=new Promise((e,t)=>(async()=>{let r,n;if(z){if(await w(_),!I)return O=void 0,t({code:1e3,reason:"All Subscriptions Gone"});_++}A.emit("connecting",z);let a=new D("function"==typeof f?await f():f,"graphql-transport-ws");function i(){isFinite(y)&&y>0&&(clearTimeout(n),n=setTimeout(()=>{a.readyState===D.OPEN&&(a.send(d({type:l.Ping})),A.emit("ping",!1,void 0))},y))}P(e=>{O=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>A.emit("error",e),a.onclose=e=>A.emit("closed",e),a.onopen=async()=>{try{A.emit("opened",a);let e="function"==typeof m?await m():m;if(a.readyState!==D.OPEN)return;a.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},E)),isFinite(b)&&b>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),i()}catch(e){A.emit("error",e),a.close(s.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let n=c("string"==typeof t?JSON.parse(t,T):t);if(A.emit("message",n),"ping"===n.type||"pong"===n.type){A.emit(n.type,!0,n.payload),"pong"===n.type?i():v||(a.send(d(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),A.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,A.emit("connected",a,n.payload,z),z=!1,_=0,e([a,new Promise((e,t)=>P(t))])}catch(e){a.onmessage=null,A.emit("error",e),a.close(s.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===D.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{I||(isFinite(x)&&x>0?$=setTimeout(()=>{e.readyState===D.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function L(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(M)return!1;if(p(e)&&1e3===e.code)return I>0;if(!j||_>=j||!C(e))throw e;return z=!0}function B(e,t){let r=k(e),n=!1,a=!1,i=()=>{I--,n=!0};return(async()=>{for(I++;;)try{let[o,s,c]=await q();if(n)return s();let u=A.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,n=!0,t.error(e.payload),i();return;case l.Complete:n=!0,i();return}});o.send(d({id:r,type:l.Subscribe,payload:e},E)),i=()=>{n||o.readyState!==D.OPEN||o.send(d({id:r,type:l.Complete},E)),I--,n=!0,s()},await c.finally(u);return}catch(e){if(!L(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{n||i()}}return h||(async()=>{for(I++;;)try{let[,,e]=await q();await e}catch(e){try{if(!L(e))return}catch(e){return g?.(e)}}})(),{on:A.on,subscribe:B,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=B(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(n(),{done:!0,value:void 0}),a},async dispose(){if(M=!0,O){let[e]=await O;e.close(1e3,"Normal Closure")}},terminate(){O&&A.emit("closed",new u)}}}({url:h,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),a=e.i(975157);let i=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...s}){let l=o?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,a.cn)(i({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("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(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(30030);function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=a(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():a(e[t],null)}}}}(...e),e)}var o=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var s="AlertDialog",[l,c]=(0,n.createContextScope)(s,[o.createDialogScope]),d=(0,o.createDialogScope)(),u=e=>{let{__scopeAlertDialog:r,...n}=e,a=d(r);return(0,t.jsx)(o.Root,{...a,...n,modal:!0})};u.displayName=s;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,i=d(n);return(0,t.jsx)(o.Trigger,{...i,...a,ref:r})});p.displayName="AlertDialogTrigger";var f=e=>{let{__scopeAlertDialog:r,...n}=e,a=d(r);return(0,t.jsx)(o.Portal,{...a,...n})};f.displayName="AlertDialogPortal";var m=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,i=d(n);return(0,t.jsx)(o.Overlay,{...i,...a,ref:r})});m.displayName="AlertDialogOverlay";var h="AlertDialogContent",[g,x]=l(h),y=r.forwardRef((e,n)=>{let{__scopeAlertDialog:a,children:s,...l}=e,c=d(a),u=i(n,r.useRef(null)),p=r.useRef(null);return(0,t.jsx)(g,{scope:a,cancelRef:p,children:(0,t.jsx)(o.Content,{role:"alertdialog",...c,...l,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}(l.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:s})})});y.displayName=h;var v=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,i=d(n);return(0,t.jsx)(o.Title,{...i,...a,ref:r})});v.displayName="AlertDialogTitle";var b=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,i=d(n);return(0,t.jsx)(o.Description,{...i,...a,ref:r})});b.displayName="AlertDialogDescription";var j=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,i=d(n);return(0,t.jsx)(o.Close,{...i,...a,ref:r})});j.displayName="AlertDialogAction";var w="AlertDialogCancel",C=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...a}=e,{cancelRef:s}=x(w,n),l=d(n),c=i(r,s);return(0,t.jsx)(o.Close,{...l,...a,ref:c})});C.displayName=w,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,C,"AlertDialogContent",0,y,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,f,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,p,"Cancel",0,C,"Content",0,y,"Description",0,b,"Overlay",0,m,"Portal",0,f,"Root",0,u,"Title",0,v,"Trigger",0,p,"createAlertDialogScope",0,c],691162);var S=e.i(691162),S=S,N=e.i(975157),k=e.i(519455);function E({...e}){return(0,t.jsx)(S.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(S.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(S.Portal,{"data-slot":"alert-dialog-portal",...e})}function D({className:e,...r}){return(0,t.jsx)(S.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 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),...r})}function A({className:e,size:r="default",...n}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(D,{}),(0,t.jsx)(S.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]: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),...n})]})}function P({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function O({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function I({className:e,...r}){return(0,t.jsx)(S.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function $({className:e,...r}){return(0,t.jsx)(S.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})}function z({className:e,variant:r="default",size:n="default",...a}){return(0,t.jsx)(k.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(S.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...a})})}function _({className:e,variant:r="outline",size:n="default",...a}){return(0,t.jsx)(k.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(S.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...a})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:r,description:n,onConfirm:a,onOpenChange:i,open:o,title:s,trigger:l}){return(0,t.jsxs)(E,{onOpenChange:i,open:o,children:[l&&(0,t.jsx)(T,{asChild:!0,children:l}),(0,t.jsxs)(A,{children:[(0,t.jsxs)(P,{children:[(0,t.jsx)(I,{children:s}),(0,t.jsx)($,{children:n})]}),(0,t.jsxs)(O,{children:[(0,t.jsx)(_,{children:r}),(0,t.jsx)(z,{onClick:()=>void a(),variant:"destructive",children:e})]})]})]})}],340953)},59497,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var i=e.i(30030);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var s=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var l=r[" useInsertionEffect ".trim().toString()]||s;Symbol("RADIX:SYNC_STATE");var c=e.i(999682),d=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),f=Symbol.for("react.lazy");function m(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===f&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var h=r[" use ".trim().toString()],g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var i;let o,s=(i=`Primitive.${n}`,(o=r.forwardRef((e,t)=>{var n;let o,s,{children:l,...c}=e,d=null,u=!1,f=[];m(l)&&"function"==typeof h&&(l=h(l._payload)),r.Children.forEach(l,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;m(t)&&"function"==typeof h&&(t=h(t._payload)),d=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),f.push(d?.props?.children)}else f.push(e)}),d?d=r.cloneElement(d,void 0,f):!u&&1===r.Children.count(l)&&r.isValidElement(l)&&(d=l);let g=d?(n=d,(s=(o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.ref:(s=(o=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,x=a(t,g);if(!d){if(l||0===l){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return l}let y=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(c,d.props??{});return d.type!==r.Fragment&&(y.ref=t?x:g),r.cloneElement(d,y)})).displayName=`${i}.Slot`,o),l=r.forwardRef((e,r)=>{let{asChild:a,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(a?s:n,{...i,ref:r})});return l.displayName=`Primitive.${n}`,{...e,[n]:l}},{}),x="Checkbox",[y,v]=(0,i.createContextScope)(x),[b,j]=y(x);function w(e){let{__scopeCheckbox:n,checked:a,children:i,defaultChecked:o,disabled:s,form:c,name:d,onCheckedChange:u,required:p,value:f="on",internal_do_not_use_render:m}=e,[h,g]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){let[i,o,s]=function({defaultProp:e,onChange:t}){let[n,a]=r.useState(e),i=r.useRef(n),o=r.useRef(t);return l(()=>{o.current=t},[t]),r.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,a,o]}({defaultProp:t,onChange:n}),c=void 0!==e,d=c?e:i;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,a])}return[d,r.useCallback(t=>{if(c){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else o(t)},[c,e,o,s])]}({prop:a,defaultProp:o??!1,onChange:u,caller:x}),[y,v]=r.useState(null),[j,w]=r.useState(null),C=r.useRef(!1),S=!y||!!c||!!y.closest("form"),N={checked:h,disabled:s,setChecked:g,control:y,setControl:v,name:d,form:c,value:f,hasConsumerStoppedPropagationRef:C,required:p,defaultChecked:!D(o)&&o,isFormControl:S,bubbleInput:j,setBubbleInput:w};return(0,t.jsx)(b,{scope:n,...N,children:"function"==typeof m?m(N):i})}var C="CheckboxTrigger",S=r.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...s},l)=>{let{control:c,value:d,disabled:u,checked:p,required:f,setControl:m,setChecked:h,hasConsumerStoppedPropagationRef:x,isFormControl:y,bubbleInput:v}=j(C,e),b=a(l,m),w=r.useRef(p);return r.useEffect(()=>{let e=c?.form;if(e){let t=()=>h(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[c,h]),(0,t.jsx)(g.button,{type:"button",role:"checkbox","aria-checked":D(p)?"mixed":p,"aria-required":f,"data-state":A(p),"data-disabled":u?"":void 0,disabled:u,value:d,...s,ref:b,onKeyDown:o(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:o(i,e=>{h(e=>!!D(e)||!e),v&&y&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())})})});S.displayName=C;var N=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,name:a,checked:i,defaultChecked:o,required:s,disabled:l,value:c,onCheckedChange:d,form:u,...p}=e;return(0,t.jsx)(w,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:l,required:s,onCheckedChange:d,name:a,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S,{...p,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});N.displayName=x;var k="CheckboxIndicator",E=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,forceMount:a,...i}=e,o=j(k,n);return(0,t.jsx)(u.Presence,{present:a||D(o.checked)||!0===o.checked,children:(0,t.jsx)(g.span,{"data-state":A(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})});E.displayName=k;var T="CheckboxBubbleInput",R=r.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:o,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:u,required:p,disabled:f,name:m,value:h,form:x,bubbleInput:y,setBubbleInput:v}=j(T,e),b=a(i,v),w=(0,c.usePrevious)(l),C=(0,d.useSize)(o);r.useEffect(()=>{if(!y)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!s.current;if(w!==l&&e){let r=new Event("click",{bubbles:t});y.indeterminate=D(l),e.call(y,!D(l)&&l),y.dispatchEvent(r)}},[y,w,l,s]);let S=r.useRef(!D(l)&&l);return(0,t.jsx)(g.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:p,disabled:f,name:m,value:h,form:x,...n,tabIndex:-1,ref:b,style:{...n.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function D(e){return"indeterminate"===e}function A(e){return D(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=T,e.s(["Checkbox",0,N,"CheckboxIndicator",0,E,"Indicator",0,E,"Root",0,N,"createCheckboxScope",0,v,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,w,"unstable_CheckboxTrigger",0,S,"unstable_Provider",0,w,"unstable_Trigger",0,S],388474);var P=e.i(388474),P=P,O=e.i(975157),I=e.i(593698);e.s(["Checkbox",0,function({className:e,...r}){return(0,t.jsx)(P.Root,{"data-slot":"checkbox",className:(0,O.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...r,children:(0,t.jsx)(P.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(I.CheckIcon,{})})})}],59497)},624687,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Textarea",0,function({className:e,...n}){return(0,t.jsx)("textarea",{className:(0,r.cn)("min-h-24 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",e),...n})}])},515281,e=>{"use strict";let t=(0,e.i(456420).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],515281)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var a=Symbol.for("radix.slottable"),i=Symbol.for("react.lazy");function o(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var s=r[" use ".trim().toString()],l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{var l;let c,d=(l=`Primitive.${i}`,(c=r.forwardRef((e,t)=>{var i;let c,d,{children:u,...p}=e,f=null,m=!1,h=[];o(u)&&"function"==typeof s&&(u=s(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===a){m=!0;let t="child"in e.props?e.props.child:e.props.children;o(t)&&"function"==typeof s&&(t=s(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),h.push(f?.props?.children)}else h.push(e)}),f?f=r.cloneElement(f,void 0,h):!m&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let g=f?(i=f,(d=(c=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in c&&c.isReactWarning)?i.ref:(d=(c=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in c&&c.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,x=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}(t,g);if(!f){if(u||0===u){let e,t;throw Error(m?(e=l,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=l,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let y=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(y.ref=t?x:g),r.cloneElement(f,y)})).displayName=`${l}.Slot`,c),u=r.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?d:i,{...a,ref:r})});return u.displayName=`Primitive.${i}`,{...e,[i]:u}},{}),c=r.forwardRef((e,r)=>(0,t.jsx)(l.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));c.displayName="Label",e.s(["Label",0,c,"Root",0,c],973741);var d=e.i(973741),d=d,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(d.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function i(e){let r=t.forwardRef((r,n)=>{var i;let l,f,{children:m,...h}=r,g=null,x=!1,y=[];c(m)&&"function"==typeof p&&(m=p(m._payload)),t.Children.forEach(m,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===o){x=!0;let t="child"in e.props?e.props.child:e.props.children;c(t)&&"function"==typeof p&&(t=p(t._payload)),g=s(e,t),y.push(g?.props?.children)}else y.push(e)}),g?g=t.cloneElement(g,void 0,y):!x&&1===t.Children.count(m)&&t.isValidElement(m)&&(g=m);let v=g?(i=g,(f=(l=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.ref:(f=(l=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,b=a(n,v);if(!g){if(m||0===m)throw Error(x?u(e):d(e));return m}let j=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(h,g.props??{});return g.type!==t.Fragment&&(j.ref=n?b:v),t.cloneElement(g,j)});return r.displayName=`${e}.Slot`,r}var o=Symbol.for("radix.slottable"),s=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},l=Symbol.for("react.lazy");function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===l&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),m=new WeakMap;function h(e,t){var r,n;let a,i,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,a=r.length,(o=(i=g(n))>=0?i:a+i)<0||o>=a?-1:o);return -1===s?void 0:e[s]}function g(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],m.set(this,!0)}set(e,t){return m.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),i=this.#e.length,o=g(e),s=o>=0?o:i+o,l=s<0||s>=i?-1:s;if(l===this.size||a&&l===this.size-1||-1===l)return this.set(t,r),this;let c=this.size+ +!a;o<0&&s++;let d=[...this.#e],u=!1;for(let e=s;e<c;e++)if(s===e){let i=d[e];d[e]===t&&(i=d[e+1]),a&&this.delete(t),n=this.get(i),this.set(t,r)}else{u||d[e-1]!==t||(u=!0);let r=d[u?e:e-1],a=n;n=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,n){let a=new e(this);return a.insert(t,r,n),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=h(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=h(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return h(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(...e){let[t,r]=e,n=0,a=r??this.at(0);for(let r of this)a=0===n&&1===e.length?r:Reflect.apply(t,this,[a,r,n,this]),n++;return a}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);n=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[n,a,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[o,s]=(0,r.createContextScope)(n),[l,c]=o(n,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:n}=e,a=t.useRef(null),i=t.useRef(new Map).current;return(0,f.jsx)(l,{scope:r,itemMap:i,collectionRef:a,children:n})};d.displayName=n;let u=e+"CollectionSlot",p=i(u),m=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=a(t,c(u,r).collectionRef);return(0,f.jsx)(p,{ref:i,children:n})});m.displayName=u;let h=e+"CollectionItemSlot",g="data-radix-collection-item",x=i(h),y=t.forwardRef((e,r)=>{let{scope:n,children:i,...o}=e,s=t.useRef(null),l=a(r,s),d=c(h,n);return t.useEffect(()=>(d.itemMap.set(s,{ref:s,...o}),()=>void d.itemMap.delete(s))),(0,f.jsx)(x,{...{[g]:""},ref:l,children:i})});return y.displayName=h,[{Provider:d,Slot:m,ItemSlot:y},function(r){let n=c(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}],75830);var x=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(x);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),n=e.i(964053),a=e.i(519455),i=e.i(975157);function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function s({className:e,...r}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,i.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),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:l,showCloseButton:c=!0,...d}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(s,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,i.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto 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),"data-slot":"dialog-content",...d,children:[l,c&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(a.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Description,{className:(0,i.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:o,...s}){return(0,t.jsxs)("div",{className:(0,i.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),"data-slot":"dialog-footer",...s,children:[o,r&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(a.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Title,{className:(0,i.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(n.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},630299,e=>{"use strict";let t=(0,e.i(456420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},566595,e=>{"use strict";var t=e.i(630299);e.s(["Search",()=>t.default])},825398,e=>{"use strict";let t=(0,e.i(456420).default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);e.s(["RotateCw",0,t],825398)},523950,e=>{"use strict";var t=e.i(843476),r=e.i(689664),n=e.i(716327),a=e.i(867927),i=e.i(508734),o=e.i(515281),s=e.i(77071),l=e.i(825398),c=e.i(566595);let d=(0,e.i(456420).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);var u=e.i(573474),p=e.i(747925),f=e.i(263676),m=e.i(948148),h=e.i(271645),g=e.i(340953),x=e.i(929592),y=e.i(487486),v=e.i(519455),b=e.i(515288),j=e.i(59497),w=e.i(776639),C=e.i(793479),S=e.i(110204),N=e.i(967489),k=e.i(987968),E=e.i(784774),T=e.i(624687),R=e.i(637611),D=e.i(462777);let A=()=>({name:"",url:"",transport:"STREAMABLE_HTTP",toolNamePrefix:"",headers:[]});async function P(e){let t=await e.json();if(!e.ok){let r=t&&"object"==typeof t&&"error"in t?t.error:null;throw Error("string"==typeof r?.message?r.message:`HTTP ${e.status}`)}return t}function O({draft:e,editing:r,error:n,onDraftChange:a,onOpenChange:i,onSubmit:o,open:l,saving:c}){let d=(0,m.useTranslations)("tools"),u=(0,m.useTranslations)("common"),p=(t,r)=>{a({...e,headers:e.headers.map((e,n)=>n===t?{...e,...r}:e)})};return(0,t.jsx)(w.Dialog,{onOpenChange:i,open:l,children:(0,t.jsx)(w.DialogContent,{className:"sm:max-w-2xl",children:(0,t.jsxs)("form",{className:"space-y-4",onSubmit:o,children:[(0,t.jsxs)(w.DialogHeader,{children:[(0,t.jsx)(w.DialogTitle,{children:r?d("editServerTitle"):d("addServerTitle")}),(0,t.jsx)(w.DialogDescription,{children:d("serverDialogDescription")})]}),n&&(0,t.jsx)(x.Alert,{variant:"destructive",children:(0,t.jsx)(x.AlertDescription,{children:n})}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsx)(I,{label:d("name"),children:(0,t.jsx)(C.Input,{"aria-label":d("name"),onChange:t=>a({...e,name:t.target.value}),required:!0,value:e.name})}),(0,t.jsx)(I,{label:d("transport"),children:(0,t.jsxs)(N.Select,{onValueChange:t=>a({...e,transport:t}),value:e.transport,children:[(0,t.jsx)(N.SelectTrigger,{"aria-label":d("transport"),className:"w-full",children:(0,t.jsx)(N.SelectValue,{})}),(0,t.jsxs)(N.SelectContent,{children:[(0,t.jsx)(N.SelectItem,{value:"STREAMABLE_HTTP",children:d("http")}),(0,t.jsx)(N.SelectItem,{value:"SSE",children:d("sse")})]})]})})]}),(0,t.jsx)(I,{label:d("url"),children:(0,t.jsx)(C.Input,{"aria-label":d("url"),onChange:t=>a({...e,url:t.target.value}),placeholder:"https://example.com/mcp",required:!0,type:"url",value:e.url})}),(0,t.jsxs)(I,{label:d("prefix"),children:[(0,t.jsx)(C.Input,{"aria-label":d("prefix"),className:"font-mono",onChange:t=>a({...e,toolNamePrefix:t.target.value}),placeholder:"example_",value:e.toolNamePrefix}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:d("prefixHelp")})]}),(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{children:d("headers")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:d("headersHelp")})]}),(0,t.jsxs)(v.Button,{onClick:()=>a({...e,headers:[...e.headers,{name:"",value:"",valueConfigured:!1}]}),size:"sm",type:"button",variant:"outline",children:[(0,t.jsx)(s.Plus,{})," ",d("addHeader")]})]}),0===e.headers.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:d("noHeaders")}):e.headers.map((r,n)=>(0,t.jsxs)("div",{className:"grid items-start gap-2 sm:grid-cols-[1fr_1fr_auto]",children:[(0,t.jsx)(C.Input,{"aria-label":d("headerName"),onChange:e=>p(n,{name:e.target.value}),placeholder:"Authorization",required:!0,value:r.name}),(0,t.jsx)("div",{children:(0,t.jsx)(C.Input,{"aria-label":d("headerValue"),autoComplete:"new-password",onChange:e=>p(n,{value:e.target.value}),placeholder:r.valueConfigured?d("keepHeaderValue"):d("headerValue"),required:!r.valueConfigured,type:"password",value:r.value})}),(0,t.jsx)(v.Button,{"aria-label":d("removeHeader"),onClick:()=>a({...e,headers:e.headers.filter((e,t)=>t!==n)}),size:"icon",type:"button",variant:"ghost",children:(0,t.jsx)(f.X,{})})]},r.id??n))]}),(0,t.jsxs)(w.DialogFooter,{children:[(0,t.jsx)(v.Button,{disabled:c,onClick:()=>i(!1),type:"button",variant:"outline",children:u("cancel")}),(0,t.jsxs)(v.Button,{disabled:c,type:"submit",children:[c&&(0,t.jsx)(k.Spinner,{}),d("saveServer")]})]})]})})})}function I({children:e,label:r}){return(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block",children:r}),e]})}function $({group:e}){let r=(0,m.useTranslations)("tools");return(0,t.jsxs)(b.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3 border-b p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["BUILTIN"===e.source?(0,t.jsx)(p.Wrench,{className:"size-5"}):(0,t.jsx)(d,{className:"size-5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:e.name}),e.url&&(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:e.url})]})]}),(0,t.jsx)(y.Badge,{variant:"outline",children:r("toolCount",{count:e.tools.length})})]}),e.error&&(0,t.jsx)("div",{className:"border-b p-4",children:(0,t.jsx)(x.Alert,{variant:"destructive",children:(0,t.jsx)(x.AlertDescription,{children:e.error})})}),e.tools.length>0&&(0,t.jsxs)(E.Table,{children:[(0,t.jsx)(E.TableHeader,{children:(0,t.jsxs)(E.TableRow,{children:[(0,t.jsx)(E.TableHead,{className:"w-10"}),(0,t.jsx)(E.TableHead,{children:r("tool")}),(0,t.jsx)(E.TableHead,{children:r("toolDescription")})]})}),(0,t.jsx)(E.TableBody,{children:e.tools.map(r=>(0,t.jsx)(z,{groupId:e.id,tool:r},r.name))})]})]})}function z({groupId:e,tool:r}){let i=(0,m.useTranslations)("tools"),[o,s]=(0,h.useState)(!1),l=()=>s(e=>!e);return(0,t.jsxs)(h.Fragment,{children:[(0,t.jsxs)(E.TableRow,{"aria-expanded":o,"aria-label":i(o?"collapseTool":"expandTool",{name:r.name}),className:"cursor-pointer focus-visible:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",onClick:l,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())},role:"button",tabIndex:0,children:[(0,t.jsx)(E.TableCell,{children:o?(0,t.jsx)(n.ChevronDown,{className:"size-4"}):(0,t.jsx)(a.ChevronRight,{className:"size-4"})}),(0,t.jsxs)(E.TableCell,{children:[(0,t.jsx)("p",{className:"font-mono text-xs font-medium",children:r.name}),r.title&&r.title!==r.name&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r.title})]}),(0,t.jsx)(E.TableCell,{className:"max-w-2xl whitespace-normal text-muted-foreground",children:r.description||i("noDescription")})]}),(0,t.jsx)(E.TableRow,{className:o?"bg-muted/20 hover:bg-muted/20":"hidden",children:(0,t.jsx)(E.TableCell,{colSpan:3,className:"whitespace-normal p-4",children:(0,t.jsx)(q,{groupId:e,schema:r.inputSchema,toolName:r.name})})})]})}function _(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>!!e[1]&&"object"==typeof e[1]&&!Array.isArray(e[1])))}function M(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e):[]}function q({groupId:e,schema:n,toolName:a}){let o=(0,m.useTranslations)("tools"),[s,l]=(0,h.useState)(()=>(function e(t){if("default"in t)return t.default;if("object"===t.type){let r=_(t.properties),n=new Set(M(t.required));return Object.fromEntries(Object.entries(r).flatMap(([t,r])=>{if("default"in r||n.has(t)){let n=e(r);if(void 0!==n)return[[t,n]]}return[]}))}return"boolean"!==t.type&&("string"===t.type?"":void 0)})(n)??{}),[c,d]=(0,h.useState)(!1),[u,f]=(0,h.useState)(void 0),[g,y]=(0,h.useState)(null),[b,j]=(0,h.useState)("IDLE"),w=_(n.properties),C=0===Object.keys(_(n.properties)).length&&!1!==n.additionalProperties,N=new Set(M(n.required)),E=`${e}-${a}-arguments`,T=async t=>{t.preventDefault(),d(!0),y(null),j("IDLE");try{let t=await P(await fetch("/api/tools/call",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({groupId:e,name:a,arguments:s})}));f(t.result)}catch(e){y(e instanceof Error?e.message:String(e)),f(void 0)}finally{d(!1)}},R=void 0===u?"":JSON.stringify(u,null,2),A=async()=>{try{await (0,D.copyText)(R),j("COPIED")}catch{j("FAILED")}};return(0,t.jsxs)("form",{className:"grid gap-4 lg:grid-cols-2",onSubmit:T,children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h4",{className:"text-sm font-medium",children:o("parameters")}),C?(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block",htmlFor:E,children:o("jsonArguments")}),(0,t.jsx)(B,{id:E,objectOnly:!0,onChange:e=>l(e),required:!0,value:s})]}):0===Object.keys(w).length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:o("noParameters")}):Object.entries(w).map(([e,r])=>(0,t.jsx)(L,{name:e,onChange:(e,t)=>l(r=>{let n,a,i;return a=n=structuredClone(r),e.slice(0,-1).forEach(e=>{let t=a[e];(!t||"object"!=typeof t||Array.isArray(t))&&(a[e]={}),a=a[e]}),(i=e.at(-1))&&(void 0===t?delete a[i]:a[i]=t),n}),path:[e],required:N.has(e),schema:r,value:function(e,t){let r=e;for(let e of t){if(!r||"object"!=typeof r||Array.isArray(r))return;r=r[e]}return r}(s,[e])},e)),(0,t.jsxs)(v.Button,{disabled:c,type:"submit",children:[c?(0,t.jsx)(k.Spinner,{}):(0,t.jsx)(p.Wrench,{}),o(c?"running":"run")]})]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsxs)("div",{className:"flex min-h-7 items-center justify-between gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium",children:o("response")}),void 0!==u&&(0,t.jsx)(v.Button,{"aria-label":o("COPIED"===b?"copied":"copyResponse"),onClick:()=>void A(),size:"icon-sm",title:o("COPIED"===b?"copied":"copyResponse"),type:"button",variant:"ghost",children:"COPIED"===b?(0,t.jsx)(r.Check,{}):(0,t.jsx)(i.Copy,{})})]}),"FAILED"===b&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:o("copyFailed")}),g?(0,t.jsx)(x.Alert,{variant:"destructive",children:(0,t.jsx)(x.AlertDescription,{children:g})}):void 0===u?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-4 text-sm text-muted-foreground",children:o("noResponse")}):(0,t.jsx)("pre",{className:"max-h-96 overflow-auto rounded-lg bg-muted p-3 font-mono text-xs whitespace-pre-wrap",children:R})]})]})}function L({name:e,onChange:r,path:n,required:a,schema:i,value:o}){let s,l=(0,m.useTranslations)("tools"),c="string"==typeof i.description?i.description:null,d="string"==typeof i.title&&i.title?i.title:e,u=Array.isArray(i.enum)?i.enum:null;if(u){let e=void 0===o?"__unset":JSON.stringify(o);s=(0,t.jsxs)(N.Select,{onValueChange:e=>r(n,"__unset"===e?void 0:JSON.parse(e)),value:e,children:[(0,t.jsx)(N.SelectTrigger,{className:"w-full",id:n.join("-"),children:(0,t.jsx)(N.SelectValue,{placeholder:l("selectValue")})}),(0,t.jsxs)(N.SelectContent,{children:[!a&&(0,t.jsx)(N.SelectItem,{value:"__unset",children:l("unset")}),u.map(e=>(0,t.jsx)(N.SelectItem,{value:JSON.stringify(e),children:String(e)},JSON.stringify(e)))]})]})}else if("boolean"===i.type)s=a?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)(j.Checkbox,{checked:!!o,id:n.join("-"),onCheckedChange:e=>r(n,!0===e)}),(0,t.jsx)("span",{className:"text-sm",children:l(o?"true":"false")})]}):(0,t.jsxs)(N.Select,{onValueChange:e=>r(n,"unset"===e?void 0:"true"===e),value:void 0===o?"unset":String(!!o),children:[(0,t.jsx)(N.SelectTrigger,{className:"w-full",id:n.join("-"),children:(0,t.jsx)(N.SelectValue,{})}),(0,t.jsxs)(N.SelectContent,{children:[(0,t.jsx)(N.SelectItem,{value:"unset",children:l("unset")}),(0,t.jsx)(N.SelectItem,{value:"true",children:l("true")}),(0,t.jsx)(N.SelectItem,{value:"false",children:l("false")})]})]});else if("number"===i.type||"integer"===i.type)s=(0,t.jsx)(C.Input,{id:n.join("-"),max:"number"==typeof i.maximum?i.maximum:void 0,min:"number"==typeof i.minimum?i.minimum:void 0,onChange:e=>r(n,""===e.target.value?void 0:Number(e.target.value)),required:a,step:"integer"===i.type?1:"any",type:"number",value:"number"==typeof o?o:""});else if("string"===i.type)s=(0,t.jsx)(C.Input,{id:n.join("-"),maxLength:"number"==typeof i.maxLength?i.maxLength:void 0,minLength:"number"==typeof i.minLength?i.minLength:void 0,onChange:e=>r(n,a||""!==e.target.value?e.target.value:void 0),required:a,value:"string"==typeof o?o:""});else if("object"===i.type&&Object.keys(_(i.properties)).length){let e=_(i.properties),l=new Set(M(i.required));s=(0,t.jsx)("div",{className:"space-y-3 rounded-lg border p-3",children:Object.entries(e).map(([e,i])=>(0,t.jsx)(L,{name:e,onChange:r,path:[...n,e],required:a&&l.has(e),schema:i,value:o&&"object"==typeof o&&!Array.isArray(o)?o[e]:void 0},e))})}else s=(0,t.jsx)(B,{id:n.join("-"),onChange:e=>r(n,e),required:a,value:o});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(S.Label,{className:"mb-1.5 block",htmlFor:n.join("-"),children:[d," ",a&&(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),s,c&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:c})]})}function B({id:e,objectOnly:r=!1,onChange:n,required:a,value:i}){let o=(0,m.useTranslations)("tools"),[s,l]=(0,h.useState)(()=>void 0===i?"":JSON.stringify(i,null,2));return(0,t.jsx)(T.Textarea,{id:e,className:"min-h-24 font-mono text-xs",onChange:e=>{let t=e.target.value;if(l(t),!t&&!a){e.target.setCustomValidity(""),n(void 0);return}try{let a=JSON.parse(t);if(r&&(!a||"object"!=typeof a||Array.isArray(a)))return void e.target.setCustomValidity(o("invalidJsonObject"));n(a),e.target.setCustomValidity("")}catch{e.target.setCustomValidity(o("invalidJson"))}},placeholder:r?o("jsonObjectPlaceholder"):o("jsonPlaceholder"),required:a,value:s})}e.s(["ToolsPage",0,function(){let e=(0,m.useTranslations)("tools"),r=(0,m.useTranslations)("common"),[n,a]=(0,h.useState)(""),[i,d]=(0,h.useState)([]),[p,f]=(0,h.useState)([]),[j,w]=(0,h.useState)(!0),[S,N]=(0,h.useState)(!0),[T,D]=(0,h.useState)(null),[I,z]=(0,h.useState)(!1),[_,M]=(0,h.useState)(null),[q,L]=(0,h.useState)(A),[B,V]=(0,h.useState)(!1),[H,W]=(0,h.useState)(null),F=(0,h.useCallback)(async()=>{d((await (0,R.controlPlaneRequest)("query ExternalMcpServers { externalMcpServers { id name url transport toolNamePrefix createdAt updatedAt headers { id name valueConfigured } } }")).externalMcpServers)},[]),U=(0,h.useCallback)(async()=>{N(!0);try{let e=await P(await fetch("/api/tools/catalog",{cache:"no-store"}));f(e.groups),D(null)}catch(e){D(e instanceof Error?e.message:String(e))}finally{N(!1)}},[]);(0,h.useEffect)(()=>{let e=window.setTimeout(()=>{Promise.all([F(),U()]).catch(e=>D(e instanceof Error?e.message:String(e))).finally(()=>w(!1))},0);return()=>window.clearTimeout(e)},[U,F]);let J=(0,h.useMemo)(()=>{let e=n.trim().toLocaleLowerCase();return e?p.flatMap(t=>{let r=[t.name,t.url??""].some(t=>t.toLocaleLowerCase().includes(e)),n=r?t.tools:t.tools.filter(t=>[t.name,t.title??"",t.description??""].some(t=>t.toLocaleLowerCase().includes(e)));return n.length||t.error&&r?[{...t,tools:n}]:[]}):p},[p,n]),G=async e=>{e.preventDefault(),V(!0),W(null);let t={...q,headers:q.headers.map(e=>({id:e.id??null,name:e.name,value:e.value||null}))};try{_?await (0,R.controlPlaneRequest)(`mutation UpdateExternalMcpServer($id: ID!, $input: ExternalMcpServerInput!) {
2
- updateExternalMcpServer(id: $id, input: $input) { id }
3
- }`,{id:_.id,input:t}):await (0,R.controlPlaneRequest)(`mutation CreateExternalMcpServer($input: ExternalMcpServerInput!) {
4
- createExternalMcpServer(input: $input) { id }
5
- }`,{input:t}),z(!1),await Promise.all([F(),U()])}catch(e){W(e instanceof Error?e.message:String(e))}finally{V(!1)}},X=async e=>{try{await (0,R.controlPlaneRequest)(`mutation DeleteExternalMcpServer($id: ID!) {
6
- deleteExternalMcpServer(id: $id) { id }
7
- }`,{id:e}),await Promise.all([F(),U()])}catch(e){D(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsxs)(v.Button,{onClick:()=>{M(null),L(A()),W(null),z(!0)},type:"button",children:[(0,t.jsx)(s.Plus,{}),e("addServer")]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(c.Search,{className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(C.Input,{"aria-label":e("search"),className:"pl-9",onChange:e=>a(e.target.value),placeholder:e("searchPlaceholder"),type:"search",value:n})]}),T&&(0,t.jsx)(x.Alert,{variant:"destructive",children:(0,t.jsx)(x.AlertDescription,{children:T})}),(0,t.jsxs)(b.Card,{className:"gap-0 py-0",children:[(0,t.jsx)("div",{className:"border-b p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-semibold",children:e("serversTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("serversDescription")})]})}),j?(0,t.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Spinner,{})," ",e("loadingServers")]}):0===i.length?(0,t.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:e("noServers")}):(0,t.jsxs)(E.Table,{children:[(0,t.jsx)(E.TableHeader,{children:(0,t.jsxs)(E.TableRow,{children:[(0,t.jsx)(E.TableHead,{children:e("name")}),(0,t.jsx)(E.TableHead,{children:e("url")}),(0,t.jsx)(E.TableHead,{children:e("transport")}),(0,t.jsx)(E.TableHead,{children:e("prefix")}),(0,t.jsx)(E.TableHead,{className:"text-right",children:e("actions")})]})}),(0,t.jsx)(E.TableBody,{children:i.map(n=>(0,t.jsxs)(E.TableRow,{children:[(0,t.jsx)(E.TableCell,{className:"font-medium",children:n.name}),(0,t.jsx)(E.TableCell,{className:"max-w-md truncate font-mono text-xs",children:n.url}),(0,t.jsx)(E.TableCell,{children:(0,t.jsx)(y.Badge,{variant:"outline",children:"STREAMABLE_HTTP"===n.transport?e("http"):e("sse")})}),(0,t.jsx)(E.TableCell,{className:"font-mono text-xs",children:n.toolNamePrefix||"—"}),(0,t.jsx)(E.TableCell,{children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,t.jsx)(v.Button,{"aria-label":e("editServer",{name:n.name}),onClick:()=>{M(n),L({name:n.name,url:n.url,transport:n.transport,toolNamePrefix:n.toolNamePrefix,headers:n.headers.map(e=>({id:e.id,name:e.name,value:"",valueConfigured:e.valueConfigured}))}),W(null),z(!0)},size:"icon-sm",type:"button",variant:"ghost",children:(0,t.jsx)(o.Pencil,{})}),(0,t.jsx)(g.ConfirmationDialog,{actionLabel:e("delete"),cancelLabel:r("cancel"),description:e("confirmDeleteDescription",{name:n.name}),onConfirm:()=>X(n.id),title:e("confirmDelete"),trigger:(0,t.jsx)(v.Button,{"aria-label":e("deleteServer",{name:n.name}),size:"icon-sm",type:"button",variant:"ghost",children:(0,t.jsx)(u.Trash2,{})})})]})})]},n.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-semibold",children:e("catalogTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("catalogDescription")})]}),(0,t.jsxs)(v.Button,{disabled:S,onClick:()=>void U(),type:"button",variant:"outline",children:[S?(0,t.jsx)(k.Spinner,{}):(0,t.jsx)(l.RotateCw,{}),e("refresh")]})]}),S&&0===p.length?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Spinner,{})," ",e("loadingTools")]}):0===J.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("noMatchingTools")}):J.map(e=>(0,t.jsx)($,{group:e},e.id)),(0,t.jsx)(O,{draft:q,editing:_,error:H,onDraftChange:L,onOpenChange:z,onSubmit:G,open:I,saving:B})]})}],523950)}]);
@@ -1,45 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59497,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return r.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var a=e.i(30030);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var s=r[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),f=Symbol.for("react.lazy");function m(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===f&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var h=r[" use ".trim().toString()],g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var a;let o,l=(a=`Primitive.${n}`,(o=r.forwardRef((e,t)=>{var n;let o,l,{children:s,...d}=e,c=null,u=!1,f=[];m(s)&&"function"==typeof h&&(s=h(s._payload)),r.Children.forEach(s,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;m(t)&&"function"==typeof h&&(t=h(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),f.push(c?.props?.children)}else f.push(e)}),c?c=r.cloneElement(c,void 0,f):!u&&1===r.Children.count(s)&&r.isValidElement(s)&&(c=s);let g=c?(n=c,(l=(o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.ref:(l=(o=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,x=i(t,g);if(!c){if(s||0===s){let e,t;throw Error(u?(e=a,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=a,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return s}let y=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(d,c.props??{});return c.type!==r.Fragment&&(y.ref=t?x:g),r.cloneElement(c,y)})).displayName=`${a}.Slot`,o),s=r.forwardRef((e,r)=>{let{asChild:i,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(i?l:n,{...a,ref:r})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{}),x="Checkbox",[y,v]=(0,a.createContextScope)(x),[b,w]=y(x);function j(e){let{__scopeCheckbox:n,checked:i,children:a,defaultChecked:o,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:f="on",internal_do_not_use_render:m}=e,[h,g]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){let[a,o,l]=function({defaultProp:e,onChange:t}){let[n,i]=r.useState(e),a=r.useRef(n),o=r.useRef(t);return s(()=>{o.current=t},[t]),r.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:a;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,i])}return[c,r.useCallback(t=>{if(d){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else o(t)},[d,e,o,l])]}({prop:i,defaultProp:o??!1,onChange:u,caller:x}),[y,v]=r.useState(null),[w,j]=r.useState(null),S=r.useRef(!1),C=!y||!!d||!!y.closest("form"),E={checked:h,disabled:l,setChecked:g,control:y,setControl:v,name:c,form:d,value:f,hasConsumerStoppedPropagationRef:S,required:p,defaultChecked:!T(o)&&o,isFormControl:C,bubbleInput:w,setBubbleInput:j};return(0,t.jsx)(b,{scope:n,...E,children:"function"==typeof m?m(E):a})}var S="CheckboxTrigger",C=r.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:a,...l},s)=>{let{control:d,value:c,disabled:u,checked:p,required:f,setControl:m,setChecked:h,hasConsumerStoppedPropagationRef:x,isFormControl:y,bubbleInput:v}=w(S,e),b=i(s,m),j=r.useRef(p);return r.useEffect(()=>{let e=d?.form;if(e){let t=()=>h(j.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,h]),(0,t.jsx)(g.button,{type:"button",role:"checkbox","aria-checked":T(p)?"mixed":p,"aria-required":f,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:b,onKeyDown:o(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:o(a,e=>{h(e=>!!T(e)||!e),v&&y&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())})})});C.displayName=S;var E=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,name:i,checked:a,defaultChecked:o,required:l,disabled:s,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(j,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:s,required:l,onCheckedChange:c,name:i,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{...p,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});E.displayName=x;var k="CheckboxIndicator",N=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,forceMount:i,...a}=e,o=w(k,n);return(0,t.jsx)(u.Presence,{present:i||T(o.checked)||!0===o.checked,children:(0,t.jsx)(g.span,{"data-state":I(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})});N.displayName=k;var D="CheckboxBubbleInput",R=r.forwardRef(({__scopeCheckbox:e,...n},a)=>{let{control:o,hasConsumerStoppedPropagationRef:l,checked:s,defaultChecked:u,required:p,disabled:f,name:m,value:h,form:x,bubbleInput:y,setBubbleInput:v}=w(D,e),b=i(a,v),j=(0,d.usePrevious)(s),S=(0,c.useSize)(o);r.useEffect(()=>{if(!y)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(j!==s&&e){let r=new Event("click",{bubbles:t});y.indeterminate=T(s),e.call(y,!T(s)&&s),y.dispatchEvent(r)}},[y,j,s,l]);let C=r.useRef(!T(s)&&s);return(0,t.jsx)(g.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??C.current,required:p,disabled:f,name:m,value:h,form:x,...n,tabIndex:-1,ref:b,style:{...n.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function T(e){return"indeterminate"===e}function I(e){return T(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=D,e.s(["Checkbox",0,E,"CheckboxIndicator",0,N,"Indicator",0,N,"Root",0,E,"createCheckboxScope",0,v,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,j,"unstable_CheckboxTrigger",0,C,"unstable_Provider",0,j,"unstable_Trigger",0,C],388474);var A=e.i(388474),A=A,$=e.i(975157),B=e.i(593698);e.s(["Checkbox",0,function({className:e,...r}){return(0,t.jsx)(A.Root,{"data-slot":"checkbox",className:(0,$.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...r,children:(0,t.jsx)(A.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(B.CheckIcon,{})})})}],59497)},624687,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Textarea",0,function({className:e,...n}){return(0,t.jsx)("textarea",{className:(0,r.cn)("min-h-24 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",e),...n})}])},82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let i=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,n.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,n.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,n.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...a}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,n.cn)(i({variant:r,className:e})),...a})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,n.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let i=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...a}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(i({variant:r}),e),...a})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...i}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...i}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...i})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function i(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function a(e){return"object"===i(e)}function o(e,t){return e.length<124?e:t}var l=((t=l||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),s=((r=s||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!a(e))throw Error(`Message is expected to be an object, but got ${i(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${i(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${i(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${i(e.payload.query)}`);if(null!=e.payload.variables&&!a(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${i(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==i(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${i(e.payload.operationName)}`);if(null!=e.payload.extensions&&!a(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${i(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${i(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return a(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let m=null;function h(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return m??=function(t){let r,n,i,a,{url:f,connectionParams:m,lazy:h=!0,onNonLazyError:g=console.error,lazyCloseTimeout:x=0,keepAlive:y=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:w=5,retryWait:j=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:S=p,on:C,webSocketImpl:E,generateID:k=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:N,jsonMessageReviver:D}=t;if(E){var R;if(!("function"==typeof(R=E)&&"constructor"in R&&"CLOSED"in R&&"CLOSING"in R&&"CONNECTING"in R&&"OPEN"in R))throw Error("Invalid WebSocket implementation provided");r=E}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let T=r,I=(n={},i={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},a={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[i.emit,C.message]:[i.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:i.on,on(e,t){let r=a[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...a[e]])r(...t)}});function A(e){let t=[I.on("error",r=>{t.forEach(e=>e()),e(r)}),I.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let $,B=0,P,z=!1,_=0,O=!1;async function M(){clearTimeout(P);let[e,t]=await ($??($=new Promise((e,t)=>(async()=>{let r,n;if(z){if(await j(_),!B)return $=void 0,t({code:1e3,reason:"All Subscriptions Gone"});_++}I.emit("connecting",z);let i=new T("function"==typeof f?await f():f,"graphql-transport-ws");function a(){isFinite(y)&&y>0&&(clearTimeout(n),n=setTimeout(()=>{i.readyState===T.OPEN&&(i.send(c({type:s.Ping})),I.emit("ping",!1,void 0))},y))}A(e=>{$=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=e=>I.emit("error",e),i.onclose=e=>I.emit("closed",e),i.onopen=async()=>{try{I.emit("opened",i);let e="function"==typeof m?await m():m;if(i.readyState!==T.OPEN)return;i.send(c(e?{type:s.ConnectionInit,payload:e}:{type:s.ConnectionInit},N)),isFinite(b)&&b>0&&(r=setTimeout(()=>{i.close(l.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),a()}catch(e){I.emit("error",e),i.close(l.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;i.onmessage=({data:t})=>{try{let n=d("string"==typeof t?JSON.parse(t,D):t);if(I.emit("message",n),"ping"===n.type||"pong"===n.type){I.emit(n.type,!0,n.payload),"pong"===n.type?a():v||(i.send(c(n.payload?{type:s.Pong,payload:n.payload}:{type:s.Pong})),I.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==s.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,I.emit("connected",i,n.payload,z),z=!1,_=0,e([i,new Promise((e,t)=>A(t))])}catch(e){i.onmessage=null,I.emit("error",e),i.close(l.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===T.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{B||(isFinite(x)&&x>0?P=setTimeout(()=>{e.readyState===T.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function L(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[l.InternalServerError,l.InternalClientError,l.BadRequest,l.BadResponse,l.Unauthorized,l.SubprotocolNotAcceptable,l.SubscriberAlreadyExists,l.TooManyInitialisationRequests].includes(e.code)))throw e;if(O)return!1;if(p(e)&&1e3===e.code)return B>0;if(!w||_>=w||!S(e))throw e;return z=!0}function F(e,t){let r=k(e),n=!1,i=!1,a=()=>{B--,n=!0};return(async()=>{for(B++;;)try{let[o,l,d]=await M();if(n)return l();let u=I.onMessage(r,e=>{switch(e.type){case s.Next:return void t.next(e.payload);case s.Error:i=!0,n=!0,t.error(e.payload),a();return;case s.Complete:n=!0,a();return}});o.send(c({id:r,type:s.Subscribe,payload:e},N)),a=()=>{n||o.readyState!==T.OPEN||o.send(c({id:r,type:s.Complete},N)),B--,n=!0,l()},await d.finally(u);return}catch(e){if(!L(e))return}})().then(()=>{i||t.complete()}).catch(e=>{t.error(e)}),()=>{n||a()}}return h||(async()=>{for(B++;;)try{let[,,e]=await M();await e}catch(e){try{if(!L(e))return}catch(e){return g?.(e)}}})(),{on:I.on,subscribe:F,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=F(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),i=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return i.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),i.return=async()=>(n(),{done:!0,value:void 0}),i},async dispose(){if(O=!0,$){let[e]=await $;e.close(1e3,"Normal Closure")}},terminate(){$&&I.emit("closed",new u)}}}({url:h,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),i=e.i(975157);let a=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...l}){let s=o?n.Slot.Root:"span";return(0,t.jsx)(s,{className:(0,i.cn)(a({variant:r}),e),"data-slot":"badge","data-variant":r,...l})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...i}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...i})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("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(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(30030);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}(...e),e)}var o=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[s,d]=(0,n.createContextScope)(l,[o.createDialogScope]),c=(0,o.createDialogScope)(),u=e=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(o.Root,{...i,...n,modal:!0})};u.displayName=l;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Trigger,{...a,...i,ref:r})});p.displayName="AlertDialogTrigger";var f=e=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(o.Portal,{...i,...n})};f.displayName="AlertDialogPortal";var m=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Overlay,{...a,...i,ref:r})});m.displayName="AlertDialogOverlay";var h="AlertDialogContent",[g,x]=s(h),y=r.forwardRef((e,n)=>{let{__scopeAlertDialog:i,children:l,...s}=e,d=c(i),u=a(n,r.useRef(null)),p=r.useRef(null);return(0,t.jsx)(g,{scope:i,cancelRef:p,children:(0,t.jsx)(o.Content,{role:"alertdialog",...d,...s,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}(s.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});y.displayName=h;var v=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Title,{...a,...i,ref:r})});v.displayName="AlertDialogTitle";var b=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Description,{...a,...i,ref:r})});b.displayName="AlertDialogDescription";var w=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Close,{...a,...i,ref:r})});w.displayName="AlertDialogAction";var j="AlertDialogCancel",S=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,{cancelRef:l}=x(j,n),s=c(n),d=a(r,l);return(0,t.jsx)(o.Close,{...s,...i,ref:d})});S.displayName=j,e.s(["Action",0,w,"AlertDialog",0,u,"AlertDialogAction",0,w,"AlertDialogCancel",0,S,"AlertDialogContent",0,y,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,f,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,p,"Cancel",0,S,"Content",0,y,"Description",0,b,"Overlay",0,m,"Portal",0,f,"Root",0,u,"Title",0,v,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var C=e.i(691162),C=C,E=e.i(975157),k=e.i(519455);function N({...e}){return(0,t.jsx)(C.Root,{"data-slot":"alert-dialog",...e})}function D({...e}){return(0,t.jsx)(C.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(C.Portal,{"data-slot":"alert-dialog-portal",...e})}function T({className:e,...r}){return(0,t.jsx)(C.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,E.cn)("fixed inset-0 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),...r})}function I({className:e,size:r="default",...n}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(T,{}),(0,t.jsx)(C.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,E.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]: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),...n})]})}function A({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,E.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function $({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,E.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function B({className:e,...r}){return(0,t.jsx)(C.Title,{"data-slot":"alert-dialog-title",className:(0,E.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function P({className:e,...r}){return(0,t.jsx)(C.Description,{"data-slot":"alert-dialog-description",className:(0,E.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})}function z({className:e,variant:r="default",size:n="default",...i}){return(0,t.jsx)(k.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(C.Action,{"data-slot":"alert-dialog-action",className:(0,E.cn)(e),...i})})}function _({className:e,variant:r="outline",size:n="default",...i}){return(0,t.jsx)(k.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(C.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,E.cn)(e),...i})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:r,description:n,onConfirm:i,onOpenChange:a,open:o,title:l,trigger:s}){return(0,t.jsxs)(N,{onOpenChange:a,open:o,children:[s&&(0,t.jsx)(D,{asChild:!0,children:s}),(0,t.jsxs)(I,{children:[(0,t.jsxs)(A,{children:[(0,t.jsx)(B,{children:l}),(0,t.jsx)(P,{children:n})]}),(0,t.jsxs)($,{children:[(0,t.jsx)(_,{children:r}),(0,t.jsx)(z,{onClick:()=>void i(),variant:"destructive",children:e})]})]})]})}],340953)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},842727,e=>{"use strict";var t=e.i(271645);function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)}}"u">typeof window&&window.document&&window.document.createElement;var n=e.i(75830);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}(...e),e)}var o=e.i(30030),l=e.i(610772);e.i(174080);var s=Symbol.for("radix.slottable"),d=Symbol.for("react.lazy");function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===d&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var u=t[" use ".trim().toString()],p=e.i(843476),f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var n;let i,o=(n=`Primitive.${r}`,(i=t.forwardRef((e,r)=>{var i;let o,l,{children:d,...p}=e,f=null,m=!1,h=[];c(d)&&"function"==typeof u&&(d=u(d._payload)),t.Children.forEach(d,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===s){m=!0;let r="child"in e.props?e.props.child:e.props.children;c(r)&&"function"==typeof u&&(r=u(r._payload)),f=((e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null})(e,r),h.push(f?.props?.children)}else h.push(e)}),f?f=t.cloneElement(f,void 0,h):!m&&1===t.Children.count(d)&&t.isValidElement(d)&&(f=d);let g=f?(i=f,(l=(o=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?i.ref:(l=(o=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,x=a(r,g);if(!f){if(d||0===d){let e,t;throw Error(m?(e=n,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=n,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return d}let y=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==t.Fragment&&(y.ref=r?x:g),t.cloneElement(f,y)})).displayName=`${n}.Slot`,i),l=t.forwardRef((e,t)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(n?o:r,{...i,ref:t})});return l.displayName=`Primitive.${r}`,{...e,[r]:l}},{}),m=e.i(30207),h=globalThis?.document?t.useLayoutEffect:()=>{};t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var g=t[" useInsertionEffect ".trim().toString()]||h;Symbol("RADIX:SYNC_STATE");var x=e.i(586318),y=!1,v=t[" useSyncExternalStore ".trim().toString()];function b(){return()=>{}}var w="function"==typeof v?function(){return v(b,()=>!0,()=>!1)}:function(){let[e,r]=t.useState(y);return t.useEffect(()=>{y||(y=!0,r(!0))},[]),e},j="rovingFocusGroup.onEntryFocus",S={bubbles:!1,cancelable:!0},C="RovingFocusGroup",[E,k,N]=(0,n.createCollection)(C),[D,R]=(0,o.createContextScope)(C,[N]),[T,I]=D(C),A=t.forwardRef((e,t)=>(0,p.jsx)(E.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(E.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)($,{...e,ref:t})})}));A.displayName=C;var $=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,orientation:o,loop:l=!1,dir:s,currentTabStopId:d,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:h,preventScrollOnEntryFocus:y=!1,...v}=e,b=t.useRef(null),w=a(n,b),E=(0,x.useDirection)(s),[N,D]=function({prop:e,defaultProp:r,onChange:n=()=>{},caller:i}){let[a,o,l]=function({defaultProp:e,onChange:r}){let[n,i]=t.useState(e),a=t.useRef(n),o=t.useRef(r);return g(()=>{o.current=r},[r]),t.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}({defaultProp:r,onChange:n}),s=void 0!==e,d=s?e:a;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=s},[s,i])}return[d,t.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else o(t)},[s,e,o,l])]}({prop:d,defaultProp:c??null,onChange:u,caller:C}),[R,I]=t.useState(!1),A=(0,m.useCallbackRef)(h),$=k(i),B=t.useRef(!1),[P,z]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(j,A),()=>e.removeEventListener(j,A)},[A]),(0,p.jsx)(T,{scope:i,orientation:o,dir:E,loop:l,currentTabStopId:N,onItemFocus:t.useCallback(e=>D(e),[D]),onItemShiftTab:t.useCallback(()=>I(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,p.jsx)(f.div,{tabIndex:R||0===P?-1:0,"data-orientation":o,...v,ref:w,style:{outline:"none",...e.style},onMouseDown:r(e.onMouseDown,()=>{B.current=!0}),onFocus:r(e.onFocus,e=>{let t=!B.current;if(e.target===e.currentTarget&&t&&!R){let t=new CustomEvent(j,S);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=$().filter(e=>e.focusable);_([e.find(e=>e.active),e.find(e=>e.id===N),...e].filter(Boolean).map(e=>e.ref.current),y)}}B.current=!1}),onBlur:r(e.onBlur,()=>I(!1))})})}),B="RovingFocusGroupItem",P=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:o=!1,tabStopId:s,children:d,...c}=e,u=(0,l.useId)(),m=s||u,g=I(B,i),x=g.currentTabStopId===m,y=k(i),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:j}=g,S=w();return h(()=>{if(S&&a)return v(),()=>b()},[S,a,v,b]),t.useEffect(()=>{if(!S&&a)return v(),()=>b()},[S,a,v,b]),(0,p.jsx)(E.ItemSlot,{scope:i,id:m,focusable:a,active:o,children:(0,p.jsx)(f.span,{tabIndex:x?0:-1,"data-orientation":g.orientation,...c,ref:n,onMouseDown:r(e.onMouseDown,e=>{a?g.onItemFocus(m):e.preventDefault()}),onFocus:r(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:r(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return z[i]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=g.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>_(i))}}),children:"function"==typeof d?d({isCurrentTabStop:x,hasTabStop:null!=j}):d})})});P.displayName=B;var z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",0,P,"Root",0,A,"createRovingFocusGroupScope",0,R],842727)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var i=Symbol.for("radix.slottable"),a=Symbol.for("react.lazy");function o(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var l=r[" use ".trim().toString()],s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,a)=>{var s;let d,c=(s=`Primitive.${a}`,(d=r.forwardRef((e,t)=>{var a;let d,c,{children:u,...p}=e,f=null,m=!1,h=[];o(u)&&"function"==typeof l&&(u=l(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===i){m=!0;let t="child"in e.props?e.props.child:e.props.children;o(t)&&"function"==typeof l&&(t=l(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),h.push(f?.props?.children)}else h.push(e)}),f?f=r.cloneElement(f,void 0,h):!m&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let g=f?(a=f,(c=(d=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?a.ref:(c=(d=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,x=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}(t,g);if(!f){if(u||0===u){let e,t;throw Error(m?(e=s,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=s,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let y=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(y.ref=t?x:g),r.cloneElement(f,y)})).displayName=`${s}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?c:a,{...i,ref:r})});return u.displayName=`Primitive.${a}`,{...e,[a]:u}},{}),d=r.forwardRef((e,r)=>(0,t.jsx)(s.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));d.displayName="Label",e.s(["Label",0,d,"Root",0,d],973741);var c=e.i(973741),c=c,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(c.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return t.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function a(e){let r=t.forwardRef((r,n)=>{var a;let s,f,{children:m,...h}=r,g=null,x=!1,y=[];d(m)&&"function"==typeof p&&(m=p(m._payload)),t.Children.forEach(m,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===o){x=!0;let t="child"in e.props?e.props.child:e.props.children;d(t)&&"function"==typeof p&&(t=p(t._payload)),g=l(e,t),y.push(g?.props?.children)}else y.push(e)}),g?g=t.cloneElement(g,void 0,y):!x&&1===t.Children.count(m)&&t.isValidElement(m)&&(g=m);let v=g?(a=g,(f=(s=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?a.ref:(f=(s=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,b=i(n,v);if(!g){if(m||0===m)throw Error(x?u(e):c(e));return m}let w=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(h,g.props??{});return g.type!==t.Fragment&&(w.ref=n?b:v),t.cloneElement(g,w)});return r.displayName=`${e}.Slot`,r}var o=Symbol.for("radix.slottable"),l=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},s=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var c=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),m=new WeakMap;function h(e,t){var r,n;let i,a,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,n=t,i=r.length,(o=(a=g(n))>=0?a:i+a)<0||o>=i?-1:o);return -1===l?void 0:e[l]}function g(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],m.set(this,!0)}set(e,t){return m.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),a=this.#e.length,o=g(e),l=o>=0?o:a+o,s=l<0||l>=a?-1:l;if(s===this.size||i&&s===this.size-1||-1===s)return this.set(t,r),this;let d=this.size+ +!i;o<0&&l++;let c=[...this.#e],u=!1;for(let e=l;e<d;e++)if(l===e){let a=c[e];c[e]===t&&(a=c[e+1]),i&&this.delete(t),n=this.get(a),this.set(t,r)}else{u||c[e-1]!==t||(u=!0);let r=c[u?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=h(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=h(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return h(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[o,l]=(0,r.createContextScope)(n),[s,d]=o(n,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:n}=e,i=t.useRef(null),a=t.useRef(new Map).current;return(0,f.jsx)(s,{scope:r,itemMap:a,collectionRef:i,children:n})};c.displayName=n;let u=e+"CollectionSlot",p=a(u),m=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,a=i(t,d(u,r).collectionRef);return(0,f.jsx)(p,{ref:a,children:n})});m.displayName=u;let h=e+"CollectionItemSlot",g="data-radix-collection-item",x=a(h),y=t.forwardRef((e,r)=>{let{scope:n,children:a,...o}=e,l=t.useRef(null),s=i(r,l),c=d(h,n);return t.useEffect(()=>(c.itemMap.set(l,{ref:l,...o}),()=>void c.itemMap.delete(l))),(0,f.jsx)(x,{...{[g]:""},ref:s,children:a})});return y.displayName=h,[{Provider:c,Slot:m,ItemSlot:y},function(r){let n=d(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}],75830);var x=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(x);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),n=e.i(964053),i=e.i(519455),a=e.i(975157);function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...r}){return(0,t.jsx)(n.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),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:s,showCloseButton:d=!0,...c}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto 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),"data-slot":"dialog-content",...c,children:[s,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(i.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Description,{className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:o,...l}){return(0,t.jsxs)("div",{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),"data-slot":"dialog-footer",...l,children:[o,r&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(i.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Title,{className:(0,a.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(n.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},395925,e=>{"use strict";let t=(0,e.i(456420).default)("rotate-ccw",[["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"}]]);e.s(["RotateCcw",0,t],395925)},21357,e=>{"use strict";let t=(0,e.i(456420).default)("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(["Play",0,t],21357)},90969,771777,866026,e=>{"use strict";e.s(["buildDuration",0,function(e,t=Date.now()){let r=e.durationMs??(e.startedAt&&null!==t&&["QUEUED","PREPARING","RUNNING"].includes(e.status)?t-Date.parse(e.startedAt):null);if(null===r||!Number.isFinite(r))return"—";let n=Math.max(0,Math.floor(r/1e3)),i=Math.floor(n/3600),a=Math.floor(n%3600/60),o=n%60;return i>0?`${i}h${a>0?` ${a}m`:""}`:a>0?`${a}m${o>0?` ${o}s`:""}`:`${o}s`},"buildSnapshotName",0,function(e){let t=e.snapshot.repository,r=e.snapshot.worktree;return{repository:t?.name??"—",worktree:r?.branch??r?.folder??"—"}},"buildStatusVariant",0,function(e){return"FAILED"===e?"destructive":"SUCCEEDED"===e?"success":"secondary"},"relativeBuildAge",0,function(e,t,r=Date.now()){if(null===r)return"—";let n=Math.round((Date.parse(e)-r)/1e3),i=new Intl.RelativeTimeFormat(t,{numeric:"auto"});for(let[e,t]of[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]])if(Math.abs(n)>=t)return i.format(Math.round(n/t),e);return i.format(n,"second")}],90969);var t=e.i(843476),r=e.i(395925),n=e.i(948148),i=e.i(271645),a=e.i(519455),o=e.i(987968),l=e.i(462777),s=e.i(637611);e.s(["RebuildButton",0,function({buildId:e,onCompleted:d,onError:c,size:u="default"}){let p=(0,n.useTranslations)("builds"),[f,m]=(0,i.useState)(!1),h=async()=>{m(!0),c(null);try{let t=await (0,s.controlPlaneRequest)(`mutation RebuildBuild($id: ID!, $requestId: ID!) {
2
- rebuildBuild(id: $id, requestId: $requestId) { id status }
3
- }`,{id:e,requestId:(0,l.createClientId)()});await d?.(t.rebuildBuild)}catch(e){c(e instanceof Error?e.message:String(e))}finally{m(!1)}};return(0,t.jsxs)(a.Button,{disabled:f,onClick:e=>{e.stopPropagation(),h()},onKeyDown:e=>e.stopPropagation(),size:u,type:"button",variant:"outline",children:[f?(0,t.jsx)(o.Spinner,{}):(0,t.jsx)(r.RotateCcw,{})," ",p("rebuild")]})}],771777);var d=e.i(716327),c=e.i(21357),u=e.i(755146);e.s(["RunBuildControls",0,function({buildId:e,destinationType:r,preferredDestination:p,onCompleted:f,onError:m,size:h="default"}){let g=(0,n.useTranslations)("builds"),x=p?.generic?null:p??null,[y,v]=(0,i.useState)(x?[x]:[]),[b,w]=(0,i.useState)(x?new Set([x.id]):new Set),[j,S]=(0,i.useState)(!1),[C,E]=(0,i.useState)(!1),[k,N]=(0,i.useState)(!1),D=(0,i.useMemo)(()=>y.filter(e=>b.has(e.id)).map(e=>e.name),[y,b]),R=async()=>{E(!0),m(null);try{let t=(await (0,s.controlPlaneRequest)(`mutation BuildRunDestinations($buildId: ID!, $requestId: ID!) {
4
- inspectBuildRunDestinations(buildId: $buildId, requestId: $requestId)
5
- }`,{buildId:e,requestId:(0,l.createClientId)()})).inspectBuildRunDestinations.filter(e=>e.type===r&&!e.generic);v(t),w(e=>{let r=new Set(t.map(e=>e.id));return new Set([...e].filter(e=>r.has(e)))}),S(!0)}catch(e){m(e instanceof Error?e.message:String(e))}finally{E(!1)}},T=async()=>{N(!0),m(null);try{await (0,s.controlPlaneRequest)(`mutation RunCompletedBuild($input: RunBuildInput!) {
6
- runBuild(input: $input) { id status }
7
- }`,{input:{buildId:e,destinations:y.filter(e=>b.has(e.id)),requestId:(0,l.createClientId)()}}),w(new Set),await f?.()}catch(e){m(e instanceof Error?e.message:String(e))}finally{N(!1)}};return(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,t.jsxs)(u.DropdownMenu,{onOpenChange:e=>{e&&!j&&R()},children:[(0,t.jsx)(u.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(a.Button,{disabled:C,size:h,type:"button",variant:"outline",children:[C?(0,t.jsx)(o.Spinner,{}):(0,t.jsx)(c.Play,{}),D.length?g("selectedDevices",{count:D.length}):g("selectRunDevices"),(0,t.jsx)(d.ChevronDown,{})]})}),(0,t.jsxs)(u.DropdownMenuContent,{align:"end",className:"w-72",children:[y.map(e=>(0,t.jsxs)(u.DropdownMenuCheckboxItem,{checked:b.has(e.id),onCheckedChange:t=>w(r=>{let n=new Set(r);return t?n.add(e.id):n.delete(e.id),n}),children:[e.name,e.osVersion?` \xb7 ${e.osVersion}`:""]},e.id)),j&&!y.length&&(0,t.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:g("noCompatibleDevices")})]})]}),(0,t.jsxs)(a.Button,{disabled:k||0===b.size,onClick:()=>void T(),size:h,type:"button",children:[k?(0,t.jsx)(o.Spinner,{}):(0,t.jsx)(c.Play,{})," ",g("run")]})]})}],866026)},747047,111530,e=>{"use strict";let t=`
8
- id requestId jobId status action destinationType destination snapshot commandSummary artifactDirectory errorCode error outOfDate
9
- createdAt startedAt finishedAt durationMs updatedAt
10
- artifacts { id kind relativePath sizeBytes checksum metadata createdAt }
11
- `;e.s(["BUILD_LIST_FIELDS",0,t],747047);var r=e.i(271645);e.s(["useBuildTimeTicker",0,function(){let[e,t]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=()=>t(Date.now()),r=window.setTimeout(e,0),n=window.setInterval(e,1e3);return()=>{window.clearTimeout(r),window.clearInterval(n)}},[]),e}],111530)},229490,e=>{"use strict";var t=e.i(843476),r=e.i(93384),n=e.i(77071);let i=(0,e.i(456420).default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);var a=e.i(573474),o=e.i(861745),l=e.i(948148),s=e.i(271645),d=e.i(340953),c=e.i(929592),u=e.i(487486),p=e.i(519455),f=e.i(515288),m=e.i(59497),h=e.i(776639),g=e.i(82612),x=e.i(793479),y=e.i(110204),v=e.i(967489),b=e.i(987968),w=e.i(784774),j=e.i(677572),S=e.i(624687),C=e.i(520133),E=e.i(637611),k=e.i(90969),N=e.i(747047),D=e.i(771777),R=e.i(866026),T=e.i(111530);let I=`
12
- id name preBuildScript postBuildScript enabledByDefault timeoutSeconds failureBehavior createdAt updatedAt
13
- `,A=`export default async function preBuild({
14
- buildId,
15
- branch,
16
- destination,
17
- action,
18
- telemetry,
19
- }) {
20
- // Runs before the build from the worktree root.
21
- // telemetry includes localBaseUrl, remoteBaseUrl, selectedBaseUrl,
22
- // consoleLogsUrl, analyticsEventsUrl, and both collection-enabled flags.
23
- }`,$=`export default async function postBuild({
24
- buildId,
25
- branch,
26
- destination,
27
- action,
28
- buildFolder,
29
- failed,
30
- cancelled,
31
- errorCode,
32
- error,
33
- telemetry,
34
- }) {
35
- // Runs after every build attempt from the worktree root.
36
- // telemetry is the same immutable URL and collection-settings snapshot.
37
- }`,B=["ALL","QUEUED","PREPARING","RUNNING","SUCCEEDED","FAILED","CANCELLED"];function P({open:e,script:r,onOpenChange:n,onSaved:i}){let a=(0,l.useTranslations)("builds"),[o,d]=(0,s.useState)(r?.name??""),[u,f]=(0,s.useState)(r?r.preBuildScript??"":A),[g,w]=(0,s.useState)(r?r.postBuildScript??"":$),[j,C]=(0,s.useState)(r?.enabledByDefault??!1),[k,N]=(0,s.useState)(r?.timeoutSeconds??300),[D,R]=(0,s.useState)(r?.failureBehavior??"FAIL_BUILD"),[T,I]=(0,s.useState)(!1),[B,z]=(0,s.useState)(null),_=async()=>{I(!0),z(null);try{await (0,E.controlPlaneRequest)(`mutation SaveBuildScript($input: SaveBuildScriptInput!) {
38
- saveBuildScript(input: $input) { id }
39
- }`,{input:{id:r?.id??null,name:o,preBuildScript:u||null,postBuildScript:g||null,enabledByDefault:j,timeoutSeconds:k,failureBehavior:D}}),await i(),n(!1)}catch(e){z(e instanceof Error?e.message:String(e))}finally{I(!1)}};return(0,t.jsx)(h.Dialog,{onOpenChange:n,open:e,children:(0,t.jsxs)(h.DialogContent,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(h.DialogHeader,{children:[(0,t.jsx)(h.DialogTitle,{children:a(r?"editScript":"newScript")}),(0,t.jsx)(h.DialogDescription,{children:a("scriptDescription")})]}),B&&(0,t.jsx)(c.Alert,{variant:"destructive",children:(0,t.jsx)(c.AlertDescription,{children:B})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"build-script-name",children:a("name")}),(0,t.jsx)(x.Input,{id:"build-script-name",onChange:e=>d(e.target.value),value:o})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"pre-build-script",children:a("preBuildScript")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:a("preBuildScriptHelp")}),(0,t.jsx)(S.Textarea,{className:"font-mono text-xs",id:"pre-build-script",onChange:e=>f(e.target.value),rows:8,value:u})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"post-build-script",children:a("postBuildScript")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:a("postBuildScriptHelp")}),(0,t.jsx)(S.Textarea,{className:"font-mono text-xs",id:"post-build-script",onChange:e=>w(e.target.value),rows:8,value:g})]}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"script-timeout",children:a("timeout")}),(0,t.jsx)(x.Input,{id:"script-timeout",min:1,max:3600,onChange:e=>N(Number(e.target.value)),type:"number",value:k})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{children:a("failureBehavior")}),(0,t.jsxs)(v.Select,{onValueChange:e=>R(e),value:D,children:[(0,t.jsx)(v.SelectTrigger,{children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsxs)(v.SelectContent,{children:[(0,t.jsx)(v.SelectItem,{value:"FAIL_BUILD",children:a("failureBehaviors.FAIL_BUILD")}),(0,t.jsx)(v.SelectItem,{value:"CONTINUE",children:a("failureBehaviors.CONTINUE")})]})]})]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Checkbox,{checked:j,onCheckedChange:e=>C(!!e)}),a("enabledByDefault")]})]}),(0,t.jsxs)(h.DialogFooter,{children:[(0,t.jsx)(p.Button,{onClick:()=>n(!1),type:"button",variant:"outline",children:a("cancel")}),(0,t.jsxs)(p.Button,{disabled:T||!o.trim()||!u.trim()&&!g.trim(),onClick:()=>void _(),type:"button",children:[T&&(0,t.jsx)(b.Spinner,{})," ",a("save")]})]})]})})}e.s(["BuildsPage",0,function(){let e=(0,l.useTranslations)("builds"),h=(0,o.useLocale)(),x=(0,C.useRouter)(),y=(0,T.useBuildTimeTicker)(),[S,A]=(0,s.useState)([]),[$,z]=(0,s.useState)([]),[_,O]=(0,s.useState)("ALL"),[M,L]=(0,s.useState)(null),[F,q]=(0,s.useState)(!0),[U,V]=(0,s.useState)(!1),[H,W]=(0,s.useState)(null),[G,K]=(0,s.useState)(!1),[X,J]=(0,s.useState)(null),[Z,Q]=(0,s.useState)(new Set),[Y,ee]=(0,s.useState)(!1),[et,er]=(0,s.useState)(!1),en=(0,s.useCallback)(async e=>{e?V(!0):q(!0);try{let t=await (0,E.controlPlaneRequest)(`query BuildsPage($after: ID, $status: BuildStatus) {
40
- builds(first: 50, after: $after, status: $status) {
41
- items { ${N.BUILD_LIST_FIELDS} }
42
- nextCursor
43
- }
44
- buildScripts { ${I} }
45
- }`,{after:e??null,status:"ALL"===_?null:_});A(r=>e?[...r,...t.builds.items]:t.builds.items),L(t.builds.nextCursor),z(t.buildScripts),W(null)}catch(e){W(e instanceof Error?e.message:String(e))}finally{q(!1),V(!1)}},[_]);(0,s.useEffect)(()=>{let e=window.setTimeout(()=>void en(),0);return()=>window.clearTimeout(e)},[en]),(0,s.useEffect)(()=>(0,E.controlPlaneSubscriptions)().subscribe({query:"subscription BuildsChanged { buildsChanged { id } }"},{next:()=>void en(),error:()=>void 0,complete:()=>void 0}),[en]);let ei=async e=>{try{await (0,E.controlPlaneRequest)("mutation DeleteBuildScript($id: ID!) { deleteBuildScript(id: $id) }",{id:e}),await en()}catch(e){W(e instanceof Error?e.message:String(e))}},ea=(0,s.useMemo)(()=>{let e=[],t=new Intl.DateTimeFormat(h,{dateStyle:"full"});for(let r of S){let n=new Date(r.startedAt??r.createdAt),i=`${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`,a=e.at(-1);a?.dateKey===i?a.items.push(r):e.push({key:`${i}-${r.id}`,dateKey:i,label:t.format(n),items:[r]})}return e},[S,h]),eo=async()=>{if(Z.size){er(!0),W(null);try{await (0,E.controlPlaneRequest)("mutation DeleteBuilds($ids: [ID!]!) { deleteBuilds(ids: $ids) }",{ids:[...Z]}),Q(new Set),ee(!1),await en()}catch(e){W(e instanceof Error?e.message:String(e))}finally{er(!1)}}};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("description")})]})}),H&&(0,t.jsx)(c.Alert,{variant:"destructive",children:(0,t.jsx)(c.AlertDescription,{children:H})}),(0,t.jsxs)(j.Tabs,{defaultValue:"history",children:[(0,t.jsxs)(j.TabsList,{children:[(0,t.jsxs)(j.TabsTrigger,{value:"history",children:[(0,t.jsx)(r.Hammer,{})," ",e("history")]}),(0,t.jsxs)(j.TabsTrigger,{value:"scripts",children:[(0,t.jsx)(i,{})," ",e("buildScripts")]})]}),(0,t.jsxs)(j.TabsContent,{className:"space-y-4",value:"history",children:[(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[Z.size>0&&(0,t.jsxs)(p.Button,{disabled:et,onClick:()=>ee(!0),variant:"destructive",children:[et?(0,t.jsx)(b.Spinner,{}):(0,t.jsx)(a.Trash2,{}),e("deleteSelected",{count:Z.size})]}),(0,t.jsxs)(v.Select,{onValueChange:e=>{Q(new Set),O(e)},value:_,children:[(0,t.jsx)(v.SelectTrigger,{className:"w-48","aria-label":e("filterStatus"),children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsx)(v.SelectContent,{children:B.map(r=>(0,t.jsx)(v.SelectItem,{value:r,children:"ALL"===r?e("allStatuses"):e(`statuses.${r}`)},r))})]})]}),F&&!S.length?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(b.Spinner,{})," ",e("loading")]}):S.length?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(f.Card,{className:"gap-0 py-0",children:(0,t.jsxs)(w.Table,{children:[(0,t.jsx)(w.TableHeader,{children:(0,t.jsxs)(w.TableRow,{className:"hover:bg-transparent",children:[(0,t.jsx)(w.TableHead,{className:"w-12",children:(0,t.jsx)("span",{className:"sr-only",children:e("selectBuilds")})}),(0,t.jsx)(w.TableHead,{children:e("build")}),(0,t.jsx)(w.TableHead,{children:e("status")}),(0,t.jsx)(w.TableHead,{children:e("action")}),(0,t.jsx)(w.TableHead,{children:e("destination")}),(0,t.jsx)(w.TableHead,{children:e("startedAt")}),(0,t.jsx)(w.TableHead,{className:"text-right",children:e("actionsLabel")})]})}),(0,t.jsx)(w.TableBody,{children:ea.map(r=>{let n=r.items.map(e=>e.id),i=n.filter(e=>Z.has(e)).length;return(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)(w.TableRow,{className:"bg-muted/20 hover:bg-muted/20",children:[(0,t.jsx)(w.TableCell,{className:"py-1.5",children:(0,t.jsx)(m.Checkbox,{"aria-label":e("selectDate",{date:r.label}),checked:i===n.length||i>0&&"indeterminate",onCheckedChange:e=>Q(t=>{let r=new Set(t);for(let t of n)!0===e?r.add(t):r.delete(t);return r})})}),(0,t.jsx)(w.TableCell,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:6,children:r.label})]}),r.items.map(r=>{let n=(0,k.buildSnapshotName)(r),i=r.startedAt??r.createdAt,a="SUCCEEDED"===r.status&&r.artifacts.some(e=>"RUNNABLE_APP"===e.kind);return(0,t.jsxs)(w.TableRow,{"aria-label":e("viewBuild"),className:"cursor-pointer focus-visible:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>x.push(`/builds/${r.id}`),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),x.push(`/builds/${r.id}`))},role:"link",tabIndex:0,children:[(0,t.jsx)(w.TableCell,{onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,t.jsx)(m.Checkbox,{"aria-label":e("selectBuild",{id:r.id}),checked:Z.has(r.id),onCheckedChange:e=>Q(t=>{let n=new Set(t);return!0===e?n.add(r.id):n.delete(r.id),n})})}),(0,t.jsxs)(w.TableCell,{className:"min-w-56 whitespace-normal",children:[(0,t.jsx)(C.Link,{className:"font-medium hover:underline",href:`/builds/${r.id}`,onClick:e=>e.stopPropagation(),children:n.repository}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:n.worktree})]}),(0,t.jsx)(w.TableCell,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,t.jsx)(u.Badge,{variant:(0,k.buildStatusVariant)(r.status),children:e(`statuses.${r.status}`)}),r.outOfDate&&(0,t.jsx)(u.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:e("outOfDate")})]})}),(0,t.jsx)(w.TableCell,{children:(0,t.jsx)(u.Badge,{variant:"outline",children:e(`actions.${r.action}`)})}),(0,t.jsx)(w.TableCell,{children:r.destination.name}),(0,t.jsx)(w.TableCell,{className:"text-muted-foreground",children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("time",{dateTime:i,title:new Date(i).toLocaleString(h),children:(0,k.relativeBuildAge)(i,h,y)}),(0,t.jsx)("span",{className:"text-xs",children:e("durationValue",{duration:(0,k.buildDuration)(r,y)})})]})}),(0,t.jsx)(w.TableCell,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsx)(D.RebuildButton,{buildId:r.id,onCompleted:()=>en(),onError:W,size:"sm"}),a&&(0,t.jsx)(R.RunBuildControls,{buildId:r.id,destinationType:r.destinationType,onCompleted:en,onError:W,preferredDestination:r.destination,size:"sm"})]})})]},r.id)})]},r.key)})})]})}),M&&(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsxs)(p.Button,{disabled:U,onClick:()=>void en(M),variant:"outline",children:[U&&(0,t.jsx)(b.Spinner,{})," ",e("loadMore")]})})]}):(0,t.jsx)(g.Empty,{className:"border py-12",children:(0,t.jsxs)(g.EmptyHeader,{children:[(0,t.jsx)(g.EmptyMedia,{variant:"icon",children:(0,t.jsx)(r.Hammer,{})}),(0,t.jsx)(g.EmptyTitle,{children:e("emptyTitle")}),(0,t.jsx)(g.EmptyDescription,{children:e("emptyDescription")})]})})]}),(0,t.jsxs)(j.TabsContent,{className:"space-y-4",value:"scripts",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(p.Button,{onClick:()=>{J(null),K(!0)},children:[(0,t.jsx)(n.Plus,{})," ",e("newScript")]})}),$.length?(0,t.jsx)("div",{className:"grid gap-3 lg:grid-cols-2",children:$.map(r=>(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(f.CardHeader,{children:(0,t.jsxs)(f.CardTitle,{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:r.name}),r.enabledByDefault&&(0,t.jsx)(u.Badge,{children:e("defaultEnabled")})]})}),(0,t.jsxs)(f.CardContent,{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[r.preBuildScript&&(0,t.jsx)(u.Badge,{variant:"outline",children:e("preBuild")}),r.postBuildScript&&(0,t.jsx)(u.Badge,{variant:"outline",children:e("postBuild")}),(0,t.jsx)("span",{children:e("timeoutSeconds",{count:r.timeoutSeconds})}),(0,t.jsx)("span",{children:e(`failureBehaviors.${r.failureBehavior}`)})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(p.Button,{onClick:()=>{J(r),K(!0)},size:"sm",variant:"outline",children:e("edit")}),(0,t.jsx)(p.Button,{"aria-label":e("deleteScript"),onClick:()=>void ei(r.id),size:"icon-sm",variant:"destructive",children:(0,t.jsx)(a.Trash2,{})})]})]})]},r.id))}):(0,t.jsx)(g.Empty,{className:"border py-12",children:(0,t.jsxs)(g.EmptyHeader,{children:[(0,t.jsx)(g.EmptyMedia,{variant:"icon",children:(0,t.jsx)(i,{})}),(0,t.jsx)(g.EmptyTitle,{children:e("noScripts")}),(0,t.jsx)(g.EmptyDescription,{children:e("noScriptsDescription")})]})})]})]}),G&&(0,t.jsx)(P,{onOpenChange:K,onSaved:en,open:G,script:X}),(0,t.jsx)(d.ConfirmationDialog,{actionLabel:e("deleteBuilds"),cancelLabel:e("cancel"),description:e("deleteBuildsDescription",{count:Z.size}),onConfirm:eo,onOpenChange:ee,open:Y,title:e("deleteBuildsTitle",{count:Z.size})})]})}],229490)}]);