import{r as e,j as s}from"./vendor-react-Dp9pL_Wn.js";import{b as o,$ as t,l as a,i as r,a0 as i,a1 as c,a2 as n,a3 as d,o as m,a4 as p,a5 as j,a6 as l}from"./c6eedc03a-CsEFTfjy.js";import{O as f}from"./vendor-router-qG5OCEmI.js";import{u}from"./vendor-intl-D2wGIp4M.js";import{EpitaxyFramePage as b}from"./c11959232-CMpQM2Cd.js";import{u as v}from"./ca82bcec9-BBSlmojO.js";import{E as x,a as y,b as g,c as h,d as E,e as C,f as k,g as R,h as w}from"./ca82bcec9-BBSlmojO.js";import{E as _}from"./c06173196-B_ctTANi.js";import{ac as z,ad as P,ae as A,af as K,ag as L,ah as S,ai as q,aj as D,ak as B,al as F,am as M,an as N}from"./index-DhMXk6CR.js";import{u as O,C as H}from"./c7ac369c8-C1-WcZDJ.js";import"./vendor-ant-cds-bBedrtIN.js";import"./vendor-base-ui-DNypCIlh.js";import"./vendor-radix-Ch96tRrt.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-zod-0xcuG3aM.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-CokWnmlw.js";import"./vendor-lodash-BvMLws5K.js";import"./vendor-query-BwvgHhJ1.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-motion-EDlUw66k.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-infra-DayZK7Ds.js";import"./c042dfd41-BH7K26L3.js";import"./c5610fbe3-B1aCfdWu.js";import"./c9a932a07-Z0tsgFLW.js";import"./c6e1d8764-CccQebq8.js";import"./c5d464fa3-CPp77x2m.js";import"./c7c40fbbb-Cs5mwZSq.js";import"./c93f725a0-CMHxg2b9.js";import"./c1f96d614-Drir305U.js";import"./c5f3f4681-re2ND0pU.js";import"./cc2095605-Zo4an53U.js";import"./c34d1f91f-vksk-l2P.js";import"./cadc35a07-BsTUd1bq.js";import"./ceb7856f6-s13e14pn.js";import"./c2764ca9d-CReY3H-1.js";import"./c32c0d97f-BRKlKuDE.js";import"./c574ff469-Bw8jasey.js";import"./c9a932b3c-CR0sN9Zc.js";import"./c07cc694b-uNf0MD3m.js";import"./cd78d010c-Dyg6Wpc_.js";import"./c47ad434c-DFpIIwng.js";import"./vendor-frame-shell-thumb-Ds98d0Wd.js";import"./c1f7a9f2d-BWS0oZW8.js";import"./c81c3b080-YLSjdI4J.js";import"./cdd5b9598-Cu3wQTEw.js";import"./cd0c75e95-1sY-B59h.js";import"./ce569194f-qbJFsTqB.js";import"./c5f4e1303-CiyIFgnl.js";import"./cbaad2c48-DaP34LG2.js";import"./ca20d785d-DMHfYegk.js";import"./c4b417834-Bvfkxwb5.js";import"./cf0b6cdd1-DbOZiCud.js";import"./vendor-frame-shell-gates-16SIjvEd.js";import"./c25b1be4a-BYZBJjGH.js";import"./cec18ad9a-u0eQJFVC.js";import"./cfe55e8af-Ba1rC23C.js";import"./ca720915e-B69tVRA0.js";import"./caf7c7e06-DJYXCm3T.js";import"./c5669b8e4-DFSq88jr.js";const I={dismissedLsKey:A,allCompleteLsKey:S,clickedLsKey:L,serverKeyFor:K};const T=e.memo(function(){const{eligible:n}=function(){const s=o(),n=t(),d=a("claude_ai_sot_has_claude_code"),[m,p]=r(A,!1),[j,l]=r("ccd-checklist-le1-sessions-at-first-eval",!1),f=i(),u=z("ccd",{enabled:s});P("ccd",I,{enabled:s});const b=s&&n&&!d&&!m&&u.settled&&!u.panelDismissedAt&&!u.panelCompletedAt;e.useEffect(()=>{b&&f&&!j&&c().length<=1&&l(!0)},[b,f,j,l]);const v=e.useCallback(()=>p(!0),[p]);return{eligible:b&&f&&j,dismiss:v}}(),d=q();return n||d?s.jsx(U,{}):null});function U(){const s=D(),o=B(e=>e.setConfig),t=B(e=>e.clear);return e.useEffect(()=>{o(s)},[s,o]),e.useEffect(()=>()=>t(),[t]),null}function X(e){return"/epitaxy/apps"===e.pathname}function $(){const t=u(),a=o(),r=n(),{addError:i}=d(),c=m(),b=p(),x=j(X),y=!a||!0===r.enabled||x,g=a&&null===r.enabled,h=O(H),E=y&&h.enabled&&"blocking"===h.severity;v({variant:"ccd",settled:y,configBlocking:E});const{unsupportedCode:C}=r,{description:k}=l(t,"Code",C??"no_entitlement"),R=C?k:t.formatMessage({defaultMessage:"Claude Code isn\u2019t available for this account.",id:"PHd+sx3yIc"}),w=e.useRef(!1);return e.useEffect(()=>{if(g||y||w.current)return;w.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(F.some(s=>e.has(s)))}}}),c.replace(b)},[g,y,b,c,i,R,C]),g||!y?s.jsx(M,{}):s.jsxs(_,{sidePanePersistKey:N,children:[!0===r.enabled&&s.jsx(T,{}),s.jsx(f,{})]})}const G=b;export{N as EPITAXY_SIDE_PANE_PERSIST_KEY,x as EpitaxyAppsRoute,y as EpitaxyArtifactRoute,g as EpitaxyDevRoute,$ as EpitaxyGroupLayoutRoute,h as EpitaxyProjectRoute,E as EpitaxyProjectsBrowseRoute,G as EpitaxyRoute,C as EpitaxyScheduledDetailRoute,k as EpitaxyScheduledNewRoute,R as EpitaxyScheduledRoute,w as EpitaxyTasksRoute};
