1import{f as y}from"./vendor-vue-BIDZeepx.js";import{C as R}from"./ChromeCard-DkvfllPh.js";import{C as P}from"./ChromeButton-DmiFifbd.js";import{i as N,af as V,k as E,_ as F}from"./index-BNPflmqD.js";import{f as z,s as D}from"./creatorMcpApi-BHO8QA4S.js";import{c as H}from"./creatorMcpHandoff-CSxJdcxm.js";import{k as T,r as d,c as m,w as $,_ as G,y as o,C as k,A as I,u as f,D as i,K as t,z as n,L as g,G as s,H as h,Q as b,J as _}from"./vendor-misc-5pJBpqhN.js";const J={class:"mcp-card__head"},K={key:0,class:"mcp-card__badge"},Q={key:1,class:"mcp-card__badge mcp-card__badge--on"},j={key:2,class:"mcp-card__badge"},q={key:0,class:"mcp-card__muted"},O={class:"mcp-card__lead"},W={class:"mcp-card__url"},X=["title"],Y={key:0,class:"mcp-card__copied",role:"status"},Z={class:"mcp-card__hint"},ee={class:"mcp-card__footer"},ae={key:2,class:"mcp-card__error"},te=T({__name:"CreatorMcpCard",props:{context:{default:"other"},active:{type:[Boolean,null],default:null},loading:{type:[Boolean,null],default:null}},setup(w){const a=w,U=N(),r=d(!0),c=d(!1),p=d(!1),v=d(!1),u=d(""),B=m(()=>a.active!==null||a.loading!==null),x=m(()=>a.loading!==null&&a.loading!==void 0?!!a.loading:r.value),C=m(()=>a.active!==null&&a.active!==void 0?!!a.active:c.value),M=m(()=>V());async function L(){if(B.value&&a.active!==null){r.value=!1;return}r.value=!0;try{const l=await z();c.value=l.active}catch{c.value=!1}finally{r.value=!1}}async function S(){p.value=!0,u.value="";try{const l=await D();if(l.active){c.value=!0;return}if(l.checkout_url){window.location.href=l.checkout_url;return}u.value="Checkout is not available yet. Please try again shortly."}catch(l){u.value=E(l,"Could not start checkout.")}finally{p.value=!1}}async function A(){await H()&&(v.value=!0,setTimeout(()=>v.value=!1,2500))}return $(()=>[a.active,a.loading],()=>{a.active!==null&&a.active!==void 0&&(c.value=!!a.active),a.loading===!1&&(r.value=!1)}),G(()=>{new URLSearchParams(window.location.search).get("mcp")==="subscribed"&&(c.value=!0,r.value=!1),!B.value||a.active===null?L():(r.value=!!a.loading,a.active!==null&&(c.value=!!a.active))}),(l,e)=>(o(),k(R,{class:I(["mcp-card",{"mcp-card--cs":f(U)}])},{default:i(()=>[t("div",J,[e[0]||(e[0]=t("div",null,[t("p",{class:"mcp-card__kicker"},"Claude connector"),t("h2",{class:"mcp-card__title"},"CreatorSense MCP")],-1)),x.value?(o(),n("span",K,"â¦")):C.value?(o(),n("span",Q,"Pro")):(o(),n("span",j,"Free"))]),x.value?(o(),n("p",q,"Checking your planâ¦")):(o(),n(g,{key:1},[t("p",O,[C.value?(o(),n(g,{key:0},[s(" Pro is active. Paste the URL into Claude, sign in, then ask about your real numbers. ")],64)):(o(),n(g,{key:1},[e[1]||(e[1]=s(" Free covers platforms, profile, and revenue summary in Claude. ",-1)),e[2]||(e[2]=t("strong",null,"Pro ($10/mo)",-1)),e[3]||(e[3]=s(" adds tax, forecasts, audience, content tools, and higher limits. ",-1))],64))]),e[9]||(e[9]=t("ol",{class:"mcp-card__steps"},[t("li",null,[s("Claude â "),t("strong",null,"Settings â Connectors â Add custom connector")]),t("li",null,"Paste the URL below and sign in with CreatorSense"),t("li",null,"Ask Claude about money, views, or what to do next")],-1)),t("div",W,[t("code",{title:M.value},h(M.value),9,X),b(P,{variant:"primary",onClick:A},{default:i(()=>[s(h(v.value?"Copied":"Copy URL"),1)]),_:1})]),v.value?(o(),n("p",Y," Copied â open Claude and paste as a custom connector. ")):_("",!0),t("p",Z,[e[5]||(e[5]=s(" Claude only sees platforms youâve linked. ",-1)),b(f(y),{to:"/connect-platforms"},{default:i(()=>[...e[4]||(e[4]=[s("Connect platforms",-1)])]),_:1})]),t("div",ee,[C.value?_("",!0):(o(),k(P,{key:0,variant:"primary",loading:p.value,disabled:p.value,onClick:S},{default:i(()=>[...e[6]||(e[6]=[s(" Upgrade to Pro â $10/mo ",-1)])]),_:1},8,["loading","disabled"])),b(f(y),{class:"mcp-card__link",to:"/account/billing"},{default:i(()=>[...e[7]||(e[7]=[s("Billing",-1)])]),_:1}),w.context!=="home"?(o(),k(f(y),{key:1,class:"mcp-card__link",to:"/home"},{default:i(()=>[...e[8]||(e[8]=[s("Home",-1)])]),_:1})):_("",!0),u.value?(o(),n("span",ae,h(u.value),1)):_("",!0)])],64))]),_:1},8,["class"]))}}),ue=F(te,[["__scopeId","data-v-f3e51687"]]);export{ue as C};
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.