PageSourceSearch

https://music.cobrand.com/_next/static/chunks/pages/creators/hub-b07025ce652744ea.js

js cobrand.com collected 2026-10-02 04:37:46 UTC 41,239 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3787],{25051:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var s=i(6029),n=i(75828),a=i.n(n),r=i(8461),l=i(81783),o=i(82558),c=i(49956);let d=e=>{let{isScrolledToEnd:t,label:i="Scroll Down",className:n}=e;return(0,s.jsx)(r.N,{children:(0,s.jsx)(l.P.div,{className:a()("pointer-events-none sticky bottom-4 z-10 flex w-full justify-center",n),initial:{opacity:0},animate:{opacity:100*!t},exit:{opacity:0},children:(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-0.5 rounded-[100px] bg-black/[32%] px-[10px] py-1 backdrop-blur-[12px] dark:bg-white/[32%]",children:[(0,s.jsx)(c.E,{typography:c.o.Caption1,bold:!0,className:"text-white",children:i}),(0,s.jsx)(o.I,{type:o.A.Arrow,className:"rotate-90 fill-white",size:12})]})})})}},26700:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>eZ});var s=i(6029),n=i(55729),a=i(79992),r=i(28189),l=i(65486),o=i(83409),c=i(36568),d=i(44009),p=i(11029),u=i(82558),m=i(12482),x=i(19117);let h="ROSTER_INVITE_LINK";var y=i(63752),v=i(47312),g=i(99998),f=i(35430),j=i(79895),b=i(74369),w=i(49956),_=i(33998),k=i(58560),S=i(93251),A=i(16932),N=i(93486),C=i(38718),T=i(24724),I=i(22802),E=i(51139),P=i(87994),z=i(8542);let O=()=>(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:"gradient-for-star",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:"#2563EB"}),(0,s.jsx)("stop",{offset:"100%",stopColor:"#6594FB"})]})}),L=e=>{let{imageUrl:t,profileName:i,username:n}=e;return(0,s.jsx)("div",{className:"relative h-full overflow-auto p-7",children:(0,s.jsxs)("div",{className:"space-y-7",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,s.jsx)(z.e,{src:t,size:120,backupIconType:u.A.Account}),(0,s.jsxs)("svg",{style:{width:24,height:24},children:[(0,s.jsx)(u.I,{type:u.A.Cobrand,size:24,className:"fill-[url(#gradient-for-star)]"}),(0,s.jsx)(O,{})]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-row space-x-3",children:[(0,s.jsx)(w.E,{typography:w.o.Subheadline,bold:!0,children:i}),(0,s.jsx)("div",{className:"border-r border-slate-200"}),(0,s.jsx)(w.E,{typography:w.o.Subheadline,bold:!0,className:"text-primary-600",children:"@".concat(n)})]}),(0,s.jsx)(w.E,{typography:w.o.LargeTitle,bold:!0,children:"Welcome to the community!"}),(0,s.jsx)(w.E,{typography:w.o.Subheadline,className:"text-slate-500",children:"Keep an eye out for exclusive updates, and future paid collaborative campaigns."})]})]})})};var F=i(73509),M=i(59653),R=i(45063),Q=i(63804),V=i(55881),K=i(28395),D=i(42335),$=i(85693),U=i(71091),q=i(74686),B=i(28894),J=i(16989),X=i(25051);let G=e=>{let{rosterInviteLinkId:t,imageUrl:i,profileName:a,title:r,description:l,showPhoneNumberInput:c,showLocationInput:d,showPricePerPostInput:p,searchParams:m}
1=e,[h,v]=(0,n.useState)(R.O.TikTok),[g,f]=(0,n.useState)(""),[j,b]=(0,n.useState)(""),[_,k]=(0,n.useState)(""),[S,N]=(0,n.useState)(),[C,T]=(0,n.useState)("USD"),[I,E]=(0,n.useState)(),[P,G]=(0,n.useState)(!1),[W,H]=(0,n.useState)(),Y=(0,n.useRef)(),[Z,ee]=(0,n.useState)(null),[et,ei]=(0,n.useState)(!1),es=(0,n.useRef)(null),en=(()=>{let e=(0,x.MI)({needsAuthentication:!1});return(0,A.n)({mutationFn:t=>e("/app/v2/roster/apply_to_join",{method:"POST",body:JSON.stringify(t)})})})(),ea=e=>{if(e.current){let{scrollTop:t,scrollHeight:i,clientHeight:s}=e.current;ei(i<=s||t+s+200>=i)}};(0,n.useEffect)(()=>{ea(es)},[]);let er=!g||!j||d&&!S||p&&!I||!Z;return P?(0,s.jsx)(L,{imageUrl:i,profileName:a,username:g}):(0,s.jsxs)("div",{className:"relative flex flex-grow flex-col overflow-auto p-7",ref:es,onScroll:()=>ea(es),children:[(0,s.jsxs)("div",{className:"space-y-7",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,s.jsx)(z.e,{src:i,size:120,backupIconType:u.A.Account}),(0,s.jsxs)("svg",{style:{width:24,height:24},children:[(0,s.jsx)(u.I,{type:u.A.Cobrand,size:24,className:"fill-[url(#gradient-for-star)]"}),(0,s.jsx)(O,{})]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(w.E,{typography:w.o.Subheadline,bold:!0,children:a}),(0,s.jsx)(w.E,{typography:w.o.LargeTitle,bold:!0,children:r}),l&&(0,s.jsx)(w.E,{typography:w.o.Subheadline,className:"text-slate-500",children:l})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)(y.e,{children:[(0,s.jsx)(D.A,{type:D.R.Primary,title:"TikTok",isSelected:h===R.O.TikTok,onClick:()=>v(R.O.TikTok),iconType:u.A.TikTok}),(0,s.jsx)(D.A,{type:D.R.Primary,title:"Instagram",isSelected:h===R.O.Instagram,onClick:()=>v(R.O.Instagram),iconType:u.A.Instagram})]}),(0,s.jsx)($.p,{value:g,onChange:e=>f(e.target.value),label:"".concat((0,Q.$r)(h)," Username"),placeholder:"@username"}),(0,s.jsx)($.p,{value:j,onChange:e=>b(e.target.value),label:"Email Address",placeholder:"[email protected]",helper:"This email will be used to send your updates for future collaborative campaigns."}),c&&(0,s.jsx)(J.A,{value:_,onChange:k,optional:!0}),d&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(U.A,{label:"City"}),(0,s.jsx)(B.A,{onSelectPlace:N})]}),p&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(U.A,{label:(0,s.jsxs)(s.Fragment,{children:["Enter Your Pricing ",(0,s.jsx)("span",{className:"font-normal",children:"(Per Post)"})]})}),(0,s.jsxs)("div",{className:"flex flex-row space-x-2",children:[(0,s.jsx)(K.F,{currency:C,setCurrency:T,triggerClassName:"!max-w-[102px]"}),(0,s.jsx)(q.Y,{className:"w-full",placeholder:"00.00",value:I,onChange:e=>E(e)})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Large,onClick:()=>{if(H(void 0),!t)return;let e=g.replace("@","").trim();en.mutateAsync({roster_invite_link_id:t,tiktok_username:h===R.O.TikTok?e:null,instagram_username:h===R.O.Instagram?e:null,email_address:j,phone_number:_||null,city:(null==S?void 0:S.city)||null,state:(null==S?void 0:S.state)||null,country_code:(null==S?void 0:S.country_code)||null,latitude:(null==S?void 0:S.latitude)||null,longitude:(null==S?void 0:S.longitude)||null,price_currency:C,price_amount:void 0!==I?String(I):null,user_agent:window.navigator.userAgent,referrer:document.referrer,utm_source:m.utm_source||null,utm_medium:m.utm_medium||null,utm_campaign:m.utm_campaign||null,utm_term:m.utm_term||null,utm_content:m.utm_content||null,captcha_token:Z}).then(()=>{G(!0)}).catch(e=>{H(e.message.detail)}).finally(()=>{var e;null==(e=Y.current)||e.reset()})},text:"Apply To Join",className:"w-full",disabled:er,loading:en.isPending}),W&&(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-center text-red-600",children:W})]}),(0,s.jsxs)(w.E,{typography:w.o.Caption1,className:"text-slate-400",children:["By submitting my info, I consent to receive recurring automated email messages. See co:brand’s ",(0,s.jsx)("a",{href:M.er,className:"underline",target:"_blank",children:"Terms of Service"})," and ",(0,s.jsx)("a",{href:M.WO,className:"underline",target:"_blank",children:"Privacy Policy"}),"."]})]}),(0,s.jsx)(X.A,{isScrolledToEnd:et,className:"!-bottom-2"}),t&&(0,s.jsx)(F.Xs,{ref:Y,id:"turnstile-for-creator-invite-link-view",siteKey:V.K7,onSuccess:ee,onTimeout:()=>{var e;return null==(e=Y.current)?void 0:e.reset()},onExpire:()=>{var e;null==(e=Y.current)||e.reset()}})]})};var W=i(79099),H=i(64237),Y=i(1420),Z=i(92711),ee=i(96001),et=i(95412);let ei=()=>(0,s.jsx)(et.m,{title:"What should I do with this link?",description:(0,s.jsxs)("ul",{className:"list-inside list-decimal",children:[(0,s.jsx)("li",{children:"Share it on social platforms like Instagram Stories to invite your fanbase to apply."}),(0,s.jsx)("li",{children:"Send it as part of a message to an external database of creators."}),(0,s.jsx)("li",{children:"Include it in a Drop message to engage fans who have signed up to past Drops."})]}),triggerClassName:"w-max",children:(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-primary-600 cursor-pointer underline",children:"Learn More"})}),es=e=>{let{isOpen:t,onClose:i,organizationId:a,existingLink:r}=e,{addToast:l,updateToast:c}
1=(0,N.Xm)(),[d,p]=(0,n.useState)((null==r?void 0:r.internal_name)||""),[m,v]=(0,n.useState)((null==r?void 0:r.profile_image_url)||""),[g,z]=(0,n.useState)((null==r?void 0:r.profile_name)||""),[O,F]=(0,n.useState)((null==r?void 0:r.title)||""),[M,R]=(0,n.useState)((null==r?void 0:r.description)||""),[Q,V]=(0,n.useState)((null==r?void 0:r.show_phone_number_input)||!0),[K,D]=(0,n.useState)((null==r?void 0:r.show_location_input)||!0),[q,B]=(0,n.useState)((null==r?void 0:r.show_price_per_post_input)||!0),[J,X]=(0,n.useState)(!1),[et,es]=(0,n.useState)(!1),en=(0,_.x)(),ea=(0,k.b)(),er=(()=>{let{addToast:e}=(0,N.Xm)(),t=(0,S.jE)(),i=(0,x.MI)({needsAuthentication:!0});return(0,A.n)({mutationFn:e=>i("/roster/v0/invite_link/create",{method:"POST",body:JSON.stringify(e)}),onSuccess:i=>{if(e(C.K.Success,"Invite link created and copied"),i){let e="/invite/".concat(i.id);navigator.clipboard.writeText(e)}t.invalidateQueries({queryKey:[h]})},onError:t=>{e(C.K.Error,"Failed to Create Invite Link",t.message.detail)}})})(),el=(()=>{let{addToast:e}=(0,N.Xm)(),t=(0,S.jE)(),i=(0,x.MI)({needsAuthentication:!0});return(0,A.n)({mutationFn:e=>i("/roster/v0/invite_link/update",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e(C.K.Success,"Invite Link Updated"),t.invalidateQueries({queryKey:[h]})},onError:t=>{e(C.K.Error,"Failed to Update Invite Link",t.message.detail)}})})(),eo=async e=>{let t=e[0];if(!t||!a)return;let i=t.name;try{l(C.K.Loading,"Uploading Link Image...",i,!1,i);let e=await (0,E.w4)(t),s=await en.mutateAsync({organization_id:a,filename:i,type:T.P.PUBLIC,feature:T.x.InviteLinks});s&&(await (0,I.GR)(e,s.upload_url,e=>{c({id:i,level:C.K.Loading,title:"Uploading Link Image... ".concat(e.toFixed(0),"%"),message:i})}),await ea.mutateAsync({organization_id:a,asset_id:s.id}),c({id:i,level:C.K.Success,title:"Link Image Uploaded",autoClose:!0}),v(s.download_url))}catch(e){c({id:i,level:C.K.Error,title:"Failed to Upload Link Image",message:i})}},ec=!d||!m||!g||!O;return(0,s.jsxs)(s.Fragment,{children:[J&&(0,s.jsxs)(f.a,{isOpen:J,className:"flex max-h-full w-[350px] flex-col space-y-4 overflow-visible !rounded-none !bg-transparent !shadow-none",onClose:()=>X(!1),children:[(0,s.jsxs)("div",{className:"flex flex-col items-center space-y-3 text-center",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-2",children:[(0,s.jsx)(ee.l,{isToggled:et,onToggle:es}),(0,s.jsx)(w.E,{typography:w.o.Caption2,bold:!0,className:"text-slate-400",children:"POST-APPLICATION"})]}),(0,s.jsx)(w.E,{typography:w.o.Caption1,children:"This is what creators will see before they apply."})]}),(0,s.jsx)("div",{className:"relative flex h-full max-h-[650px] flex-grow flex-col overflow-hidden rounded-2xl border border-slate-500 bg-white shadow-lg",children:et?(0,s.jsx)(L,{imageUrl:m,profileName:g,username:"creatorhandle"}):(0,s.jsx)(G,{rosterInviteLinkId:void 0,imageUrl:m,profileName:g,title:O,description:M,showPhoneNumberInput:Q,showLocationInput:K,showPricePerPostInput:q,searchParams:{}})})]}),(0,s.jsxs)(f.a,{isOpen:t,className:"flex max-h-full w-[600px] flex-col overflow-hidden",children:[(0,s.jsx)(b.r,{title:r?"Edit Invite Link":"New Invite Link",onClose:i}),(0,s.jsxs)("div",{className:"flex-grow space-y-6 overflow-auto p-6",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)(w.E,{typography:w.o.Footnote,children:["Generate an open invite link for creators to submit their details. Creators who apply through this invite link will appear as ",(0,s.jsx)("span",{className:"font-semibold",children:"‘Interested’"})," in your roster, where you can approve or reject them."]}),(0,s.jsxs)("div",{className:"flex flex-row space-x-1",children:[(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-slate-500",children:"How should I use this link? "}),(0,s.jsx)(ei,{})]})]}),(0,s.jsx)("div",{className:"border-b border-slate-200"}),(0,s.jsx)(Y._,{title:"Link Name",subtitle:"Specify an internal name for this invite link."}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(w.E,{typography:w.o.Footnote,bold:!0,className:"text-slate-600",children:["Internal Link Name",(0,s.jsx)("span",{className:"font-normal",children:" (Creators will not see this)"})]}),(0,s.jsx)($.p,{value:d,onChange:e=>p(e.target.value),placeholder:"Ex. Invite Link 01",validators:[e=>e?{isValid:!0,message:void 0}:{isValid:!1,message:"Please enter an internal name for this link."}]})]}),(0,s.jsx)("div",{className:"border-b border-slate-200"}
1),(0,s.jsx)(Y._,{title:"Link Styling",subtitle:"Specify what creators will see in the invite link. Make sure the branding and tone are aligned with the associated artist profile or organization."}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-5",children:[(0,s.jsx)("div",{className:"relative aspect-square w-[120px] min-w-[120px]",children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("img",{src:m,className:"h-full w-full rounded-xl border object-cover",alt:""}),(0,s.jsx)(W.A,{contentUrl:m,onSetFiles:eo,aspectRatio:1})]}):(0,s.jsx)(H.l,{setFiles:eo,description:"PNG, JPG or GIF",className:"h-full w-full",accept:"image/jpeg, image/png, image/gif",triggerClassName:"!p-2"})}),(0,s.jsx)($.p,{value:g,onChange:e=>z(e.target.value),label:"Link Profile Name",placeholder:"Ex. Roam Studio",validators:[e=>e?{isValid:!0,message:void 0}:{isValid:!1,message:"Please specify a profile name for this invite link."}]})]}),(0,s.jsx)($.p,{value:O,onChange:e=>F(e.target.value),label:"Link Title",placeholder:"Ex. Join our Creator Community!",validators:[e=>e?{isValid:!0,message:void 0}:{isValid:!1,message:"Please specify a title for this invite link."}]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(U.A,{label:"Link Description",optional:!0}),(0,s.jsx)(Z.f,{value:M,onChange:e=>R(e.target.value),placeholder:"Enter a description for this invite link. Leave this empty if you wish to not have a description.",className:"w-full"})]})]}),(0,s.jsx)("div",{className:"border-b border-slate-200"}),(0,s.jsx)(Y._,{title:"Additional Inputs",subtitle:"Specify any additional detail inputs you’d like the creator to submit. Note that phone numbers are always optional, even when selected."}),(0,s.jsxs)(y.e,{className:"!gap-4",children:[(0,s.jsx)(P.S,{checked:Q,onChange:V,label:"Phone Number (Optional)"}),(0,s.jsx)(P.S,{checked:K,onChange:D,label:"Location (City)"}),(0,s.jsx)(P.S,{checked:q,onChange:B,label:"Price Per Post"})]})]}),(0,s.jsxs)(j.j,{className:"justify-between",children:[(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-slate-400",children:"Always preview your links before using them."}),(0,s.jsxs)(y.e,{children:[(0,s.jsx)(o.$n,{type:o.VQ.Tertiary,size:o.Mp.Small,onClick:()=>{X(!0)},text:"Preview",iconType:u.A.Eye}),(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Small,onClick:()=>{a&&(r?el.mutateAsync({id:r.id,organization_id:a,internal_name:d,profile_image_url:m,profile_name:g,title:O,description:M,show_phone_number_input:Q,show_location_input:K,show_price_per_post_input:q}).then(()=>i()):er.mutateAsync({organization_id:a,internal_name:d,profile_image_url:m,profile_name:g,title:O,description:M,show_phone_number_input:Q,show_location_input:K,show_price_per_post_input:q}).then(()=>i()))},text:"Save & Copy Link",iconType:u.A.Copy,disabled:ec,loading:er.isPending||el.isPending})]})]})]})]})};var en=i(2531);let ea=e=>{let{organizationId:t,inviteLink:i,onClickEdit:a}=e,{addToast:r}=(0,N.Xm)(),[l,c]=(0,n.useState)(!1),d=(e=>{let{organizationId:t}=e,{addToast:i}=(0,N.Xm)(),s=(0,S.jE)(),n=(0,x.MI)({needsAuthentication:!0});return(0,A.n)({mutationFn:e=>n("/roster/v0/invite_link/toggle",{method:"POST",body:JSON.stringify(e)}),onMutate:async e=>{let i={organization_id:t};await s.cancelQueries({queryKey:[h,i]});let n=s.getQueryData([h,i]);return s.setQueryData([h,i],t=>{if(!t)return t;let i=t.items.findIndex(t=>t.id===e.id),s=[...t.items];return s[i]={...s[i],enabled:e.enabled},{...t,items:s}}),{previous:n}},onSuccess:(e,t)=>{let{enabled:s}=t;i(C.K.Success,s?"Succesfully Toggled On":"Succesfully Toggled Off")},onError:e=>{i(C.K.Error,"Failed to Toggle Invite Link",e.message.detail),s.invalidateQueries({queryKey:[h,{organization_id:t}]})}})})({organizationId:t}),p=(()=>{let{addToast:e}=(0,N.Xm)(),t=(0,S.jE)(),i=(0,x.MI)({needsAuthentication:!0});return(0,A.n)({mutationFn:e=>i("/roster/v0/invite_link/delete",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e(C.K.Success,"Invite Link Deleted"),t.invalidateQueries({queryKey:[h]})},onError:t=>{e(C.K.Error,"Failed to Delete Invite Link",t.message.detail)}})})();return(0,s.jsxs)(s.Fragment,{children:[l&&(0,s.jsx)(en.R,{title:"Are you sure you want to delete this link?",message:"By deleting this link, creators who still have access to it will not be able to apply and it will appear as ended. This cannot be undone.",destructiveText:"Yes, I'm Sure",cancelText:"No, Go Back",isOpen:l,onClose:()=>c(!1),onConfirm:()=>p.mutateAsync({id:i.id}).then(()=>{c(!1)})}),(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-3 px-4 py-3 transition hover:bg-slate-50",children:[(0,s.jsx)(et.m,{title:"Activate/Deactivate Invite Link",description:"If turned off, the link will no longer be active and creators with access will not be able to apply.",children:(0,s.jsx)(ee.l,{isToggled:i.enabled,onToggle:e=>{d.mutateAsync({id:i.id,enabled:e})}})}),(0,s.jsx)(z.e,{src:i.profile_image_url,size:40,backupIconType:u.A.Link}
1),(0,s.jsxs)("div",{className:"flex-grow space-y-0.5",children:[(0,s.jsx)(w.E,{typography:w.o.Footnote,bold:!0,children:i.internal_name}),(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-slate-600",children:i.title}),(0,s.jsx)(w.E,{typography:w.o.Caption2,className:"text-slate-400",children:"Created by: ".concat(i.created_by.email_address)})]}),(0,s.jsxs)(y.e,{children:[(0,s.jsx)(o.$n,{type:o.VQ.Quaternary,size:o.Mp.Small,onClick:a,iconType:u.A.Edit,tooltipTitle:"Edit Invite Link"}),(0,s.jsx)(o.$n,{type:o.VQ.Quaternary,size:o.Mp.Small,onClick:()=>{let e="https://collab.cobrand.com/invite/".concat(i.id);navigator.clipboard.writeText(e).then(()=>{r(C.K.Success,"Link copied to clipboard!")})},iconType:u.A.Copy,tooltipTitle:"Copy Invite Link"}),(0,s.jsx)(o.$n,{type:o.VQ.Quaternary,size:o.Mp.Small,onClick:()=>c(!0),iconType:u.A.Trash,tooltipTitle:"Delete Invite Link"})]})]})]})},er=e=>{let{isOpen:t,onClose:i,organizationId:a}=e,[r,l]=(0,n.useState)(!1),[c,d]=(0,n.useState)(),{data:p,isLoading:_}=(e=>{let t=(0,x.MI)({needsAuthentication:!0});return(0,m.I)({queryKey:[h,e],queryFn:()=>t("/roster/v0/invite_link/list",{method:"POST",body:JSON.stringify(e)}),enabled:!!e.organization_id})})({organization_id:a}),k=(null==p?void 0:p.items)||[];return(0,s.jsxs)(s.Fragment,{children:[r&&(0,s.jsx)(es,{isOpen:r,onClose:()=>{l(!1),d(void 0)},organizationId:a,existingLink:c}),(0,s.jsxs)(f.a,{isOpen:t,className:"flex max-h-[500px] w-[540px] flex-col overflow-hidden",children:[(0,s.jsx)(b.r,{title:"Invite creators to join your roster",onClose:i}),_?(0,s.jsx)("div",{className:"flex w-full items-center justify-center p-11",children:(0,s.jsx)(g.I,{size:20,className:"fill-primary-600"})}):k.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex-grow overflow-auto",children:k.map((e,t)=>(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)(ea,{organizationId:a,inviteLink:e,onClickEdit:()=>{d(e),l(!0)}},e.id),t+1!==k.length&&(0,s.jsx)("div",{className:"mx-4 border-b border-slate-100"})]},e.id))}),(0,s.jsxs)(j.j,{className:"justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-row space-x-1",children:[(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-slate-400",children:"How should use this link?"}),(0,s.jsx)(ei,{})]}),(0,s.jsxs)(y.e,{children:[(0,s.jsx)(o.$n,{type:o.VQ.Tertiary,size:o.Mp.Small,onClick:i,text:"Cancel"}),(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Small,onClick:()=>l(!0),text:"New Invite Link",iconType:u.A.Plus})]})]})]}):(0,s.jsx)("div",{className:"p-11",children:(0,s.jsx)(v.A,{type:v.S.Branded,iconType:u.A.Link,title:"No invite links created yet",subtitle:"Generate an open invite link for creators to submit their details. Creators who apply through invite links will appear as ‘Interested’ in your roster, where you can approve or reject them.",additionalReactNodes:(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Small,onClick:()=>l(!0),text:"Create Invite Link",iconType:u.A.Plus})})})]})]})},el=e=>{let{organizationId:t,buttonType:i=o.VQ.Tertiary,buttonText:a="Invite Creators"}=e,[r,l]=(0,n.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[r&&(0,s.jsx)(er,{isOpen:r,onClose:()=>l(!1),organizationId:t}),(0,s.jsx)(o.$n,{type:i,size:o.Mp.Small,onClick:()=>l(!0),text:a,iconType:u.A.Link,tooltipTitle:"Invite creators to join your roster",tooltipDescription:"Generate an invite link where creators can apply to join your roster while collecting their details."})]})};var eo=i(10783),ec=i(831),ed=i.n(ec),ep=i(63372),eu=i(82740),em=i(72152),ex=i(44449),eh=i(41782),ey=i(56632),ev=i(36897),eg=i(45989),ef=i(15935),ej=i(26258),eb=i(11621),ew=i(55501);let e_=e=>{let{row:t}=e;return(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(u.I,{type:(0,ew.kK)(eb.Y.EMAIL),size:16,className:"fill-slate-600"}),(0,s.jsx)(w.E,{typography:w.o.Footnote,className:"!line-clamp-1 break-all text-slate-600",children:t.email_address})]}),t.phone_number&&(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(u.I,{type:(0,ew.kK)(eb.Y.PHONE_NUMBER),size:16,className:"fill-slate-600"}),(0,s.jsx)(w.E,{typography:w.o.Footnote,className:"!line-clamp-1 break-all text-slate-600",children:t.phone_number})]})]})};var ek=i(42042);let eS=e=>{let{row:t}=e;return(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsx)(w.E,{typography:w.o.Footnote,className:"text-slate-600",children:(0,ek.Yq)(t.created_at)}),(0,s.jsx)(w.E,{typography:w.o.Caption1,className:"text-primary-600",children:t.roster_invite_link_internal_name})]})};var eA=i(66417);let eN=e=>{let{row:t}=e;if(!t.location.city&&!t.location.state&&!t.location.country_code)return(0,s.jsx)(ej.A,{});let i=(0,ek.j$)(t.location);return(0,s.jsx)(et.m,{title:i,triggerClassName:"w-full",children:(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-2",children:[(0,s.jsx)("div",{children:(0,s.jsx)(eA.J,{countryCode:t.location.country_code||"zz"})}),(0,s.jsx)(w.E,{typography:w.o.Footnote,className:"!line-clamp-1 break-all text-slate-600",children:i})]})})},eC=e=>{let{row:t}=e;return null===t.price_amount?(0,s.jsx)(ej.A,{}):(0,s.jsxs)(w.E,{typography:w.o.Footnote,className:"!line-clamp-1 break-all text-slate-600",children:["USD"===t.price_currency?"USD ":"",(0,ek.vv)(Number(t.price_amount),t.price_currency||"USD")]})};var eT=i(75828),eI=i.n(eT),eE=i(99906),eP=i(76160);let ez=()=>{let{addToast:e}=(0,N.Xm)(),t=(0,S.jE)(),i=(0,x.MI)({needsAuthentication:!0}
1);return(0,A.n)({mutationFn:e=>i("/roster/v0/invite_link/approve_applications",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e(C.K.Success,"Creators Approved!","These creators are now part of your roster."),t.invalidateQueries({queryKey:[eu.d]}),t.invalidateQueries({queryKey:[eE.B]}),t.invalidateQueries({queryKey:[eP.Z]})},onError:(t,i)=>{let{roster_invite_link_applicant_ids:s}=i;e(C.K.Error,"Failed to Approve Creator".concat(1===s.length?"":"s"),t.message.detail)}})},eO=()=>{let{addToast:e}=(0,N.Xm)(),t=(0,S.jE)(),i=(0,x.MI)({needsAuthentication:!0});return(0,A.n)({mutationFn:e=>i("/roster/v0/invite_link/reject_applications",{method:"POST",body:JSON.stringify(e)}),onSuccess:(i,s)=>{let{roster_invite_link_applicant_ids:n}=s;e(C.K.Success,"Creator".concat(1===n.length?"":"s"," Declined!")),t.invalidateQueries({queryKey:[eu.d]})},onError:(t,i)=>{let{roster_invite_link_applicant_ids:s}=i;e(C.K.Error,"Failed to Reject Creator".concat(1===s.length?"":"s"),t.message.detail)}})};var eL=i(20922),eF=i(14430);let eM=e=>{let{organizationId:t,applicant:i,setIsActive:a,onClickProfileDetails:r}=e,[c,d]=(0,n.useState)(!1),[m,x]=(0,n.useState)(!1),[h,v]=(0,n.use
1State)(),g=(0,l.U)({organizationId:t}),f=ez(),j=eO(),b=(0,s.jsx)(eo.AM,{content:(0,s.jsx)(p.A,{organizationId:t,rosterIdMutating:h,onSelectRoster:e=>{v(e.id),f.mutateAsync({roster_invite_link_applicant_ids:[i.id],roster_id:e.id}).finally(()=>{v(void 0)})},closeParentPopover:()=>{d(!1),null==a||a(!1)}}),isOpen:m,align:eo.bq.Start,side:eo.vr.Left,children:(0,s.jsxs)(eF.i,{className:"w-[220px] space-y-0.5",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(eL.t,{title:"Profile Details",iconType:u.A.CreatorProfile,onClick:r}),(0,s.jsx)(eL.t,{title:"Add To List",iconType:u.A.FolderAdd,showChevron:!0,onClick:()=>x(e=>!e),isSelected:m,description:"Automatically adds this creator to your roster.",className:"!items-center"})]})});return(0,s.jsxs)(y.e,{onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Small,onClick:()=>{g&&(null==a||a(!0),f.mutateAsync({roster_invite_link_applicant_ids:[i.id],roster_id:g}).finally(()=>{null==a||a(!1)}))},iconType:u.A.Approve,loading:f.isPending,tooltipTitle:"Approve Creator",tooltipDescription:"Creator will be added to your roster."}),(0,s.jsx)(o.$n,{type:o.VQ.Quaternary,size:o.Mp.Small,onClick:()=>{null==a||a(!0),j.mutateAsync({roster_invite_link_applicant_ids:[i.id]}).finally(()=>{null==a||a(!1)})},iconType:u.A.Disable,loading:j.isPending,tooltipTitle:"Decline Creator"}),(0,s.jsx)(eo.AM,{content:b,isOpen:c,align:eo.bq.End,children:(0,s.jsx)(o.$n,{type:o.VQ.Quaternary,size:o.Mp.Small,onClick:e=>{e.stopPropagation(),d(e=>!e),null==a||a(e=>!e)},iconType:u.A.More,className:eI()({"button-textbased-quaternary-pressed border-interactive-neutral-pressed":c})})})]})},eR=e=>{var t;let{selectedApplicants:i,setSelectedApplicants:a,organizationId:r,additionalButtons:l,selectedRosterId:c,setSelectedRosterId:d,setShowApplicants:p}=e,[m,x]=(0,n.useState)(!1),[h,y]=(0,n.useState)(),[g,f]=(0,n.useState)(25),[j,b]=(0,n.useState)(),[w,_]=(0,n.use
1State)("created_at"),[k,S]=(0,n.useState)(em.m.Desc),[A,N]=(0,n.useState)(""),C=(0,ep.d)(A,300),{data:T,isLoading:I}=(0,eu.B)({cursor:j,page_size:g,organization_id:r,order_by:w,order_by_direction:k,q:C}),E=(null==T?void 0:T.items)||[];return(0,s.jsx)(ev.J,{headers:[{key:"id",title:"Creators",colspan:1.4,cell:e=>{let{row:t}=e,i=t.social_profiles[0];return i?(0,s.jsx)(ex.K,{avatarUrl:i.avatar_url,name:i.full_name||i.username,username:i.username,onClick:()=>{y(t),x(!0)},isVerified:!!i.is_verified,tooltipIconType:u.A.Link,tooltipTitle:"Interested Creator",tooltipDescription:"This creator applied through your creator invite link(s). Approve this creator to add them to your creator roster."}):(0,s.jsx)(ej.A,{})},sticky:!0},{key:"created_at",title:"Date Applied & Link",colspan:1,cell:eS,sortable:!0},{key:"social_profiles",title:"Social Accounts",colspan:1,cell:ey.A},{key:"follower_count",title:"Followers",colspan:1,cell:eh.A},{key:"price_amount",title:"Price Per Video",colspan:1,cell:eC},{key:"email_address",title:"Contact Info",colspan:1,cell:e_},{key:"location",title:"Location",colspan:1,cell:eN}],data:T,isLoading:I,selectedRows:i,setSelectedRows:a,organizationId:r,pageSize:g,additionalButtons:l,showCreatorPreview:m,setShowCreatorPreview:x,selectedRow:(null==h||null==(t=h.social_profiles[0])?void 0:t.id)?{id:h.id,social_profile_id:h.social_profiles[0].id}:void 0,setSelectedRow:y,search:A,setSearch:N,footer:(0,s.jsx)(ef.A,{cursor:j,links:null==T?void 0:T.links,onPageChange:e=>{b(e)},pageSize:g,setPageSize:f}),tableHeaderCheckboxProps:{checked:!!i.length,indeterminate:i.length>0&&!E.every(e=>i.find(t=>t.id===e.id)),onChange:e=>{e?a(e=>ed()([...e,...E],"id")):a([])}},metadata:{organizationId:r},sort:w,sortDirection:k,onSortChange:(e,t)=>
1{_(e),S(t)},renderActionCell:(e,t)=>(0,s.jsx)(eM,{organizationId:r,applicant:e,setIsActive:t,onClickProfileDetails:()=>{y(e),x(!0)}}),additionalControls:(0,s.jsx)(eg.A,{organizationId:r,selectedRosterId:c,setSelectedRosterId:d,showApplicants:!0,setShowApplicants:p}),emptyNode:(0,s.jsx)("div",{className:"absolute top-0 flex h-full w-full items-center justify-center pt-10",children:(0,s.jsx)(v.A,{type:v.S.Gray,iconType:u.A.Link,title:"No interested creators",subtitle:"Approve or decline creators who apply via your invite link(s) here.",additionalReactNodes:(0,s.jsx)(el,{organizationId:r,buttonType:o.VQ.Quaternary,buttonText:"View Invite Links"})})})})};var eQ=i(49429),eV=i(86200);let eK=e=>{let{organizationId:t,selectedApplicants:i,setSelectedApplicants:a}=e,[r,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(),x=(0,l.U)({organizationId:t}),h=ez(),v=eO(),g=i.map(e=>e.id);return(0,s.jsx)(eV.A,{isVisible:i.length>0,className:"!bottom-8",children:(0,s.jsxs)("div",{className:"flex flex-row space-x-6",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-3",children:[(0,s.jsx)(o.$n,{type:o.VQ.IconOnly,size:o.Mp.Small,onClick:()=>{},iconType:u.A.CheckboxOn,iconClassName:"fill-white",disabled:!0}),(0,s.jsx)(w.E,{typography:w.o.Footnote,className:"text-white",children:"".concat(i.length," Selected")})]}),(0,s.jsxs)("div",{className:"flex flex-row space-x-4",children:[(0,s.jsxs)(y.e,{children:[(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Small,onClick:()=>{x&&h.mutateAsync({roster_invite_link_applicant_ids:g,roster_id:x}).then(()=>{a([])})},iconType:u.A.Approve,loading:h.isPending,text:"Approve"}),(0,s.jsx)(o.$n,{type:o.VQ.Overlay,size:o.Mp.Small,onClick:()=>{v.mutateAsync({roster_invite_link_applicant_ids:g}).then(()=>{a([])})},iconType:u.A.Disable,loading:v.isPending,text:"Decline"}),(0,s.jsx)(eo.AM,{content:(0,s.jsx)(p.A,{organizationId:t,rosterIdMutating:d,onSelectRoster:e=>{m(e.id),h.mutateAsync({roster_invite_link_applicant_ids:g,roster_id:e.id}).then(()=>{a([])}).finally(()=>{m(void 0)})},closeParentPopover:()=>{c(!1)}}),isOpen:r,onOutsideClick:()=>c(!1),children:(0,s.jsx)(o.$n,{type:o.VQ.Overlay,size:o.Mp.Small,onClick:()=>{c(e=>!e)},iconType:u.A.FolderAdd,tooltipTitle:"Approve & Add To List",tooltipFloatingPadding:20})})]}),(0,s.jsx)(eQ.J,{onClick:()=>{a([])},size:16})]})]})})};var eD=i(89867),e$=i(94535),eU=i(81602),eq=i(90872),eB=i(45307);let eJ=e=>{let{organizationId:t,selectedRoster:i,selectedCreators:a,setSelectedCreators:r}
1=e,[c,d]=(0,n.useState)(!1),[p,m]=(0,n.useState)(!1),x=(0,l.U)({organizationId:t}),h=(0,eD.b)({organizationId:t}),v=(0,eD.b)({organizationId:t});return(0,s.jsx)(eV.A,{isVisible:a.length>0,className:"!bottom-8",children:(0,s.jsxs)("div",{className:"flex flex-row space-x-6",children:[(0,s.jsxs)("div",{className:"flex flex-row items-center space-x-3",children:[(0,s.jsx)(o.$n,{type:o.VQ.IconOnly,size:o.Mp.Small,onClick:()=>{},iconType:u.A.CheckboxOn,iconClassName:"fill-white",disabled:!0}),(0,s.jsx)(w.E,{typography:w.o.Footnote,className:"text-white",children:"".concat(a.length," Selected")})]}),(0,s.jsxs)("div",{className:"flex flex-row space-x-4",children:[(0,s.jsxs)(y.e,{children:[(0,s.jsx)(eB.A,{selectedCreators:a.map(e=>{var t,i,s;return{username:(null==(t=e.social_profiles[0])?void 0:t.username)||"",platform:(null==(i=e.social_profiles[0])?void 0:i.platform)||"",price:null==(s=e.pricing[0])?void 0:s.price}}),organizationId:t,buttonType:o.VQ.Overlay}),(0,s.jsx)(eo.AM,{content:(0,s.jsx)(eq.A,{organizationId:t,creators:a,closeParentPopover:()=>{d(!1)}}),isOpen:c,onOutsideClick:()=>d(!1),children:(0,s.jsx)(o.$n,{type:o.VQ.Overlay,size:o.Mp.Small,onClick:()=>{d(e=>!e)},iconType:u.A.Envelope,text:"Message"})}),(0,s.jsx)(e$.A,{organizationId:t,creators:a.map(e=>{var t;return{id:e.id,social_profile_id:null==(t=e.social_profiles[0])?void 0:t.id}}),buttonType:o.VQ.Overlay,popoverSide:eo.vr.Top,popoverAlign:eo.bq.Center}),(0,s.jsx)(eo.AM,{content:(0,s.jsx)(eU.A,{organizationId:t,socialProfileIds:a.map(e=>{var t;return null==(t=e.social_profiles[0])?void 0:t.id}),closeParentPopover:()=>{m(!1)}}),isOpen:p,onOutsideClick:()=>m(!1),children:(0,s.jsx)(o.$n,{type:o.VQ.Overlay,size:o.Mp.Small,onClick:()=>{m(e=>!e)},iconType:u.A.FolderAdd,tooltipTitle:"Add To List",tooltipFloatingPadding:20})}),i&&!i.is_default&&(0,s.jsx)(o.$n,{type:o.VQ.Overlay,size:o.Mp.Small,onClick:()=>{i&&h.mutateAsync({roster_id:i.id,social_profile_ids:a.map(e=>{var t;return null==(t=e.social_profiles[0])?void 0:t.id})}).then(()=>{r([])})},iconType:u.A.FolderRemove,tooltipTitle:"Remove From List",tooltipFloatingPadding:20,loading:h.isPending}),(0,s.jsx)(o.$n,{type:o.VQ.Overlay,size:o.Mp.Small,onClick:()=>{x&&v.mutateAsync({roster_id:x,social_profile_ids:a.map(e=>{var t;return null==(t=e.social_profiles[0])?void 0:t.id})}).then(()=>{r([])})},iconType:u.A.Trash,tooltipTitle:"Remove From Roster",tooltipFloatingPadding:20,loading:v.isPending})]}),(0,s.jsx)(eQ.J,{onClick:()=>{r([])},size:16})]})]})})},eX=e=>{let{organizationId:t}
1=e,[i,m]=(0,n.useState)(!1),[x,h]=(0,n.useState)(!1),[y,v]=(0,n.useState)([]),[g,f]=(0,n.useState)(),[j,b]=(0,n.useState)(),[_,k]=(0,n.useState)(!1),[S,A]=(0,n.useState)(!1),[N,C]=(0,n.useState)([]),{data:T}=(0,r.f)({organization_id:t}),I=((null==T?void 0:T.items)||[]).find(e=>e.id===g),E=(0,l.U)({organizationId:t}),P=(0,a.o)({organizationId:t}),z=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(el,{organizationId:t}),(0,s.jsx)(eo.AM,{content:(0,s.jsx)(p.A,{organizationId:t,onSelectRoster:e=>{b(e.id),k(!1),m(!0)},rowTitlePrefix:"Add To "}),isOpen:_,align:eo.bq.End,children:(0,s.jsx)(o.$n,{type:o.VQ.Primary,size:o.Mp.Small,onClick:()=>k(e=>!e),iconType:u.A.Plus,text:"Add Creators"})})]});return(0,s.jsxs)(s.Fragment,{children:[i&&(0,s.jsx)(c.A,{isOpen:i,onClose:()=>m(!1),onAdd:e=>{j&&P.mutateAsync({roster_id:j,social_profiles:e.map(e=>({social_profile_id:e.social_profile_id,email_address:e.email_address}))}).then(()=>{m(!1)}).catch(()=>{})},addButtonIsLoading:P.isPending}),(0,s.jsxs)("div",{className:"flex flex-grow flex-col space-y-8 p-8",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(w.E,{typography:w.o.LargeTitle,bold:!0,children:"My Creator Roster"}),(0,s.jsx)(w.E,{typography:w.o.Footnote,children:"Manage and organize creators you have saved or have collaborated with in the past."})]}),S?(0,s.jsx)(eR,{selectedApplicants:N,setSelectedApplicants:C,organizationId:t,additionalButtons:z,selectedRosterId:g,setSelectedRosterId:f,setShowApplicants:A}):(0,s.jsx)(d.A,{selectedCreators:y,setSelectedCreators:v,organizationId:t,additionalButtons:z,onClickAddWithProfileLinks:()=>{b(g||E),m(!0)},onClickAddViaCSV:()=>{b(g||E),h(!0)},selectedRosterId:g,setSelectedRosterId:f,showApplicants:S,setShowApplicants:A}),S?(0,s.jsx)(eK,{organizationId:t,selectedApplicants:N,setSelectedApplicants:C}):(0,s.jsx)(eJ,{organizationId:t,selectedRoster:I,selectedCreators:y,setSelectedCreators:v})]})]})};var eG=i(88231),eW=i(10607),eH=i(80589);let eY=()=>{let{setBreadcrumbs:e}=(0,eW.Cq)(),{activeOrganizationId:t}=(0,eH.A)();return(0,n.useEffect)(()=>{e([{title:"Creator Roster"}])},[e]),(0,s.jsx)(eX,{organizationId:t})};eY.getLayout=function(e){return(0,s.jsx)(eG.A,{noPadding:!0,children:e})};let eZ=eY},55881:(e,t,i)=>{"use strict";i.d(t,{C3:()=>o,K7:()=>s,YZ:()=>a,dI:()=>n,rK:()=>l,sl:()=>r});let s="0x4AAAAAAAgFv4Ft4uTjeLhH",n="0x4AAAAAACFek0hgsZ_zjUxH",a="0x4AAAAAACFsAZxNlW2S4_M6",r="X-CB-Seed",l="X-CB-Session",o="X-CB-Proof"},59653:(e,t,i)=>{"use strict";i.d(t,{Bg:()=>l,E$:()=>r,UR:()=>a,WO:()=>n,er:()=>s});let s="https://music.cobrand.com/terms-of-service/",n="https://music.cobrand.com/privacy-policy/",a="https://music.cobrand.com/content-upload-terms/",r="https://calendly.com/d/cr9j-27r-82p/cobrand-demo",l="registration-example"},73509:(e,t,i)=>{"use strict";i.d(t,{Xs:()=>m});var s,n=i(55729),a=i(6029),r=(0,n.forwardRef)(({as:e="div",...t},i)=>(0,a.jsx)(e,{...t,ref:i})),l="cf-turnstile-script",o="onloadTurnstileCallback",c=e=>!!document.getElementById(e),d={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}},p="unloaded",u=new Promise((e,t)=>{s={resolve:e,reject:t},"ready"===p&&e(void 0)}),m=(0,n.forwardRef)((e,t)=>{let{scriptOptions:i,options:m={},siteKey:x,onWidgetLoad:h,onSuccess:y,onExpire:v,onError:g,onBeforeInteractive:f,onAfterInteractive:j,onUnsupported:b,onTimeout:w,onLoadScript:_,id:k,style:S,as:A="div",injectScript:N=!0,...C}=e,T=m.size,I=(0,n.useCallback)(()=>typeof T>"u"?{}:"execute"===m.execution?d.invisible:"interaction-only"===m.appearance?d.interactionOnly:d[T],[m.execution,T,m.appearance]),[E,P]=(0,n.useState)(I()),z=(0,n.useRef)(null),[O,L]=(0,n.useState)(!1),F=(0,n.useRef)(),M=(0,n.useRef)(!1),R=k||"cf-turnstile",Q=i?.id||l,V=function(e=l){let[t,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let t=()=>{c(e)&&i(!0)},s=new MutationObserver(t);return s.observe(document,{childList:!0,subtree:!0}),t(),()=>{s.disconnect()}},[e]),t}(Q),K=i?.onLoadCallbackName||o,D=m.appearance||"always",$=(0,n.useMemo)(()=>({sitekey:x,action:m.action,cData:m.cData,callback:e=>{M.current=!0,y?.(e)},"error-callback":g,"expired-callback":v,"before-interactive-callback":f,"after-interactive-callback":j,"unsupported-callback":b,theme:m.theme||"auto",language:m.language||"auto",tabindex:m.tabIndex,"response-field":m.responseField,"response-field-name":m.responseFieldName,size:function(e){if("invisible"!==e&&"interactionOnly"!==e)return e}(T),retry:m.retry||"auto","retry-interval":m.retryInterval||8e3,"refresh-expired":m.refreshExpired||"auto","refresh-timeout":m.refreshTimeout||"auto",execution:m.execution||"render",appearance:m.appearance||"always","feedback-enabled":m.feedbackEnabled||!0,"timeout-callback":w}),[m.action,m.appearance,m.cData,m.execution,m.language,m.refreshExpired,m.responseField,m.responseFieldName,m.retry,m.retryInterval,m.tabIndex,m.theme,m.feedbackEnabled,m.refreshTimeout,x,T]),U=(0,n.useCallback)(()=>"u">typeof window&&!!window.turnstile,[]);return(0,n.useEffect)(function(){N&&!O&&(({render:e="explicit",onLoadCallbackName:t=o,scriptOptions:{nonce:i="",defer:s=!0,async:n=!0,id:a="",appendTo:r,onError:d,crossOrigin:p=""}={}})=>{let u=a||l;if(c(u))return;let m=document.createElement("script");m.id=u,m.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${t}&render=${e}`,document.querySelector(`script[src="${m.src}"]`)||(m.defer=!!s,m.async=!!n,i&&(m.nonce=i),p&&(m.crossOrigin=p),d&&(m.onerror=d,delete window[t]),("body"===r?document.body:document.getElementsByTagName("head")[0]).appendChild(m))})({onLoadCallbackName:K,scriptOptions:{...i,id:Q}})}
1,[N,O,i,Q]),(0,n.useEffect)(function(){"ready"!==p&&((e=o)=>("unloaded"===p&&(p="loading",window[e]=()=>{s.resolve(),p="ready",delete window[e]}),u))(K).then(()=>L(!0)).catch(console.error)},[]),(0,n.useEffect)(function(){if(!z.current||!O)return;let e=!1;return(async()=>{!e&&z.current&&(F.current=window.turnstile.render(z.current,$),F.current&&h?.(F.current))})(),()=>{e=!0,F.current&&(window.turnstile.remove(F.current),M.current=!1)}},[R,O,$]),(0,n.useImperativeHandle)(t,()=>{let{turnstile:e}=window;return{getResponse:()=>e?.getResponse&&F.current&&U()?e.getResponse(F.current):void console.warn("Turnstile has not been loaded"),getResponsePromise:async(e=3e4,t=100)=>new Promise((i,s)=>{let n,a=async()=>{if(M.current&&window.turnstile&&F.current)try{let e=window.turnstile.getResponse(F.current);return n&&clearTimeout(n),e?i(e):s(Error("No response received"))}catch(e){return n&&clearTimeout(n),console.warn("Failed to get response",e),s(Error("Failed to get response"))}n||(n=setTimeout(()=>{n&&clearTimeout(n),s(Error("Timeout"))},e)),await new Promise(e=>setTimeout(e,t)),await a()};a()}),reset(){if(!e?.reset||!F.current||!U())return void console.warn("Turnstile has not been loaded");"execute"===m.execution&&P(d.invisible);try{M.current=!1,e.reset(F.current)}catch(e){console.warn(`Failed to reset Turnstile widget ${F}`,e)}},remove(){if(!e?.remove||!F.current||!U())return void console.warn("Turnstile has not been loaded");P(d.invisible),M.current=!1,e.remove(F.current),F.current=null},render(){if(!e?.render||!z.current||!U()||F.current)return void console.warn("Turnstile has not been loaded or container not found");let t=e.render(z.current,$);return F.current=t,F.current&&h?.(F.current),"execute"!==m.execution&&P(T?d[T]:{}),t},execute:()=>"execute"!==m.execution?void console.warn('Execution mode is not set to "execute"'):e?.execute&&z.current&&F.current&&U()?void(e.execute(z.current,$),P(T?d[T]:{})):void console.warn("Turnstile has not been loaded or container not found"),isExpired:()=>e?.isExpired&&F.current&&U()?e.isExpired(F.current):(console.warn("Turnstile has not been loaded"),!1)}},[F,m.execution,T,$,z,U,O,h]),(0,n.useEffect)(()=>{V&&!O&&window.turnstile&&L(!0)},[O,V]),(0,n.useEffect)(()=>{P(I())},[m.execution,T,D]),(0,n.useEffect)(()=>{V&&"function"==typeof _&&_()},[V]),(0,a.jsx)(r,{ref:z,as:A,id:R,style:{...E,...S},...C})});m.displayName="Turnstile"},77908:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/creators/hub",function(){return i(26700)}])}},e=>{e.O(0,[8435,7280,5121,813,9880,4540,2824,2359,4204,7225,113,5312,9432,1518,5340,8231,636,6593,8792],()=>e(e.s=77908)),_N_E=e.O()}]);

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.