1import{i as Ne,j as e,u as Te,o as je,r as l,L as b,Q as Ce,V as ve,W as Re,Y as ye}from"./index-BIerKCBe.js";import{e as Se,a as we,C as Pe,E as Ie,I as $}from"./createProduct-kT5JpdVO.js";import ke from"./TreatmentStudio-D3i7yHFA.js";import{p as _e}from"./treatmentAdapter-Cwmc53Uv.js";import{c as Fe}from"./customerPackageAdapter-DO5piYvc.js";import{c as De}from"./customerCastAdapter-EKYtONNz.js";import Le from"./ChooseYourCast-BF7H-rWs.js";import Ue from"./CustomerRightsWorkspace-Be71E-ZB.js";import"./apiErrorDetail-CnOLnpLC.js";import"./customerRightsAdapter-DGvrmrTr.js";import"./participantConsentAdapter-BWXsBk4t.js";const Ve={15:"QUICK_IMPACT",30:"SOCIAL_AD",60:"STORY_SPOT",90:"CINEMATIC_FEATURETTE",180:"PREMIUM_SHORT"},Oe={"9:16":"VERTICAL_9_16","4:5":"SOCIAL_4_5","1:1":"SQUARE_1_1","16:9":"LANDSCAPE_16_9","2.39:1":"CINEMATIC_2_39_1"};function Ae(c){var T;const n=c.creativeBrief||{},t=n.selection||{},d=n.idea||{},r=n.content||{},N=n.productSpecific||{};return{...$,productType:c.project.productType,duration:Ve[t.targetDurationSeconds]||t.durationPreset||$.duration,platform:((T=t.platformTargets)==null?void 0:T[0])||"CelestialTV",aspectRatio:Oe[t.aspectRatio]||$.aspectRatio,audience:d.audience||"",objective:d.purpose||"",emotion:d.desiredEmotion||"",viewerAction:d.desiredViewerAction||d.callToAction||"",dialogueMode:r.dialogueMode||"DIALOGUE",captionsAndText:r.captionsRequested||r.onScreenTextRequested?"Requested":"",requiredWording:Array.isArray(d.requiredWording)?d.requiredWording.join(` 2`):d.requiredWording||"",restrictions:Array.isArray(d.restrictions)?d.restrictions.join(` 3`):d.restrictions||"",deliverablePackage:t.deliverablePackage||"MASTER",typeSpecific:{...Ie,...N}}}function Y(c){return c.replaceAll("_"," ").toLowerCase().replace(/\b\w/g,n=>n.toUpperCase())}function Be({adapter:c,detail:n}){var r,N;const[t,d]=l.useState(()=>Ae(n));return e.jsxs(e.Fragment,{children:[e.jsx(we,{value:t,onChange:d}),e.jsx(Pe,{adapter:c,launchIntake:t,initialIdea:((N=(r=n.creativeBrief)==null?void 0:r.idea)==null?void 0:N.customerIdeaText)||"",resumeDetail:n})]})}function ie(c,n,t){const d=c==null?void 0:c.verdicts.customerApprovalStatus;return d==="APPROVED"?{stage:"Creative approval recorded",action:"View approved Treatment"}:d==="CHANGES_REQUESTED"?{stage:"Changes requested",action:"Review Treatment"}:d==="REJECTED"?{stage:"Treatment rejected",action:"Review Treatment"}:c?{stage:"Treatment ready for review",action:"Review Treatment"}:(t==null?void 0:t.developmentStatus)==="QUEUED"?{stage:"Treatment queued",action:"View progress"}:(t==null?void 0:t.developmentStatus)==="IN_PROGRESS"?{stage:"Treatment in development",action:"View progress"}:(t==null?void 0:t.developmentStatus)==="FAILED_RETRYABLE"?{stage:"Treatment development interrupted",action:"Retry available"}:(t==null?void 0:t.safeFailureCode)==="REFUSED_BRIEF_MISMATCH"?{stage:"Treatment refused â it did not match your brief",action:"Return to Brief"}:(t==null?void 0:t.developmentStatus)==="FAILED_FINAL"?{stage:"Treatment development stopped",action:"View required action"}:(t==null?void 0:t.developmentStatus)==="BLOCKED"?{stage:"Treatment development blocked",action:"View required action"}:{stage:Y(n.state),action:n.nextAction||"Continue Creative Brief"}}function oe(c){return`?review=treatment&treatmentId=${encodeURIComponent(c.identity.treatmentId)}&treatmentVersion=${c.identity.treatmentVersion}`}function Me({adapter:c,treatmentAdapter:n}){var y;const[t,d]=l.useState(null),[r,N]=l.useState({}),[T,g]=l.useState({}),[w,R]=l.useState(null);return l.useEffect(()=>{let s=!0;return c.listCustomerProjects().then(async f=>{if(!s)return;if(!f.ok){R(f.message);return}d(f.data);const j=await Promise.all(f.data.map(async E=>{const m=n.loadDevelopmentStatus?await n.loadDevelopmentStatus(E.projectDraftId):null,k=m!=null&&m.ok&&m.data.developmentStatus==="SUCCEEDED"&&m.data.currentTreatmentId&&m.data.currentTreatmentVersion?{treatmentId:m.data.currentTreatmentId,treatmentVersion:m.data.currentTreatmentVersion}
3:void 0,P=await n.loadTreatment(E.projectDraftId,k);return[E.projectDraftId,P.ok?P.data:null,m!=null&&m.ok?m.data:null]}));s&&(N(Object.fromEntries(j.map(([E,m])=>[E,m]))),g(Object.fromEntries(j.map(([E,,m])=>[E,m]))))}),()=>{s=!1}},[c,n]),e.jsx("main",{className:"min-h-screen bg-[#08080d] px-6 py-16 text-[#eee8dd]","data-testid":"customer-project-home",children:e.jsxs("div",{className:"mx-auto max-w-5xl",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.22em] text-[#c8a96e]",children:"CelestialTV"}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-end justify-between gap-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-[Cinzel,Georgia,serif] text-4xl",children:"Your projects"}),e.jsx("p",{className:"mt-3 text-[#aaa397]",children:"Continue a Creative Brief from any signed-in device."})]}),((y=Re())==null?void 0:y.emailVerified)===!1?e.jsx("p",{role:"alert","data-testid":"create-verification-required",className:"max-w-sm border border-[#66522d] bg-[#181308] p-3 text-sm text-[#d7bd80]",children:ye("VERIFICATION_REQUIRED")}):e.jsx(b,{className:"rounded bg-[#c8a96e] px-5 py-3 font-bold text-[#090907]",to:"/create?new=1",children:"Create a new project"})]}),w?e.jsxs("div",{role:"alert",className:"mt-10 border border-[#824a46] bg-[#251110] p-5 text-[#f2b5ae]",children:["Projects could not be loaded. ",w]}):null,!w&&t===null?e.jsx("div",{role:"status",className:"mt-10 text-[#aaa397]",children:"Loading your projectsâ¦"}):null,(t==null?void 0:t.length)===0?e.jsxs("section",{className:"mt-10 border border-[#34333d] bg-[#101016] p-8",children:[e.jsx("h2",{className:"text-xl",children:"No projects yet"}),e.jsx("p",{className:"mt-2 text-[#aaa397]",children:"Choose a product to start your first Creative Brief."}),e.jsx(b,{className:"mt-5 inline-block text-[#d7bd80] underline",to:"/create",children:"Choose a product"})]}):null,e.jsx("div",{className:"mt-10 grid gap-4",children:t==null?void 0:t.map(s=>{const f=r[s.projectDraftId],j=ie(f,s,T[s.projectDraftId]),E=f?`/projects/${encodeURIComponent(s.projectDraftId)}${oe(f)}`:`/projects/${encodeURIComponent(s.projectDraftId)}`;return e.jsx("article",{className:"border border-[#34333d] bg-[#101016] p-6",children:e.jsxs("div",{className:"flex flex-wrap justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-[#c8a96e]",children:Y(s.productType)}),e.jsx("h2",{className:"mt-2 text-2xl",children:s.title||`${Y(s.productType)} project`}),e.jsxs("p",{className:"mt-3 text-sm text-[#aaa397]",children:[j.stage," · Updated ",new Date(s.updatedAt).toLocaleString()]}),e.jsxs("p",{className:"mt-2 text-xs uppercase tracking-wider text-[#8e887e]",children:["Rights readiness: ",s.rightsReadinessState.replaceAll("_"," ").toLowerCase()," · Nothing is charged or produced until you approve it"]})]}),e.jsx(b,{className:"self-center text-[#d7bd80] underline",to:E,children:j.action})]})},s.projectDraftId)})})]})})}function qe({adapter:c,treatmentAdapter:n,packageAdapter:t,castAdapter:d,projectDraftId:r}){var ne;const N=Te(),[T]=je(),[g,w]=l.useState(null),[R,y]=l.useState(null),[s,f]=l.useState(null),[j,E]=l.useState(null),[m,k]=l.useState(!1),[P,le]=l.useState(null),[u,_]=l.useState(void 0),[V,I]=l.useState(null),[o,O]=l.useState(null),[Q,G]=l.useState(!1),[K,W]=l.useState(!1),[H,z]=l.useState(null),[p,A]=l.useState(null),[B,F]=l.useState(null),[ce,D]=l.useState(!1),[M,q]=l.useState(null),[J,X]=l.useState(!1),[L,Z]=l.useState(null),[ee,te]=l.useState(null);l.useEffect(()=>{let a=!0;return Promise.all([c.loadCustomerProject(r),n.loadDevelopmentStatus?n.loadDevelopmentStatus(r):Promise.resolve(null),t.discover(r),t.loadCompilationStatus?t.loadCompilationStatus(r):Promise.resolve(null),t.loadFreePreview?t.loadFreePreview(r):Promise.resolve(null)]).then(async([i,x,U,S,C])=>{if(C!=null&&C.ok&&(D(C.data.available===!0),q(C.data.preview),te(C.data.cast&&C.data.cast.ready===!1?C.data.cast.message:null)),!a)return;i.ok?w(i.data):le(i.code==="NOT_FOUND"?"This project could not be found.":i.message),x&&!x.ok&&E(x.message);const v=x!=null&&x.ok?x.data:null;f(v);const be=(v==null?void 0:v.developmentStatus)==="SUCCEEDED"&&v.currentTreatmentId&&v.currentTreatmentVersion?{treatmentId:v.currentTreatmentId,treatmentVersion:v.currentTreatmentVersion}:void 0,ge=await n.loadTreatment(r,be);a&&(y(ge),U.ok?_(U.data):(_(null),U.code!=="NOT_FOUND"&&I(U.message)),S!=null&&S.ok?O(S.data):S&&S.code!=="NOT_FOUND"&&I(S.message))}),()=>{a=!1}},[c,t,r,n]);const de=u?`${u.packageId}:${u.packageVersion}`:null;l.useEffect(()=>{let a=!0;return A(null),F(null),!u||!t.loadCheckoutPrerequisites?()=>{a=!1}:(t.loadCheckoutPrerequisites(r,u.packageId,u.packageVersion).then(i=>{a&&(i.ok?A(i.data):F("message"in i&&i.message?i.message:"Celestial could not confirm whether checkout is open."))}),()=>{a=!1})},[t,de,r]);const ue=l.useMemo(()=>({...c,submitForTreatment:async a=>{const i=await c.submitForTreatment(a);if(i.ok){f(i.data.treatmentDevelopment);const x=i.data.treatmentDevelopment;x.developmentStatus==="SUCCEEDED"&&x.currentTreatmentId&&x.currentTreatmentVersion&&y(await n.loadTreatment(a,{treatmentId:x.currentTreatmentId,treatmentVersion:x.currentTreatmentVersion}))}else if(n.loadDevelopmentStatus){const x=await n.loadDevelopmentStatus(a);x.ok&&f(x.data)}return i}}),[c,n]);async function me(){if(!n.retryTreatmentDevelopment)return;k(!0);const a=await n.retryTreatmentDevelopment(r);if(k(!1),!a.ok){E(a.message);return}f(a.data),a.data.developmentStatus==="SUCCEEDED"&&a.data.currentTreatmentId&&a.data.currentTreatmentVersion&&y(await n.loadTreatment(r,{treatmentId:a.data.currentTreatmentId,treatmentVersion:a.data.currentTreatmentVersion}))}async function xe(){if(u&&t.loadCheckoutPrerequisites){const i=await t.loadCheckoutPrerequisites(r,u.packageId,u.packageVersion);i.ok?(A(i.data),F(null)):F("message"in i&&i.message?i.message:"Celestial could not confirm whether checkout is open.")}if(!t.loadFreePreview)return;const a=await t.loadFreePreview(r);a.ok&&(D(a.data.available===!0),q(a.data.preview),te(a.data.cast&&a.data.cast.ready===!1?a.data.cast.message:null))}async function he(){if(!t.requestFreePreview)return;X(!0),Z(null);const a=await t.requestFreePreview(r);if(X(!1),!a.ok){Z(a.message),D(!1);return}q(a.data.preview),D(!1)}async function fe(){if(!u||!t.startProductionCheckout||(p==null?void 0:p.ready)!==!0)return;W(!0),z(null);const a=await t.startProductionCheckout(r,u.packageId,u.packageVersion,"CTV_SCENE_30_MASTER_V1");if(W(!1),!a.ok){z(a.message);return}window.location.assign(a.data.url)}async function pe(){if(!h||!t.retryCompilation)return;G(!0);const a=await t.retryCompilation(r,h.identity.treatmentId,h.identity.treatmentVersion);if(G(!1),!a.ok){I(a.message);return}O(a.data);const i=await t.discover(r);
3i.ok&&_(i.data)}if(P)return e.jsxs("main",{className:"min-h-screen bg-[#08080d] p-12 text-[#eee8dd]",children:[e.jsx("div",{role:"alert",children:P}),e.jsx(b,{to:"/projects",children:"Back to projects"})]});if(!g||!R)return e.jsx("main",{className:"min-h-screen bg-[#08080d] p-12 text-[#aaa397]",role:"status",children:"Loading your projectâ¦"});const h=R.ok?R.data:null,Ee=T.get("review")==="treatment";if(T.get("review")==="rights")return e.jsxs("main",{className:"min-h-screen bg-[#08080d] px-4 py-10",children:[e.jsx("div",{className:"mx-auto max-w-5xl",children:e.jsx(b,{className:"text-[#d7bd80] underline",to:`/projects/${encodeURIComponent(r)}`,children:"â Back to project"})}),e.jsx(Ue,{projectDraftId:r})]});if(Ee&&h)return e.jsx("main",{className:"min-h-screen bg-[#08080d] px-4 py-10",children:e.jsx(ke,{adapter:n,projectDraftId:r,onDecisionRecorded:a=>{y({ok:!0,data:a,persisted:!0}),t.discover(r).then(i=>{i.ok?(_(i.data),I(null)):I(i.message)}),t.loadCompilationStatus&&t.loadCompilationStatus(r).then(i=>{i.ok&&O(i.data)})},onReturnToBrief:()=>N(`/projects/${encodeURIComponent(r)}`)})});const se=ie(h,g.project,s),ae=g.project.productionPaymentState==="PAID",re=T.get("payment");return e.jsxs("main",{className:"min-h-screen bg-[#08080d] px-4 py-10",children:[e.jsx("div",{className:"mx-auto mb-5 max-w-5xl",children:e.jsx(b,{className:"text-[#d7bd80] underline",to:"/projects",children:"â Your projects"})}),re==="success"?e.jsx("div",{role:"status",className:"mx-auto mb-5 max-w-5xl border border-[#31563a] bg-[#123021] p-4 text-[#cfe9d6]",children:"Thank you â your payment went through. Celestial is confirming it now; this page updates as soon as the confirmation lands."}):null,re==="cancelled"?e.jsx("div",{role:"status",className:"mx-auto mb-5 max-w-5xl border border-[#66522d] bg-[#181308] p-4 text-[#dbc68f]",children:"Checkout was cancelled. Nothing was charged, and your approved package is unchanged."}):null,e.jsxs("div",{className:"mx-auto mb-5 max-w-5xl border border-[#66522d] bg-[#181308] p-4 text-sm text-[#dbc68f]",children:["Rights readiness: ",(((ne=g.rights)==null?void 0:ne.readiness.state)||g.project.rightsReadinessState).replaceAll("_"," ").toLowerCase(),". This state never grants rights clearance or production authority.",e.jsx(b,{className:"ml-3 underline",to:`/projects/${encodeURIComponent(r)}?review=rights`,children:"Open Rights workspace"})]}),e.jsx(Be,{adapter:ue,detail:g},g.project.projectDraftId),e.jsxs("section",{className:"mx-auto mt-6 max-w-5xl border border-[#66522d] bg-[#181308] p-6 text-[#eee8dd]",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-[#c8a96e]",children:"Treatment"}),e.jsx("h2",{className:"mt-2 text-2xl",children:se.stage}),(s==null?void 0:s.developmentStatus)==="QUEUED"?e.jsx("p",{role:"status",className:"mt-3 text-[#aaa397]",children:"Your exact Creative Brief submission is queued for Treatment development."}):null,(s==null?void 0:s.developmentStatus)==="IN_PROGRESS"?e.jsxs("p",{role:"status",className:"mt-3 text-[#aaa397]",children:["Celestial is developing your Treatment from Brief version ",s.briefVersion,"."]}):null,(s==null?void 0:s.developmentStatus)==="FAILED_RETRYABLE"&&s.retryAllowed||(s==null?void 0:s.developmentStatus)==="BLOCKED"&&s.safeFailureCode==="TREATMENT_DEVELOPMENT_NOT_CONFIGURED"?e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{role:"alert",className:"text-[#f2b5ae]",children:s.safeFailureMessage}),e.jsx("button",{type:"button",disabled:m,onClick:()=>void me(),className:"mt-3 rounded bg-[#c8a96e] px-4 py-2 text-[#090907]",children:m?"Retryingâ¦":"Retry Treatment development"})]}):null,["REFUSED_BRIEF_MISMATCH","TREATMENT_ROSTER_INSUFFICIENT"].includes((s==null?void 0:s.safeFailureCode)||"")?e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{role:"alert",className:"text-[#f2b5ae]",children:s.safeFailureMessage}),e.jsx("a",{className:"mt-3 inline-block rounded bg-[#c8a96e] px-4 py-2 font-bold text-[#090907]",href:`#brief-${encodeURIComponent(r)}`,onClick:a=>{var i;a.preventDefault(),(i=document.getElementById("creative-brief-studio"))==null||i.scrollIntoView({behavior:"smooth"})},children:"Return to Brief"})]}):null,["FAILED_FINAL","BLOCKED"].includes((s==null?void 0:s.developmentStatus)||"")&&!["REFUSED_BRIEF_MISMATCH","TREATMENT_ROSTER_INSUFFICIENT"].includes((s==null?void 0:s.safeFailureCode)||"")&&!((s==null?void 0:s.developmentStatus)==="BLOCKED"&&(s==null?void 0:s.safeFailureCode)==="TREATMENT_DEVELOPMENT_NOT_CONFIGURED")?e.jsx("p",{role:"alert",className:"mt-3 text-[#f2b5ae]",children:(s==null?void 0:s.safeFailureMessage)||"Treatment development requires Celestial support."}):null,j?e.jsx("p",{role:"alert",className:"mt-3 text-[#f2b5ae]",children:j}):null,h?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-3 text-[#aaa397]",children:["Treatment version ",h.identity.treatmentVersion]}),e.jsx(b,{className:"mt-5 inline-block text-[#d7bd80] underline",to:`/projects/${encodeURIComponent(r)}${oe(h)}`,children:se.action})]}):e.jsx("p",{className:"mt-3 text-[#aaa397]",children:R.code==="NO_TREATMENT"?"Your Creative Brief was submitted. Celestial has not presented a Treatment yet.":R.message}),e.jsx("p",{className:"mt-4 text-sm text-[#8e887e]",children:"A Treatment decision does not authorize production."})]}),(h==null?void 0:h.verdicts.customerApprovalStatus)==="APPROVED"?e.jsx(Le,{adapter:d,projectDraftId:r,onCastSaved:()=>void xe()}):null,(h==null?void 0:h.verdicts.customerApprovalStatus)==="APPROVED"?e.jsxs("section",{className:"mx-auto mt-6 max-w-5xl border border-[#31563a] bg-[#0d1b12] p-6 text-[#eee8dd]",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-[#86ca97]",children:"Proposed package"}),e.jsx("h2",{className:"mt-2 text-2xl",children:V?"Package status unavailable":u?u.ver
3sionLabel:(o==null?void 0:o.status)==="QUEUED"?"Package compilation queued":(o==null?void 0:o.status)==="IN_PROGRESS"?"Package compilation in progress":["FAILED_FINAL","BLOCKED"].includes((o==null?void 0:o.status)||"")?"Package compilation requires attention":(o==null?void 0:o.status)==="FAILED_RETRYABLE"?"Package compilation interrupted":"Package not requested"}),V?e.jsxs("p",{role:"alert",className:"mt-3 text-[#f2b5ae]",children:["Package status could not be loaded. ",V]}):u?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-3 text-[#aaa397]",children:["Package version ",u.packageVersion," · ",u.packageStatus.replaceAll("_"," ")]}),e.jsx(b,{className:"mt-5 inline-block text-[#d7bd80] underline",to:`/projects/${encodeURIComponent(r)}/packages/${encodeURIComponent(u.packageId)}/versions/${u.packageVersion}`,children:u.sourcePackageVersion?"Review refined package":"Review proposed package"}),M?e.jsxs("div",{className:"mt-5 border border-[#66522d] bg-[#181308] p-4",children:[e.jsx("p",{className:"font-bold text-[#eee8dd]",children:Ce}),M.url?e.jsx("video",{className:"mt-3 w-full max-w-xl",src:M.url,controls:!0,controlsList:"nodownload",disablePictureInPicture:!0,playsInline:!0}):null,e.jsx("p",{className:"mt-2 text-sm text-[#dbc68f]",children:"This preview is available for 72 hours."}),ae?null:e.jsx("p",{className:"mt-2 text-sm text-[#dbc68f]",children:"Love it? Unlock the full 30-second commercial for $99."})]}):ee?e.jsx("p",{role:"status","data-testid":"preview-cast-block",className:"mt-5 text-[#dbc68f]",children:ee}):ce?e.jsxs("div",{className:"mt-5",children:[e.jsx("button",{type:"button",disabled:J,onClick:()=>void he(),className:"rounded border border-[#c8a96e] px-5 py-3 font-bold text-[#d7bd80] disabled:opacity-40",children:J?"Making your previewâ¦":ve}),L?e.jsx("p",{role:"alert",className:"mt-2 text-[#f2b5ae]",children:L}):null]}):L?e.jsx("p",{role:"alert",className:"mt-5 text-[#f2b5ae]",children:L}):null,ae?e.jsxs("div",{className:"mt-5 border border-[#31563a] bg-[#123021] p-4",children:[e.jsx("p",{className:"font-bold text-[#cfe9d6]",children:"Payment received â your production is with Celestial."}),e.jsx("p",{className:"mt-2 text-sm text-[#aaa397]",children:"Payment confirms the commission. Celestial authorizes the build separately; nothing renders on payment alone."})]}):e.jsxs("div",{className:"mt-5",children:[e.jsx("button",{type:"button","data-testid":"proceed-to-production",disabled:K||(p==null?void 0:p.ready)!==!0,"aria-disabled":(p==null?void 0:p.ready)!==!0,onClick:()=>void fe(),className:"rounded bg-[#c8a96e] px-5 py-3 font-bold text-[#090907] disabled:opacity-40",children:K?"Opening secure checkoutâ¦":"Proceed to production â $99"}),p&&!p.ready?e.jsxs("div",{className:"mt-2","data-testid":"checkout-locked",children:[e.jsx("p",{className:"text-sm text-[#dbc68f]",children:"Your package is being reviewed by Celestial. We'll email you when checkout opens."}),e.jsx("ul",{"data-testid":"checkout-prerequisites",className:"mt-2 list-disc pl-5 text-sm text-[#dbc68f]",children:p.unmet.map(a=>e.jsx("li",{children:a.message},a.code))})]}):null,!p&&!B?e.jsx("p",{role:"status",className:"mt-2 text-sm text-[#aaa397]",children:"Checking whether checkout is open for this packageâ¦"}):null,B?e.jsxs("p",{role:"alert",className:"mt-2 text-[#f2b5ae]",children:["Checkout stays closed: ",B]}):null,e.jsxs("p",{className:"mt-2 text-sm text-[#aaa397]",children:["Card payment is handled by Stripe. Paying commissions this exact package version; it does not authorize a render, clear rights, or start a build on its own. ",e.jsx(b,{className:"underline",to:"/pricing",children:"See pricing"}),"."]}),H?e.jsx("p",{role:"alert",className:"mt-2 text-[#f2b5ae]",children:H}):null]})]}):(o==null?void 0:o.status)==="FAILED_RETRYABLE"?e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{role:"alert",className:"text-[#f2b5ae]",children:o.safeFailureMessage}),e.jsx("button",{disabled:!o.retryAllowed||Q,onClick:()=>void pe(),className:"mt-3 rounded bg-[#c8a96e] px-4 py-2 text-[#090907]",children:Q?"Retryingâ¦":"Retry package compilation"})]}):["FAILED_FINAL","BLOCKED"].includes((o==null?void 0:o.status)||"")?e.jsx("p",{role:"alert",className:"mt-3 text-[#f2b5ae]",children:(o==null?void 0:o.safeFailureMessage)||"Package compilation requires Celestial support."}):e.jsx("p",{role:"status",className:"mt-3 text-[#aaa397]",children:(o==null?void 0:o.status)==="QUEUED"?"Your exact approved Treatment is queued for proposed package compilation.":(o==null?void 0:o.status)==="IN_PROGRESS"?"Celestial is compiling the exact approved Treatment into a proposed package.":"No package compilation operation has been recorded."})]}):null]})}function tt({adapter:c=Se,treatmentAdapter:n=_e,packageAdapter:t=Fe,castAdapter:d=De}){const{projectDraftId:r}=Ne();return r?e.jsx(qe,{adapter:c,treatmentAdapter:n,packageAdapter:t,castAdapter:d,projectDraftId:r}):e.jsx(Me,{adapter:c,treatmentAdapter:n})}export{tt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.