PageSourceSearch

https://actify-ai.com/assets/ReferralsPage-C57BfI_c.js

js actify-ai.com collected 2026-09-24 14:38:19 UTC 7,193 bytes, 1 lines download raw bytes

1import{r as E,j as r}from"./react-vendor-CuJVmPYD.js";import{d as g,t as D,B as T}from"./index-DhVmSE3o.js";import{c as S,b as k,a as $,C as R}from"./card-D-WCjzEC.js";import{b as I,a as L}from"./ReferralContext-B5a0sv-K.js";import{m as F,n as U,l as z,k as A}from"./tooltip-BF7TRerI.js";import{C as O}from"./check-D3DFfnWs.js";import{C as P}from"./copy-DQYqSeJK.js";import{S as Y}from"./spinner-B6jy0Mb-.js";import{S as C}from"./skeleton-DzgEGLB4.js";import{M as B}from"./message-circle-D-wOuuh0.js";import{E as M}from"./external-link-d-2nn6uh.js";import{C as V}from"./circle-alert-Bt7qw3gw.js";import"./framer-motion-CF1VqLLN.js";import"./firebase-aYMbDfN4.js";import"./react-query-TPcGXxeN.js";import"./ui-utils-BznqKjY6.js";import"./index-DNxMw_xr.js";function W(s){const e=g.c(25),{refId:a,disabled:i,className:t}=s,[l,d]=E.useState(!1);let m;e[0]!==a?(m=a?I(a):"",e[0]=a,e[1]=m):m=e[1];const n=m;let j;e[2]!==n?(j=async()=>{if(n)try{await navigator.clipboard.writeText(n),d(!0),D.success("Referral link copied to clipboard"),setTimeout(()=>d(!1),2e3)}catch{D.error("Failed to copy link")}},e[2]=n,e[3]=j):j=e[3];const p=j,u=`flex-1 min-w-0 h-9 inline-flex items-center px-3 rounded-[var(--radius-md)] border border-[var(--border-subtle)] bg-[var(--surface-sunken)] font-mono text-sm text-[var(--text-primary)] truncate select-all cursor-text outline-none focus-visible:shadow-[0_0_0_1.5px_var(--accent-focus-ring)] ${i?"opacity-50 pointer-events-none select-none":""}`;let o;e[4]!==n||e[5]!==u?(o=r.jsx("div",{role:"textbox","aria-readonly":"true","aria-label":"Referral link",tabIndex:0,className:u,children:n}),e[4]=n,e[5]=u,e[6]=o):o=e[6];const b=!n||i,h=`inline-flex transition-all duration-150 ease-out ${l?"scale-100":"scale-90"}`;let c;e[7]!==l?(c=l?r.jsx(O,{className:"h-4 w-4 text-[var(--status-success)]"}):r.jsx(P,{className:"h-4 w-4"}),e[7]=l,e[8]=c):c=e[8];let x;e[9]!==h||e[10]!==c?(x=r.jsx("span",{className:h,children:c}),e[9]=h,e[10]=c,e[11]=x):x=e[11];let f;e[12]!==p||e[13]!==b||e[14]!==x?(f=r.jsx(F,{asChild:!0,children:r.jsx(T,{type:"button",variant:"outline",size:"icon",onClick:p,disabled:b,"aria-label":"Copy referral link",children:x})}),e[12]=p,e[13]=b,e[14]=x,e[15]=f):f=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsx(U,{side:"top",children:"Copy referral link"}),e[16]=_):_=e[16];let v;e[17]!==f?(v=r.jsxs(z,{children:[f,_]}),e[17]=f,e[18]=v):v=e[18];let y;e[19]!==v||e[20]!==o?(y=r.jsxs("div",{className:"flex gap-2",children:[o,v]}),e[19]=v,e[20]=o,e[21]=y):y=e[21];let w;return e[22]!==t||e[23]!==y?(w=r.jsx("div",{className:t,children:y}),e[22]=t,e[23]=y,e[24]=w):w=e[24],w}function q(){const s=g.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(C,{className:"h-5 w-32"}),r.jsx(C,{className:"h-6 w-20 rounded-full"})]}),s[0]=e):e=s[0];let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsxs("div",{className:"rounded-[var(--radius-lg)] border-[0.5px] border-[var(--border-default)] bg-[var(--surface-elevated)] p-6 space-y-4",children:[e,r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsx(C,{className:"h-24 w-24 rounded-full"}),r.jsx(C,{className:"h-9 w-32"})]})]}),s[1]=a):a=s[1],a}function N(s){const e=g.c(7),{label:a,value:i}=s;let t;e[0]!==a?(t=r.jsx("span",{className:"text-sm text-[var(--text-secondary)]",children:a}),e[0]=a,e[1]=t):t=e[1];let l;e[2]!==i?(l=r.jsx("span",{className:"text-sm font-medium",children:i}),e[2]=i,e[3]=l):l=e[3];let d;return e[4]!==t||e[5]!==l?(d=r.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-[var(--border-subtle)] last:border-0",children:[t,l]}),e[4]=t,e[5]=l,e[6]=d):d=e[6],d}function de(){const s=g.c(27),{data:e,isLoading:a,refId:i,profileError:t,refetchProfile:l}=L();if(a&&!e){let f;return s[0]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx("div",{className:"space-y-6 pb-12",children:r.jsx(q,{})}),s[0]=f):f=s[0],f}let d;s[1]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx("h1",{className:"text-h2 font-semibold text-text-heading mb-2",children:"Referrals"}),s[1]=d):d=s[1];let m;s[2]!==t||s[3]!==l?(m=t&&r.jsxs("div",{role:"alert",className:"flex items-center justify-between gap-3 rounded-[var(--radius-md)] border border-[var(--status-error)]/30 bg-[var(--status-error)]/8 px-4 py-3 text-sm text-[var(--status-error)]",children:[r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(V,{className:"size-4 shrink-0","aria-hidden":"true"}),"Couldn’t load your profile."]}),r.jsx(T,{size:"sm",variant:"outline",onClick:()=>l(),children:"Try again"})]}),s[2]=t,s[3]=l,s[4]=m):m=s[4];let n;s[5]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs($,{className:"flex flex-row items-center justify-between gap-4",children:[r.jsx(R,{children:"Your referral link"}),r.jsx("span",{className:"text-sm text-[var(--text-secondary)] whitespace-nowrap",children:"You earn 10% on each referral."})]}),s[5]=n):n=s[5];const j=!i;let p;s[6]!==i||s[7]!==j?(p=r.jsx(W,{refId:i,disabled:j}),s[6]=i,s[7]=j,s[8]=p):p=s[8];let u;s[9]!==t||s[10]!==i?(u=!i&&r.jsx("p",{className:"text-sm text-[var(--text-secondary)] mt-2",children:t?"We couldn’t load your referral code.":"You don’t have a referral code yet."}),s[9]=t,s[10]=i,s[11]=u):u=s[11];let o;s[12]!==p||s[13]!==u?(o=r.jsxs(S,{children:[n,r.jsxs(k,{children:[p,u]})]}),s[12]=p,s[13]=u,s[14]=o):o=s[14];let b;s[15]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx($,{children:r.jsx(R,{children:"Referral stats"})}),s[15]=b):b=s[15];let h;s[16]!==e||s[17]!==a||s[18]!==t?(h=r.jsxs(S,{children:[b,r.jsx(k,{children:a?r.jsx("div",{className:"flex justify-center py-8",children:r.jsx(Y,{className:"size-6"})}):e?r.jsxs("div",{className:"space-y-0",children:[r.jsx(N,{label:"Total rewards",value:`$${e.total_rewards.toFixed(2)} USD`}),r.jsx(N,{label:"Available now",value:`$${e.available_now.toFixed(2)} USD`}),r.jsx(N,{label:"Pending (after 30-day hold)",value:`$${e.pending_credit.toFixed(2)} USD`}),r.jsx(N,{label:"Already paid",value:`$${e.amount_already_paid.toFixed(2)} USD`}),r.jsx(N,{label:"Users referred",value:e.number_referred})]}):r.jsx("p",{className:"text-sm text-[var(--text-secondary)] py-2",children:t?"We couldn’t load your referral stats.":"No referral data available."})})]}),s[16]=e,s[17]=a,s[18]=t,s[19]=h):h=s[19];let c;s[20]!==e?(c=e&&e.available_now>0&&r.jsxs(S,{className:"border-[var(--accent-light)]/30 bg-[var(--accent-tint)]",children:[r.jsx($,{children:r.jsx(R,{children:"Claim rewards"})}),r.jsxs(k,{className:"flex flex-col gap-4",children:[r.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:"Open a Discord support ticket to request your payout."}),r.jsx(T,{asChild:!0,children:r.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2",children:[r.jsx(B,{className:"h-4 w-4"}),"Open Discord Server",r.jsx(M,{className:"h-4 w-4"})]})})]})]}),s[20]=e,s[21]=c):c=s[21];let x;return s[22]!==m||s[23]!==o||s[24]!==h||s[25]!==c?(x=r.jsxs("div",{className:"space-y-6 pb-12",children:[d,m,o,h,c]}),s[22]=m,s[23]=o,s[24]=h,s[25]=c,s[26]=x):x=s[26],x}export{de 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.