import{r as e,j as s}from"./vendor-react-Dp9pL_Wn.js";import{g as t,a9 as o,q as a,m as r,aa as i,ab as c,ac as n,_ as d,w as m,ad as p,ae as j,af as l}from"./c2ee0272b-DPDuX889.js";import{O as u}from"./vendor-router-qG5OCEmI.js";import{u as f}from"./vendor-intl-D2wGIp4M.js";import{EpitaxyFramePage as b}from"./c11959232-PSRJllna.js";import{u as v}from"./ca82bcec9-Bk8L5wm9.js";import{E as x,a as y,b as g,c as h,d as E,e as C,f as w,g as R,h as _}from"./ca82bcec9-Bk8L5wm9.js";import{E as k}from"./c06173196-BO3xYnQU.js";import{am as P,an as K,ao as q,ap as L,aq as A,ar as S,as as z,at as D,au as B,av as F,aw as M,ax as H,ay as I}from"./index-XoaBlZfC.js";import{u as N,C as O}from"./c7ac369c8-CtRzrOWL.js";import"./vendor-ant-cds-BLsR_p72.js";import"./vendor-base-ui-N1VQ4ctE.js";import"./vendor-radix-Dv3qPI0v.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-zod-B8MhECV7.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-DGChWNxR.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-query-CRl6sF7K.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-infra-DayZK7Ds.js";import"./vendor-growthbook-HDTqppl-.js";import"./c042dfd41-BqPurUap.js";import"./c5610fbe3-D1ZBACY0.js";import"./c9a932a07-D-BpIpFk.js";import"./c6e1d8764-CNSKRthg.js";import"./c7c40fbbb-Dp74xcGV.js";import"./c86a1b907-DGD2pwio.js";import"./c33b2042a-BXM4oh1L.js";import"./cc2095605-BGMoEd1A.js";import"./c6eedc03a-2pnXXVui.js";import"./c2591c98b-BCeQt-yF.js";import"./c7fe8135c-CvUPVgqB.js";import"./c34d1f91f-BFa6SLoc.js";import"./cd78d010c-DcLSXEul.js";import"./c47ad434c-CQdY2DO-.js";import"./vendor-frame-shell-thumb-Ds98d0Wd.js";import"./c606eaf84-cZiIvqvT.js";import"./cdd5b9598-jpvpBTfJ.js";import"./c627fcdb6-1_bsVTpt.js";import"./cd0c75e95-fdL7GUlM.js";import"./ce569194f-C-qbzwjY.js";import"./c51e217b4-CQax1dv1.js";import"./cf8745532-iXRdIIlk.js";import"./c633929dd-Bvw8DbQE.js";import"./cf0b6cdd1-BiOr4lx8.js";import"./vendor-frame-shell-gates-16SIjvEd.js";import"./c25b1be4a-DS52eF2z.js";import"./ceb7856f6-BEXqPnPr.js";import"./c2764ca9d-B5fJmtn_.js";import"./c574ff469-OTSQDlZ0.js";import"./c9a932b3c-0qW2n7RC.js";import"./c07cc694b-Df8eQHmi.js";import"./ce37e8d91-DX1WBIeC.js";import"./cec18ad9a-K1ED9GYX.js";import"./cfe55e8af-C6yomeVF.js";import"./c89766c40-v06LzoVN.js";import"./c72812e30-Dt73lnnt.js";import"./c9a5287df-D_Z7ffFR.js";const G={dismissedLsKey:q,allCompleteLsKey:S,clickedLsKey:A,serverKeyFor:L};const J=e.memo(function(){const{eligible:n}=function(){const s=t(),n=o(),d=a("claude_ai_sot_has_claude_code"),[m,p]=r(q,!1),[j,l]=r("ccd-checklist-le1-sessions-at-first-eval",!1),u=i(),f=P("ccd",{enabled:s});K("ccd",G,{enabled:s});const b=s&&n&&!d&&!m&&f.settled&&!f.panelDismissedAt&&!f.panelCompletedAt;e.useEffect(()=>{b&&u&&!j&&c().length<=1&&l(!0)},[b,u,j,l]);const v=e.useCallback(()=>p(!0),[p]);return{eligible:b&&u&&j,dismiss:v}}(),d=z();return n||d?s.jsx(Q,{}):null});function Q(){const s=D(),t=B(e=>e.setConfig),o=B(e=>e.clear);return e.useEffect(()=>{t(s)},[s,t]),e.useEffect(()=>()=>o(),[o]),null}function T(e){return"/epitaxy/apps"===e.pathname}function U(){const o=f(),a=t(),r=n(),{addError:i}=d(),c=m(),b=p(),x=j(T),y=!a||!0===r.enabled||x,g=a&&null===r.enabled,h=N(O),E=y&&h.enabled&&"blocking"===h.severity;v({variant:"ccd",settled:y,configBlocking:E}),F(!0===r.enabled);const{unsupportedCode:C}=r,{description:w}=l(o,"Code",C??"no_entitlement"),R=C?w:o.formatMessage({defaultMessage:"Claude Code isn\u2019t available for this account.",id:"PHd+sx3yIc"}),_=e.useRef(!1);return e.useEffect(()=>{if(g||y||_.current)return;_.current=!0;const e=new URLSearchParams(window.location.search);i(R,{messageForLogging:"Claude Code unavailable, redirected away from /epitaxy.",errorContext:{tags:{source:"epitaxy_entitlement_redirect",code:C??"none",deeplink_intent:String(M.some(s=>e.has(s)))}}}),c.replace(b)},[g,y,b,c,i,R,C]),g||!y?s.jsx(H,{}):s.jsxs(k,{sidePanePersistKey:I,children:[!0===r.enabled&&s.jsx(J,{}),s.jsx(u,{})]})}const V=b;export{I as EPITAXY_SIDE_PANE_PERSIST_KEY,x as EpitaxyAppsRoute,y as EpitaxyArtifactRoute,g as EpitaxyDevRoute,U as EpitaxyGroupLayoutRoute,h as EpitaxyProjectRoute,E as EpitaxyProjectsBrowseRoute,V as EpitaxyRoute,C as EpitaxyScheduledDetailRoute,w as EpitaxyScheduledNewRoute,R as EpitaxyScheduledRoute,_ as EpitaxyTasksRoute};
