PageSourceSearch

https://slantapp.ai/assets/CampaignPresaleLanding-BMMJfIRj.js

js slantapp.ai collected 2026-10-05 15:05:45 UTC 8,312 bytes, 1 lines download raw bytes

1import{R as F,u as E,c as L,r as C,W as w,F as B,j as e,C as c,K as l,N as o,aa as j,bZ as g,B as x,O as R,p as D,a as f,am as q,I as A,S as M,U,aL as Y,A as I,a4 as S,q as K,Q as O}from"./index-tc5-nNLC.js";import{L as u}from"./label-MwGx_WS4.js";import{T as G}from"./textarea-DN2rY_yY.js";import{S as Q,a as W,b as H,c as J,d as i}from"./select-Bsa-6vNv.js";import{s as V}from"./slant-logo-official-BczPicMq.js";import{G as $}from"./gift-CcGpxH7x.js";import{C as z}from"./circle-check-B8vEXYAG.js";import{P as Z}from"./percent-BsbQn71u.js";import"./index-C-y5wYFI.js";import"./chevron-down-DOFZ7rzv.js";import"./chevron-up-1gTexUQn.js";function oe(){var b;const{campaignId:d}=F(),[,h]=E(),{toast:N}=L(),[P,y]=C.useState(!1),[t,m]=C.useState({businessName:"",businessType:"retail",description:"",contactEmail:""}),{data:s,isLoading:T}=w({queryKey:["/api/merchant-presale/campaigns",d,"presale-package"],enabled:!!d}),{data:r}=w({queryKey:["/api/campaigns",d],enabled:!!d}),p=B({mutationFn:async a=>(await O("POST",`/api/merchant-presale/presale-packages/${s==null?void 0:s.id}/signup`,a)).json(),onSuccess:a=>{var n;N({title:"Welcome to the Program!",description:a.isNewMerchant?"Your merchant account has been created. Let's set up your first offer!":"You've been enrolled. Let's create your first offer!"}),K.invalidateQueries({queryKey:["/api/merchant-presale/merchants/me"]}),(n=a.enrollment)!=null&&n.id?h(`/merchant/quick-start/${a.enrollment.id}`):h("/merchant/portal")},onError:a=>{N({title:"Signup Failed",description:a.message||"Unable to complete signup. Please try again.",variant:"destructive"})}});if(T)return e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})});if(!s)return e.jsx("div",{className:"container mx-auto py-16 px-4 text-center",children:e.jsxs(c,{className:"max-w-lg mx-auto",children:[e.jsxs(l,{children:[e.jsx(o,{children:"Presale Program Not Found"}),e.jsx(j,{children:"This campaign doesn't have an active presale program, or it may have expired."})]}),e.jsx(g,{className:"justify-center",children:e.jsx(x,{onClick:()=>
1h("/"),children:"Return Home"})})]})});const v=s.maxMerchants?s.maxMerchants-(s.enrolledMerchants||0):null,k=s.featuredBenefits||["Exclusive access to athlete-driven promotions","Reach highly engaged sports fans","Automated tracking and analytics","Commission-based model - pay only for results"];return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted",children:e.jsx("div",{className:"container mx-auto py-12 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("img",{src:V,alt:"Slant",className:"h-16 w-auto object-contain","data-testid":"img-slant-logo"})}),e.jsxs(R,{variant:"secondary",className:"mb-4","data-testid":"badge-campaign-type",children:[e.jsx(D,{className:"w-3 h-3 mr-1"}),((b=r==null?void 0:r.wedgeType)==null?void 0:b.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase()))||"Athlete Campaign"]}),e.jsx("h1",{className:"text-4xl font-bold mb-4","data-testid":"text-package-name",children:s.name}),(r==null?void 0:r.influencerName)&&e.jsxs("p",{className:"text-xl text-muted-foreground mb-2",children:["Partnered with ",e.jsx("span",{className:"font-semibold text-foreground",children:r.influencerName})]}),s.description&&e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:s.description})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8 mb-12",children:[e.jsxs(c,{children:[e.jsx(l,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx($,{className:"w-5 h-5 text-primary"}),"What You Get"]})}),e.jsx(f,{children:e.jsx("ul",{className:"space-y-3",children:k.map((a,n)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:a})]},n))})})]}),e.jsxs(c,{children:[e.jsx(l,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(q,{className:"w-5 h-5 text-primary"}),"Program Details"]})}),e.jsx(f,{children:e.jsxs("div",{className:"space-y-4",children:[s.trialDays&&s.trialDays>0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(A,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.trialDays,"-Day Free Trial"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Try before you commit"})]})]}),s.discountPercent&&s.discountPercent>0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Z,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.discountPercent,"% Launch Discount"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Exclusive for early adopters"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.athleteCommissionPercent||"10","% Athlete Commission"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Fair split with creators"})]})]}),v!==null&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(U,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[v," Spots Remaining"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Limited availability"})]})]})]})})]})]}),P?e.jsxs(c,{className:"max-w-xl mx-auto",children:[e.jsxs(l,{children:[e.jsx(o,{children:"Create Your Merchant Account"}),e.jsx(j,{children:"Fill in your business details to join the presale program."})]}),e.jsx(f,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(u,{htmlFor:"businessName",children:"Business Name *"}),e.jsx(S,{id:"businessName",value:t.businessName,onChange:a=>m({...t,businessName:a.target.value}),placeholder:"Your Business Name","data-testid":"input-business-name"})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"contactEmail",children:"Contact Email *"}),e.jsx(S,{id:"contactEmail",type:"email",value:t.contactEmail,onChange:a=>m({...t,contactEmail:a.target.value}),placeholder:"[email protected]","data-testid":"input-contact-email"})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"businessType",children:"Business Type"}),e.jsxs(Q,{value:t.businessType,onValueChange:a=>m({...t,businessType:a}),children:[e.jsx(W,{"data-testid":"select-business-type",children:e.jsx(H,{placeholder:"Select type"})}),e.jsxs(J,{children:[e.jsx(i,{value:"retail",children:"Retail"}),e.jsx(i,{value:"restaurant",children:"Restaurant"}),e.jsx(i,{value:"service",children:"Service"}),e.jsx(i,{value:"entertainment",children:"Entertainment"}),e.jsx(i,{value:"sports",children:"Sports"}),e.jsx(i,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"description",children:"Business Description (Optional)"}),e.jsx(G,{id:"description",value:t.description,onChange:a=>m({...t,description:a.target.value}),placeholder:"Tell us about your business...","data-testid":"input-description"})]})]})}),e.jsxs(g,{className:"flex gap-2",children:[e.jsx(x,{variant:"outline",onClick:()=>y(!1),"data-testid":"btn-cancel",children:"Back"}),e.jsx(x,{className:"flex-1",onClick:()=>p.mutate(t),disabled:!t.businessName||!t.contactEmail||p.isPending,"data-testid":"btn-complete-signup",children:p.isPending?"Creating Account...":"Complete Signup"})]})]}):e.jsxs(c,{className:"max-w-xl mx-auto",children:[e.jsxs(l,{className:"text-center",children:[e.jsx(Y,{className:"w-12 h-12 mx-auto mb-4 text-primary"}),e.jsx(o,{children:"Ready to Join?"}),e.jsx(j,{children:"Create your merchant account and start reaching new customers through this campaign."})]}),e.jsx(g,{className:"justify-center",children:e.jsxs(x,{size:"lg",onClick:()=>y(!0),"data-testid":"btn-start-signup",children:[s.ctaText||"Join Presale Program",e.jsx(I,{className:"w-4 h-4 ml-2"})]})})]}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-8",children:"By 
1signing up, you agree to our Terms of Service and Privacy Policy."})]})})})}export{oe 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.