1import{k as V,r as g,d as R,j as e,C as n,a as i,D as L,m as w,U as C,o as h,p as u,c as d,I as b,b as m,l as re,g as te,n as ae,s as ne}from"./index-BupwEmgm.js";import{T as G,a as z,b as k,c as S}from"./tabs-DCSqtmxv.js";import{toast as F}from"./index-DWSsIHDv.js";import{L as ie}from"./loader-circle-bywfJt-C.js";import{S as le}from"./sparkles-CZRmtvPu.js";import{T as oe}from"./trending-up-gxrm-8D0.js";import{G as D}from"./gift-KCaNFTeI.js";import{C as U}from"./check-CfJfwHKK.js";import{C as H}from"./copy-CAGvGL9b.js";import{S as E}from"./share-2-B8rxrnrG.js";import{u as ce}from"./useMutation-Bor7Z28h.js";import{S as O,a as M,b as B,c as q,d as o}from"./select-BE_BfE1n.js";import{B as x}from"./badge-BQIsryWh.js";import{C as K}from"./circle-alert-B9xTS9cv.js";import{C as de}from"./chart-column-BsqSm6xN.js";import{L as me}from"./link-2-QY7guUd9.js";import{B as xe}from"./book-open-B_Xlk2lf.js";import"./index-BP4mGZh_.js";import"./index-CWzdr2iF.js";import"./index-z7BTQWyD.js";import"./index-Dcum08s_.js";import"./index-DtqUbmXC.js";import"./index-5VGl---o.js";import"./index-DZZvDXV_.js";import"./chevron-down-CZP-y2fV.js";import"./chevron-up-Cw-759n5.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const he=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],ue=V("Facebook",he);/** 7 * @license lucide-react v0.475.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const fe=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],pe=V("Instagram",fe);function je(){const[s,l]=g.useState(null),[c,f]=g.useState(!0),[a,p]=g.useState(!1),[t,N]=g.useState(!1);g.useEffect(()=>{let j=!0;return R.functions.invoke("manageUserReferral",{}).then(I=>{j&&l(I.data)}).catch(()=>{}).finally(()=>{j&&f(!1)}),()=>{j=!1}},[]);const $=()=>{navigator.clipboard.writeText((s==null?void 0:s.deep_link)||"").then(()=>{p(!0),F.success("Referral link copied!"),setTimeout(()=>p(!1),2500)})},P=()=>{navigator.clipboard.writeText((s==null?void 0:s.referral_code)||"").then(()=>{N(!0),F.success("Referral code copied!"),setTimeout(()=>N(!1),2500)})},T=()=>{navigator.clipboard.writeText((s==null?void 0:s.deep_link)||"").then(()=>{F.success("Link copied! Open Instagram and paste it in a post or story."),window.open("https://www.instagram.com/","_blank","noopener,noreferrer")})};if(c)return e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(ie,{className:"w-6 h-6 animate-spin text-secondary"})});if(!s)return e.jsx(n,{className:"border-0 shadow-sm",children:e.jsx(i,{className:"p-8 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Referral stats unavailable. Please try again later."})})});const y=s.referral_count||0,_=s.referral_credits_earned||0,r=s.balance||0,v=y%5,A=y>0&&v===0,Q=A?100:v/5*100,X=A?0:5-v,Z=encodeURIComponent(`I'm using SavvSkout to auto-apply to remote jobs with AI. Join me and get started faster: ${s.deep_link}`),ee=[{icon:E,title:"1. Share your link",desc:"Send your referral link to friends, followers, or your network."},{icon:C,title:"2. They subscribe",desc:"When a friend registers and starts a paid plan, it counts as a referral."},{icon:D,title:"3. Earn free months",desc:"Every 5 paid referrals adds a free month credit to your account automatically."}];return e.jsxs("div",{className:"space-y-5 min-w-0 w-full",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-heading text-3xl font-bold text-foreground",children:"Refer & Earn"}),e.jsx("p",{className:"text-sm text-foreground/70 font-medium",children:"Invite friends â every 5 paid referrals earns you a free month"})]}),s.is_affiliate&&e.jsx(n,{className:"border-2 border-secondary/30 bg-secondary/5",children:e.jsxs(i,{className:"p-4 flex items-start gap-3",children:[e.jsx(L,{className:"w-5 h-5 text-secondary shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:"You're an approved affiliate â you earn cash, not free months"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Your link below is your affiliate tracking link. Referrals who subscribe earn you cash commissions (see the Affiliate Program tab). The stats below reflect your earlier referral-program activity."})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[e.jsx(w.div,{initial:{opacity:0,y:12}
11,animate:{opacity:1,y:0},transition:{duration:.3},children:e.jsx(n,{className:"border-2 border-secondary/20 bg-gradient-to-br from-secondary/5 to-transparent",children:e.jsx(i,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-foreground/70 font-bold uppercase tracking-wide",children:"Total Referrals"}),e.jsx("p",{className:"font-heading text-4xl font-bold text-secondary mt-2",children:y}),e.jsx("p",{className:"text-xs text-foreground/70 font-medium mt-2",children:"Friends who subscribed"})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-secondary/15 flex items-center justify-center border border-secondary/30",children:e.jsx(C,{className:"w-6 h-6 text-secondary"})})]})})})}),e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:e.jsx(n,{className:"border-2 border-accent/20 bg-gradient-to-br from-accent/5 to-transparent",children:e.jsx(i,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-foreground/70 font-bold uppercase tracking-wide",children:"Free Months Earned"}),e.jsx("p",{className:"font-heading text-4xl font-bold text-accent mt-2",children:_}),e.jsx("p",{className:"text-xs text-foreground/70 font-medium mt-2",children:"1 per 5 referrals"})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent/15 flex items-center justify-center border border-accent/30",children:e.jsx(le,{className:"w-6 h-6 text-accent"})})]})})})}),e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:e.jsx(n,{className:"border-2 border-green-500/20 bg-gradient-to-br from-green-500/5 to-transparent",children:e.jsx(i,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-foreground/70 font-bold uppercase tracking-wide",children:"Credit Balance"}),e.jsxs("p",{className:"font-heading text-4xl font-bold text-green-600 mt-2",children:["$",r.toFixed(2)]}),e.jsx("p",{className:"text-xs text-foreground/70 font-medium mt-2",children:"Applied to your account"})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-500/15 flex items-center justify-center border border-green-500/30",children:e.jsx(L,{className:"w-6 h-6 text-green-600"})})]})})})})]}),e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{children:e.jsxs(u,{className:"font-heading text-base flex items-center gap-2",children:[e.jsx(oe,{className:"w-4 h-4 text-secondary"})," Progress to Next Free Month"]})}),e.jsxs(i,{children:[e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-2",children:[e.jsxs("span",{children:[v," of 5 referrals this cycle"]}),e.jsx("span",{className:A?"text-secondary font-semibold":"",children:A?"ð Reward unlocked!":`${X} more to unlock`})]}),e.jsx("div",{className:"h-3 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-secondary transition-all duration-500",style:{width:`${Q}%`}})})]})]}),e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{children:e.jsxs(u,{className:"font-heading text-base flex items-center gap-2",children:[e.jsx(D,{className:"w-4 h-4 text-secondary"})," Your Referral Link"]})}),e.jsxs(i,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(d,{className:"text-sm",children:"Referral Code"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(b,{value:s.referral_code||"",readOnly:!0,className:"font-mono font-bold text-secondary"}),e.jsx(m,{variant:"outline",onClick:P,className:"shrink-0",children:t?e.jsx(U,{className:"w-4 h-4 text-green-600"}):e.jsx(H,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{children:[e.jsx(d,{className:"text-sm",children:"Shareable Link"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(b,{value:s.deep_link||"",readOnly:!0,className:"font-mono text-xs"}),e.jsx(m,{variant:"outline",onClick:$,className:"shrink-0",children:a?e.jsx(U,{className:"w-4 h-4 text-green-600"}):e.jsx(H,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Friends who register through this link are tracked automatically."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("a",{href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(s.deep_link)}`,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:e.jsxs(m,{variant:"outline",className:"w-full gap-1.5",children:[e.jsx(E,{className:"w-4 h-4"})," LinkedIn"]})}),e.jsx("a",{href:`https://twitter.com/intent/tweet?text=${Z}`,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:e.jsxs(m,{variant:"outline",className:"w-full gap-1.5",children:[e.jsx(E,{className:"w-4 h-4"})," Post on X"]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(s.deep_link)}`,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:e.jsxs(m,{variant:"outline",className:"w-full gap-1.5",children:[e.jsx(ue,{className:"w-4 h-4"})," Facebook"]})}),e.jsxs(m,{variant:"outline",onClick:T,className:"flex-1 gap-1.5",children:[e.jsx(pe,{className:"w-4 h-4"})," Instagram"]})]})]})]})]}),e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{children:e.jsx(u,{className:"font-heading text-base",children:"How It Works"})}),e.jsx(i,{children:e.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:ee.map((j,I)=>{const se=j.icon;return e.jsxs("div",{className:"p-4 rounded-lg bg-muted/50",children:[e.jsx(se,{className:"w-5 h-5 text-secondary mb-2"}),e.jsx("p",{className:"text-sm font-bold text-foreground",children:j.title}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:j.desc})]},I)})})})]})]})}function W(){return e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{className:"pb-3",children:e.jsxs(u,{className:"font-heading text-base flex items-center gap-2",children:[e.jsx(K,{className:"w-4 h-4 text-secondary"})," Affiliate Rules"]})}),e.jsx(i,{children:e.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground list-disc list-inside",children:[e.jsxs("li",{children:["All Affiliate Commissions apply only to the ",e.jsx("strong",{className:"text-foreground",children:"1st month subscription"})," of the referred user, payable ",e.jsx("strong",{className:"text-foreground",children:"once"}),", at the end of the 1st billing cycle of the referred user (applicable for all subscription packages: monthly/yearly), under the condition that the referred user ",e.jsx("strong",{className:"text-foreground",children:"DOESN'T cancel"})," the subscription and/or issues a refund request."]}),e.jsxs("li",{children:["Affiliates must comply with ",e.jsx("strong",{className:"text-foreground",children:"Brand Guidelines and messaging"})," (Logo, Story, Tone, Colors, Layers)."]}),e.jsxs("li",{children:["Affiliates must activate in ",e.jsx("strong",{className:"text-foreground",children:"specialized or relevant niches"}),": Freelancing, HR, Remote Jobs, Side Hustles, Online Job Opportunities, Work-From-Home, Wealth, Digital Marketing, Trading, Technology."]}),e.jsxs("li",{children:["The Affiliate ",e.jsx("strong",{className:"text-foreground",children:"MUST have at least 2,000+ followers"})," on any of the following platforms: YouTube, Instagram, TikTok, or Podcasts on relevant content."]})]})})]})}function Y(){return e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{className:"pb-3",children:e.jsxs(u,{className:"font-heading text-base flex items-center gap-2",children:[e.jsx(de,{className:"w-4 h-4 text-secondary"})," Commission Structure ",e.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"(All Applicable)"})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-accent/10 border border-accent/20 mb-1",children:[e.jsx(K,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),e.jsxs("p",{className:"text-xs text-foreground",children:["Commissions apply only to the ",e.jsx("strong",{children:"1st month subscription"})," of the referred user, payable once at the end of the 1st billing cycle, only if the referred user ",e.jsx("strong",{children:"DOESN'T cancel"})," the subscription and/or issues a refund request."]})]}),e.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[e.jsxs("div",{className:"bg-muted px-4 py-2.5 flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm font-bold text-foreground",children:["Standard Subscription ",e.jsx("span",{className:"font-normal text-muted-foreground",children:"($11.99/mo)"})]}),e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"Tiered â both rates apply"})]}),e.jsxs("div",{className:"divide-y divide-border",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-foreground",children:"Referred users 1â30"}),e.jsx(x,{className:"bg-secondary text-white font-bold",children:"10% each"})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-foreground",children:"Referred users 31+"}),e.jsx(x,{className:"bg-secondary text-white font-bold",children:"12% each"})]})]}),e.jsx("div",{className:"px-4 py-2.5 bg-muted/40 border-t border-border",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Example: 60 referrals â 10% Ã 30 + 12% Ã 30 = ",e.jsx("strong",{className:"text-foreground",children:"$35.97 + $43.16 = $79.13"})]})})]}),e.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[e.jsxs("div",{className:"bg-muted px-4 py-2.5 flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm font-bold text-foreground",children:["Premium Subscription ",e.jsx("span",{className:"font-normal text-muted-foreground",children:"($29/mo)"})]}),e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"Tiered â both rates apply"})]}),e.jsxs("div",{className:"divide-y divide-border",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-foreground",children:"Referred users 1â30"}),e.jsx(x,{className:"bg-secondary text-white font-bold",children:"15% each"})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-foreground",children:"Referred users 31+"}),e.jsx(x,{className:"bg-secondary text-white font-bold",children:"20% each"})]})]}),e.jsx("div",{className:"px-4 py-2.5 bg-muted/40 border-t border-border",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Example: 60 referrals â 15% Ã 30 + 20% Ã 30 = ",e.jsx("strong",{className:"text-foreground",children:"$130.50 + $174.00 = $304.50"})]})})]}),e.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[e.jsx("div",{className:"bg-muted px-4 py-2.5",children:e.jsxs("p",{className:"text-sm font-bold text-foreground",children:["Premium Ultra Subscription ",e.jsx("span",{className:"font-normal text-muted-foreground",children:"($49/mo)"})]})}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-foreground",children:"Per subscribed user"}),e.jsx(x,{className:"bg-accent text-accent-foreground font-bold",children:"Flat 25%"})]}),e.jsx("div",{className:"px-4 py-2.5 bg-muted/40 border-t border-border",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Example: 20 referrals = ",e.jsx("strong",{className:"text-foreground",children:"20 Ã $12.25 = $245.00"})]})})]}),e.jsxs("div",{className:"rounded-lg border border-secondary/40 overflow-hidden",children:[e.jsx("div",{className:"bg-secondary/10 px-4 py-2.5",children:e.jsxs("p",{className:"text-sm font-bold text-foreground",children:["VIP Subscription ",e.jsx("span",{className:"font-normal text-muted-foreground",children:"($699/yr)"})]})}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-foreground",children:"Per subscribed user"}),e.jsx(x,{className:"bg-cyan-500 text-white font-bold shadow-sm shadow-cyan-300",children:"Flat 30%"})]}),e.jsx("div",{className:"px-4 py-2.5 bg-muted/40 border-t border-border",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Example: 10 referrals = ",e.jsx("strong",{className:"text-foreground",children:"10 Ã $209.70 = $2,097.00"})]})})]})]})]})}const ge="SavvSkout, 63 Grigore Ionescu St., 023624, Bucharest",J="[email protected]";function be({unsubscribeUrl:s,recipientEmail:l}){return` 12 <hr style="margin-top:32px;border:none;border-top:1px solid #e5e5e5;" /> 13 <p style="font-size:12px;color:#888;margin-top:12px;"> 14 You're receiving this email because ${l} is associated with a SavvSkout account or program. 15 <br/>${ge} 16 <br/>Contact: <a href="mailto:${J}" style="color:#888;">${J}</a> 17 <br/> 18 <a href="${s}" style="color:#888;">Unsubscribe from these emails</a> 19 </p> 20 `}function Ne(s,{unsubscribeUrl:l,recipientEmail:c}){return`${s}${be({unsubscribeUrl:l,recipientEmail:c})}`}function ye({firstName:s,recipientEmail:l,unsubscribeUrl:c}){const f=` 21 <p>Hi ${s},</p> 22 <p>Thanks for applying to the SavvSkout Affiliate Program. We review applications on a rolling basis and check platform, follower count, and niche fit.</p> 23 <p>You'll hear back from us shortly â no action needed on your end right now.</p> 24 <p>â The SavvSkout Partnerships Team</p> 25 `;return{subject:"We've got your SavvSkout affiliate application",html:Ne(f,{unsubscribeUrl:c,recipientEmail:l})}}const ve="https://savvskout.com";function we(s){return`${ve}/email/unsubscribe?a=${encodeURIComponent(s)}`}async function ke({to:s,subject:l,html:c}){await R.functions.invoke("sendEmail",{to:s,subject:l,html:c})}async function Se({affiliate:s}){const{subject:l,html:c}=ye({firstName:s.name,recipientEmail:s.email,unsubscribeUrl:we(s.email)});await ke({to:s.email,subject:l,html:c})}async function Ce(s){try{await Se({affiliate:s})}catch(l){console.error("onAffiliateApplicationSubmitted email failed:",l.message)}}function Te(){var T,y,_;const{user:s}=re(),l=te(),[c,f]=g.useState(!1),[a,p]=g.useState({name:(s==null?void 0:s.full_name)||"",email:(s==null?void 0:s.email)||"",platform:"",followers_count:"",niche:""}),{data:t}=ae({queryKey:["affiliate",s==null?void 0:s.email],queryFn:async()=>(await R.entities.Affiliate.filter({user_email:s==null?void 0:s.email}))[0]||null,enabled:!!(s!=null&&s.email)}),N=ce({mutationFn:r=>R.entities.Affiliate.create({...r,followers_count:parseInt(r.followers_count)||0,user_email:s==null?void 0:s.email,tracking_code:"SVK-"+Math.random().toString(36).substring(2,8).toUpperCase().slice(0,6),status:"pending"}),onSuccess:r=>
25{l.invalidateQueries({queryKey:["affiliate"]}),Ce(r)}}),$=()=>{navigator.clipboard.writeText((t==null?void 0:t.tracking_code)||""),f(!0),setTimeout(()=>f(!1),2e3)},P=()=>{const r=`https://savvskout.com/register?ref=${t==null?void 0:t.tracking_code}`;navigator.clipboard.writeText(r),f(!0),setTimeout(()=>f(!1),2e3)};return t?e.jsxs("div",{className:"space-y-5 min-w-0 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-heading text-3xl font-bold text-foreground",children:"Affiliate Dashboard"}),e.jsx("p",{className:"text-sm text-foreground/70 font-medium",children:"Track referrals, earnings, and access marketing resources"})]}),e.jsx(x,{className:`border text-xs ${t.status==="active"?"bg-green-500/10 text-green-700 border-green-500/20":t.status==="approved"?"bg-secondary/10 text-secondary border-secondary/20":t.status==="suspended"?"bg-destructive/10 text-destructive border-destructive/20":"bg-amber-500/10 text-amber-700 border-amber-500/20"}`,children:(T=t.status)==null?void 0:T.toUpperCase()})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3,delay:0},children:e.jsx(n,{className:"border-2 border-secondary/20 bg-gradient-to-br from-secondary/5 to-transparent",children:e.jsx(i,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-foreground/70 font-bold uppercase tracking-wide",children:"Total Referrals"}),e.jsx("p",{className:"font-heading text-4xl font-bold text-secondary mt-2",children:t.total_referrals||0}),e.jsx("p",{className:"text-xs text-foreground/70 font-medium mt-2",children:"Active signups tracked"})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-secondary/15 flex items-center justify-center border border-secondary/30",children:e.jsx(C,{className:"w-6 h-6 text-secondary"})})]})})})}),e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:e.jsx(n,{className:"border-2 border-green-500/20 bg-gradient-to-br from-green-500/5 to-transparent",children:e.jsx(i,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-foreground/70 font-bold uppercase tracking-wide",children:"Total Earnings"}),e.jsxs("p",{className:"font-heading text-4xl font-bold text-green-600 mt-2",children:["$",(t.total_earnings||0).toFixed(2)]}),e.jsx("p",{className:"text-xs text-foreground/70 font-medium mt-2",children:"Lifetime commissions"})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-500/15 flex items-center justify-center border border-green-500/30",children:e.jsx(L,{className:"w-6 h-6 text-green-600"})})]})})})}),e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:e.jsx(n,{className:"border-2 border-accent/20 bg-gradient-to-br from-accent/5 to-transparent",children:e.jsx(i,{className:"p-5",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-foreground/70 font-bold uppercase tracking-wide",children:"Pending Payout"}),e.jsxs("p",{className:"font-heading text-4xl font-bold text-accent mt-2",children:["$",(t.pending_payout||0).toFixed(2)]}),e.jsx("p",{className:"text-xs text-foreground/70 font-medium mt-2",children:"Ready to withdraw"})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent/15 flex items-center justify-center border border-accent/30",children:e.jsx(ne,{className:"w-6 h-6 text-accent"})})]})})})})]}),e.jsxs(G,{defaultValue:"links",children:[e.jsxs(z,{className:"bg-muted",children:[e.jsx(k,{value:"links",children:"Tracking Links"}),e.jsx(k,{value:"guidelines",children:"Brand Guidelines"}),e.jsx(k,{value:"history",children:"Referral History"})]}),e.jsx(S,{value:"links",className:"mt-4 space-y-4",children:e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{children:e.jsx(u,{className:"font-heading text-base",children:"Your Unique Tracking Code"})}),e.jsxs(i,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(d,{className:"text-sm",children:"Affiliate Code"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(b,{value:t.tracking_code,readOnly:!0,className:"font-mono font-bold text-secondary"}),e.jsx(m,{variant:"outline",onClick:$,className:"shrink-0",children:c?e.jsx(U,{className:"w-4 h-4 text-green-600"}):e.jsx(H,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{children:[e.jsx(d,{className:"text-sm",children:"Deep Link (Direct to Registration)"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(b,{value:`https://savvskout.com/register?ref=${t.tracking_code}`,readOnly:!0,className:"font-mono text-xs"}),e.jsx(m,{variant:"outline",onClick:P,className:"shrink-0",children:e.jsx(me,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Share this link â users land directly on registration with your referral tracked."})]}),e.jsxs("div",{className:"p-3 rounded-lg bg-muted/60 text-xs text-muted-foreground",children:[e.jsxs("p",{className:"font-medium text-foreground mb-1",children:["Platform: ",t.platform," · Niche: ",(y=t.niche)==null?void 0:y.replace("_"," ")]}),"Commissions apply to the 1st month subscription only, payable after the referred user's 1st full billing cycle c
25ompletes without cancellation or refund."]})]})]})}),e.jsx(S,{value:"guidelines",className:"mt-4",children:e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{children:e.jsxs(u,{className:"font-heading text-base flex items-center gap-2",children:[e.jsx(xe,{className:"w-4 h-4 text-secondary"})," Brand Guidelines"]})}),e.jsx(i,{className:"space-y-4 text-sm",children:e.jsxs("div",{className:"p-4 rounded-lg bg-muted/50 space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold mb-1",children:"Brand Name"}),e.jsxs("p",{className:"text-muted-foreground",children:["Always refer to the product as ",e.jsx("strong",{children:"SavvSkout"})," (capital S and K). Developed by ",e.jsx("strong",{children:"PCI Company"}),"."]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold mb-1",children:"Tone & Messaging"}),e.jsx("p",{className:"text-muted-foreground",children:"Professional, empowering, and tech-forward. Emphasize: AI-powered job automation, human control (HITL), security, and time savings."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold mb-1",children:"Brand Colors"}),e.jsxs("div",{className:"flex gap-3 mt-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-[#1e2a45] border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Primary Dark Navy"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-[#2bbfa4] border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Secondary Teal"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-[#f5b731] border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Accent Gold"})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold mb-1",children:"Approved Niches"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:["Freelancing","HR","Remote Jobs","Side Hustles","Online Jobs","Work-From-Home","Wealth","Digital Marketing","Trading","Technology"].map(r=>e.jsx(x,{variant:"outline",className:"text-xs",children:r},r))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold mb-1",children:"Compliance Rules"}),e.jsxs("ul",{className:"text-muted-foreground text-xs space-y-1 list-disc list-inside",children:[e.jsx("li",{children:"Do not make income guarantees or misleading claims"}),e.jsx("li",{children:"Always disclose affiliate relationship per FTC guidelines"}),e.jsx("li",{children:"Use only approved brand assets and messaging"}),e.jsx("li",{children:"Do not spam or use unsolicited outreach"})]})]})]})})]})}),e.jsx(S,{value:"history",className:"mt-4",children:e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{children:e.jsx(u,{className:"font-heading text-base",children:"Referral History"})}),e.jsx(i,{children:(_=t.referral_history)!=null&&_.length?e.jsx("div",{className:"space-y-2",children:t.referral_history.map((r,v)=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:r.user_email}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.subscription_tier," · ",r.date]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-sm font-semibold text-secondary",children:["$",r.commission]}),e.jsx(x,{className:"text-xs",children:r.status})]})]},v))}):e.jsxs("div",{className:"py-8 text-center",children:[e.jsx(C,{className:"w-8 h-8 text-muted-foreground mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"No referrals yet. Share your tracking link to start earning!"})]})})]})})]}),e.jsx(W,{}),e.jsx(Y,{})]}):e.jsxs("div",{className:"max-w-2xl mx-auto space-y-5 min-w-0 w-full",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-heading text-3xl font-bold text-foreground",children:"Join the Affiliate Program"}),e.jsx("p",{className:"text-sm text-foreground/70 font-medium",children:"Earn commissions by referring users to SavvSkout"})]}),e.jsx(W,{}),e.jsx(Y,{}),e.jsxs(n,{className:"border-0 shadow-sm",children:[e.jsx(h,{className:"pb-3",children:e.jsx(u,{className:"font-heading text-base",children:"Apply Now"})}),e.jsx(i,{children:e.jsxs("form",{onSubmit:r=>{r.preventDefault(),N.mutate(a)},className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(d,{children:"Full Name"}),e.jsx(b,{value:a.name,onChange:r=>p({...a,name:r.target.value}),className:"mt-1",required:!0})]}),e.jsxs("div",{children:[e.jsx(d,{children:"Email"}),e.jsx(b,{value:a.email,onChange:r=>p({...a,email:r.target.value}),type:"email",className:"mt-1",required:!0})]}),e.jsxs("div",{children:[e.jsx(d,{children:"Primary Platform"}),e.jsxs(O,{value:a.platform,onValueChange:r=>p({...a,platform:r}),children:[e.jsx(M,{className:"mt-1",children:e.jsx(B,{placeholder:"Select platform"})}),e.jsxs(q,{children:[e.jsx(o,{value:"youtube",children:"YouTube"}),e.jsx(o,{value:"instagram",children:"Instagram"}),e.jsx(o,{value:"tiktok",children:"TikTok"}),e.jsx(o,{value:"podcast",children:"Podcast"}),e.jsx(o,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{children:[e.jsx(d,{children:"Followers / Subscribers Count"}),e.jsx(b,{type:"number",value:a.followers_count,onChange:r=>p({...a,followers_count:r.target.value}),className:"mt-1",placeholder:"e.g. 5000",required:!0}),a.followers_count&&parseInt(a.followers_count)<2e3&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:"Minimum 2,000 followers required"})]}),e.jsxs("div",{children:[e.jsx(d,{children:"Content Niche"}),e.jsxs(O,{value:a.niche,onValueChange:r=>p({...a,niche:r}),children:[e.jsx(M,{className:"mt-1",children:e.jsx(B,{placeholder:"Select niche"})}),e.jsxs(q,{children:[e.jsx(o,{value:"freelancing",children:"Freelancing"}),e.jsx(o,{value:"hr",children:"HR"}),e.jsx(o,{value:"remote_jobs",children:"Remote Jobs"}),e.jsx(o,{value:"side_hustles",children:"Side Hustles"}),e.jsx(o,{value:"online_jobs",children:"Online Job Opportunities"}),e.jsx(o,{value:"work_from_home",children:"Work-From-Home"}),e.jsx(o,{value:"wealth",children:"Wealth"}),e.jsx(o,{value:"digital_marketing",children:"Digital Marketing"}),e.jsx(o,{value:"trading",children:"Trading"}),e.jsx(o,{value:"technology",children:"Technology"})]})]})]}),e.jsx(m,{type:"submit",disabled:!a.name||!a.platform||!a.niche||parseInt(a.followers_count)<2e3||N.isPending,className:"w-full bg-secondary text-secondary-foreground hover:bg-secondary/90 mt-2 disabled:opacity-100",children:N.isPending?"Submitting...":"Apply to Affiliate Program"})]})})]})]})}
25function es(){return e.jsx("div",{className:"space-y-4 min-w-0 w-full",children:e.jsxs(G,{defaultValue:"referral",children:[e.jsxs(z,{className:"bg-muted",children:[e.jsxs(k,{value:"referral",className:"gap-1.5",children:[e.jsx(D,{className:"w-4 h-4"})," Refer & Earn"]}),e.jsxs(k,{value:"affiliate",className:"gap-1.5",children:[e.jsx(C,{className:"w-4 h-4"})," Affiliate Program"]})]}),e.jsx(S,{value:"referral",className:"mt-4 focus-visible:outline-none",children:e.jsx(je,{})}),e.jsx(S,{value:"affiliate",className:"mt-4 focus-visible:outline-none",children:e.jsx(Te,{})})]})})}export{es 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.