PageSourceSearch

https://client-area.thetradingpit.com/build/routes/affiliate/audience-insights-I2A7OHC6.js

js thetradingpit.com collected 2026-09-28 08:09:13 UTC 6,176 bytes, 2 lines download raw bytes

1import{a as y}from"/build/_shared/chunk-Z4CNYAPR.js";import{a as g}from"/build/_shared/chunk-4NLIYV3R.js";import"/build/_shared/chunk-2KV4ZTYV.js";import{a as b}from"/build/_shared/chunk-WRFHDBAU.js";import{h as T}from"/build/_shared/chunk-YCWWY2LK.js";import{Ka as O,La as k,Q as F,Ra as A,T as l,b as h}from"/build/_shared/chunk-R7MFKP4X.js";import"/build/_shared/chunk-JFWTZSBS.js";import"/build/_shared/chunk-LAXJGPLB.js";import"/build/_shared/chunk-F3M7IBUE.js";import"/build/_shared/chunk-JFGG6Q3C.js";import"/build/_shared/chunk-MNI3HIH6.js";import"/build/_shared/chunk-DQX7ZZZQ.js";import{c as v}from"/build/_shared/chunk-OHSQJ4VH.js";import"/build/_shared/chunk-F2DBCHVZ.js";import{a as C}from"/build/_shared/chunk-KTCJEOMT.js";import{d as S,e as _}from"/build/_shared/chunk-WFJ6FBDR.js";import{a as w}from"/build/_shared/chunk-WK7GFCJ3.js";import{a as z}from"/build/_shared/chunk-VN4GKE4B.js";import{e as u}from"/build/_shared/chunk-PELIJBCN.js";var f=u(z()),$=u(C());var e=u(w());var D=({data:d})=>[{title:d.tabTitle}];function j(){var L;let d=S(),{audienceInsights:s,setAudienceInsights:E}=_(),R=(0,f.useRef)(null),{t:n}=v("ui"),{t:p}=v("globals"),N=Object.values(n("primary_language_answers",{returnObjects:!0})),x=N[N.length-1],P=n("audience_platforms_answers",{returnObjects:!0}),[I,U]=(0,f.useState)((L=s.audiencePrimaryLanguages)==null?void 0:L.includes(x));return(0,e.jsxs)("div",{className:"mx-auto flex w-full max-w-md flex-col gap-8",children:[(0,e.jsxs)(F,{formRef:R,validator:T.affiliateAudienceInsightsStep(x,P),onSubmit:(t,a)=>{a.preventDefault(),E(i=>({...i,...t})),d(y.partnershipGoals)},className:"flex flex-col gap-8",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{htmlFor:"sizeOfAudience",className:"text-sm font-medium",children:n("audience_size_question")}),(0,e.jsx)(l,{name:"audienceSize",children:({error:t})=>(0,e.jsxs)("div",{children:[(0,e.jsx)(O,{id:"audienceSize",name:"audienceSize",size:"sm",defaultValue:s.audienceSize,className:"mt-5",children:Object.values(n("audience_size_answers",{returnObjects:!0})).map(a=>(0,e.jsx)(k,{value:a,children:a},a))}),t&&(0,e.jsx)("span",{className:"text-sm text-danger-500",children:t})]})})]}),(0,e.jsxs)("fieldset",{children:[(0,e.jsx)("legend",{className:"text-sm font-medium",children:n("audience_platforms_question")}),(0,e.jsx)(l,{name:"audienceReachingPlatforms",children:({error:t})=>(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mt-5 flex flex-col gap-2.5",children:P.map(({label:a,inputName:i,placeholder:r})=>{var c;return(0,e.jsxs)("div",{className:"group ml-1 mt-1.5 flex flex-col justify-between gap-2 sm:flex-row sm:gap-8",children:[(0,e.jsxs)("div",{className:"flex w-full max-w-[100px]",children:[(0,e.jsx)(g,{id:`audienceReachingPlatforms-${a}`,name:"audienceReachingPlatforms",value:a,hideError:!0,checked:(c=s.audienceReachingPlatforms)==null?void 0:c.includes(a),onChange:m=>{if(i){let o=document.querySelector(`[name='${i}']`);m?o==null||o.focus():o&&(o.value="")}}}),(0,e.jsx)("label",{htmlFor:`audienceReachingPlatforms-${a}`,className:"cursor-pointer pl-2 text-sm font-light text-brand-gray-700",children:a})]}),i?(0,e.jsx)("div",{className:"hidden flex-1 group-has-[:checked]:block",children:i==="audienceReachingPlatformsSpecification"?(0,e.jsx)(l,{name:"audienceReachingPlatformsSpecification",children:({error:m})=>(0,e.jsx)(A,{error:!!m,errorText:m||"",label:"",rows:5,name:"audienceReachingPlatformsSpecification",id:"audienceReachingPlatformsSpecification",className:"max-h-[250px] min-h-[44px]",placeholder:r!=null?r:"Other platforms links",charCounter:{max:255},defaultValue:s.audienceReachingPlatformsSpecification||""})}):(0,e.jsx)(b,{name:i,id:i,label:"",optional:!0,className:"h-11",placeholder:r!=null?r:void 0,value:s[i]})}):null]},a)})}),t&&(0,e.jsx)("span",{className:"text-sm text-danger-500",children:t})]})})]}),(0,e.jsxs)("fieldset",{children:[(0,e.jsx)("legend",{className:"text-sm font-medium",children:n("targeting_regions_question")}),(0,e.jsx)(l,{name:"targetingRegions",children:({error:t})=>(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mt-5 flex flex-col gap-2.5",children:Object.values(n("targeting_regions_answers",{returnObjects:!0})).map(a=>{var i;return(0,e.jsxs)("div",{className:"ml-1 mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(g,{id:`targetingRegions-${a}
1`,name:"targetingRegions",value:a,hideError:!0,checked:(i=s.targetingRegions)==null?void 0:i.includes(a)}),(0,e.jsx)("label",{htmlFor:`targetingRegions-${a}`,className:"text-sm font-light text-brand-gray-700",children:a})]},a)})}),t&&(0,e.jsx)("span",{className:"text-sm text-danger-500",children:t})]})})]}),(0,e.jsxs)("fieldset",{children:[(0,e.jsx)("legend",{className:"text-sm font-medium",children:n("primary_language_question")}),(0,e.jsx)(l,{name:"audiencePrimaryLanguages",children:({error:t})=>(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mt-5 flex flex-col gap-2.5",children:Object.values(n("primary_language_answers",{returnObjects:!0})).map(a=>{var i;return(0,e.jsxs)("div",{className:"ml-1 mt-1.5 flex items-center gap-2",children:[(0,e.jsx)(g,{id:`audiencePrimaryLanguages-${a}`,name:"audiencePrimaryLanguages",value:a,hideError:!0,checked:(i=s.audiencePrimaryLanguages)==null?void 0:i.includes(a),onChange:(r,c)=>{c.target.value===x&&U(c.target.checked)}}),(0,e.jsx)("label",{htmlFor:`audiencePrimaryLanguages-${a}`,className:"text-sm font-light text-brand-gray-700",children:a})]},a)})}),t&&(0,e.jsx)("span",{className:"text-sm text-danger-500",children:t})]})}),I&&(0,e.jsx)("div",{className:"mt-6",children:(0,e.jsx)(b,{id:"audiencePrimaryLanguagesSpecification",name:"audiencePrimaryLanguagesSpecification",label:p("please_specify"),value:s.audiencePrimaryLanguagesSpecification})})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)(h,{className:"w-full",onClick:()=>{var t;return(t=R.current)==null?void 0:t.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))},children:p("next")}),(0,e.jsx)(h,{variant:"text",onClick:()=>d(y.businessDetails),className:"mt-2.5 w-full",children:p("back")})]})]})}export{j as default,D as meta};
2//# sourceMappingURL=/build/routes/affiliate/audience-insights-I2A7OHC6.js.map

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.