1import{X as Re,b as ne,bL as Pe,d as i,j as e,e as a,v as se,c3 as I,T as n,B as m,a9 as p,a4 as We,h as l,Z as ze,t as g,A as oe,R as j,a1 as Be,a2 as Ie,V as Ee,Q as ie,cc as Fe,at as re,cd as ae,I as ue,q as xe,aR as Me}from"./index.BdFycjDt.js";import{s as E}from"./showcaseApi.CXh4owQ4.js";import{C as b}from"./Card.y4fRYbDG.js";import{C as v}from"./CardContent.BGaAZbjQ.js";import{D as Le}from"./Divider.kxa6B8uw.js";import{V as Oe}from"./VerifiedUser.BqzFKVlB.js";import{L as $e}from"./LocationOn.Jyy_Ykh4.js";import{E as He}from"./Event.B4kCyj7y.js";import{P as Ve}from"./Payments.OynGPPJ_.js";import{A as Ye}from"./AccessTime.B66r6ZCl.js";import{L as le}from"./Link.CGAhViif.js";import{O as Ne}from"./OpenInNew.BOzvpciq.js";import{T as De,a as ce}from"./ToggleButtonGroup.DIjLBcv_.js";import{L as Ge}from"./Link.DZC79Qb9.js";import{V as Ue}from"./Videocam.BU6_BGrx.js";import{C as me}from"./CloudUpload.B7UhNuzI.js";import{L as qe}from"./LinearProgress.B-V9CFME.js";import{A as Xe}from"./AppBar.BcW3GoeE.js";import{T as Ke}from"./Toolbar.CUIIFwtG.js";import{A as Je}from"./ArrowBack.3O-yzPOH.js";import"./functionError.DKuHce60.js";import"./castingVocabulary.B7xQ_ckh.js";import"./getValidReactChildren.CLGNwvLs.js";const Qe={in_person:"In person",virtual:"Virtual",self_tape:"Self-tape"},Ze={in_person:"You will audition in person. The company will confirm your time by email.",virtual:"You will audition over video. The company will send you a link.",self_tape:"You record yourself and send the video. Add the link below."},et=["Under 18","18-24","25-34","35-44","45-54","55-64","65+"],tt=6*1024*1024,nt=500*1024*1024;function F(r){if(!r)return null;const f=new Date(r+"T00:00:00");return isNaN(f.getTime())?null:f.toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})}function P(r){return r<1024*1024?`${Math.max(1,Math.round(r/1024))} KB`:`${(r/(1024*1024)).toFixed(1)} MB`}function At(){const{token:r}=Re(),f=ne(t=>t.user),c=ne(t=>t.isAuthenticated),y=Pe(f)?"/showcase/auditions":"/showcase/me",[u,W]=i.useState(null),[S,x]=i.useState("loading"),[z,he]=i.useState(""),[w,pe]=i.useState(""),[M,je]=i.useState(""),[L,fe]=i.useState(""),[O,ge]=i.useState(""),[$,be]=i.useState(""),[H,ve]=i.useState(""),[V,ye]=i.useState(""),[Y,N]=i.useState(null),[D,G]=i.useState(null),[U,Se]=i.useState(""),[k,we]=i.useState("link"),[h,q]=i.useState(null),[C,B]=i.useState(null),[A,X]=i.useState(!1),[K,d]=i.useState(null),[ke,Ce]=i.useState(!1),Ae=i.useRef(null),Te=i.useRef(null),J=i.useRef(null);i.useEffect(()=>{if(!r){x("notfound");return}let t=!1;return(async()=>{try{const o=await E.getPublicAudition(r);if(t)return;W(o),x("ok")}catch{t||x("notfound")}})(),()=>{t=!0}},[r]);const s=u?.post,T=u?.roles||[],_=u?.company||null,Q=F(s?.application_deadline),Z=i.useMemo(()=>{const t=F(s?.audition_starts),o=F(s?.audition_ends);return t&&o&&t!==o?`${t} to ${o}`:t||o||null},[s?.audition_starts,s?.audition_ends]),ee=[s?.location_city,s?.location_state].filter(Boolean).join(", "),te=(t,o)=>{if(d(null),!!o){if(o.size>tt){d(`That ${t} is ${P(o.size)}. Please choose a file under 6 MB.`);return}t==="headshot"?N(o):G(o)}},_e=async t=>{if(t.preventDefault(),!!r){if(d(null),!z.trim()){d("Please enter your name.");return}if(!w.trim()){d("Please enter your email address.");return}X(!0);try{let o=null;k==="upload"&&h&&(B(0),o=await E.uploadSelfTape(r,h,B)),await E.submitPublicApplication(r,{name:z.trim(),email:w.trim(),phone:M.trim(),location:L.trim(),ageRange:O,reelUrl:k==="link"?H.trim():"",coverNote:V.trim(),roleId:$||null,headshot:Y,resume:D,videoPath:o?.path||null,videoTicket:o?.ticket||null,website:U}),Ce(!0),window.scrollTo({top:0,behavior:"smooth"})}catch(o){d(o?.message||"Your submission could not be sent. Please try again.")}finally{X(!1),B(null)}}},R=e.jsx(Xe,{position:"static",elevation:0,sx:{bgcolor:"rgba(251,249,245,0.9)",backdropFilter:"blur(10px)",borderBottom:"1px solid rgba(20,16,25,0.1)"},children:e.jsxs(Ke,{children:[e.jsx(a,{component:p,to:"/showcase",sx:{display:"flex",alignItems:"center"},children:e.jsx(a,{component:"img",src:"/performr-showcase-logo.png?v=2",alt:"PerformrSHOWCASE",sx:{height:28,display:"block"}})}),e.jsx(a,{sx:{flexGrow:1}}),c&&e.jsx(m,{component:p,to:y,size:"small",startIcon:e.jsx(Je,{}),children:"Back To PerformrSHOWCASE"})]})});return S==="loading"?e.jsxs(a,{sx:{minHeight:"100vh",bgcolor:"background.default"},children:[R,e.jsx(a,{sx:{display:"flex",justifyContent:"center",py:12},children:e.jsx(se,{})})]}):S==="notfound"||!s?e.jsxs(a,{sx:{minHeight:"100vh",bgcolor:"background.default"},children:[R,e.jsxs(I,{maxWidth:"sm",sx:{py:12,textAlign:"center"},children:[e.jsx(n,{variant:"h3",sx:{mb:1}
1,children:"This audition link is not valid"}),e.jsx(n,{color:"text.secondary",sx:{mb:3},children:"The link may have expired, or the company may have taken the call down. Ask them for a current link."}),e.jsx(m,{component:p,to:"/showcase",variant:"contained",children:"Browse PerformrSHOWCASE"})]})]}):ke?e.jsxs(a,{sx:{minHeight:"100vh",bgcolor:"background.default"},children:[R,e.jsx(I,{maxWidth:"sm",sx:{py:{xs:5,md:8}},children:e.jsx(b,{variant:"outlined",sx:{borderRadius:3,textAlign:"center"},children:e.jsxs(v,{sx:{p:{xs:3,md:5}},children:[e.jsx(We,{color:"success",sx:{fontSize:56,mb:1.5}}),e.jsx(n,{variant:"h3",sx:{mb:1},children:"Your submission is in"}),e.jsxs(n,{color:"text.secondary",sx:{mb:3},children:[s.organization_name," has your materials for ",s.title,". They will contact you at"," ",e.jsx("strong",{children:w})," if they want to see you."]}),e.jsx(Le,{sx:{my:3}}),c?e.jsx(m,{component:p,to:y,variant:"contained",children:"Back To PerformrSHOWCASE"}):e.jsxs(e.Fragment,{children:[e.jsx(n,{variant:"subtitle2",sx:{mb:.5},children:"Want to skip the form next time?"}),e.jsx(n,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"A free PerformrSHOWCASE profile keeps your headshot, resume, and reel in one place, and lets you apply to any call in one click."}),e.jsx(m,{component:p,to:"/showcase/join",variant:"contained",children:"Create A Free Profile"})]})]})})})]}):e.jsxs(a,{sx:{minHeight:"100vh",bgcolor:"background.default"},children:[R,e.jsxs(I,{maxWidth:"md",sx:{py:{xs:3,md:5}},children:[e.jsx(b,{variant:"outlined",sx:{borderRadius:3,mb:3},children:e.jsxs(v,{sx:{p:{xs:2.5,md:3.5}},children:[e.jsxs(l,{direction:"row",spacing:2,alignItems:"flex-start",children:[_?.logo_url&&e.jsx(ze,{src:_.logo_url,variant:"rounded",sx:{width:64,height:64,bgcolor:"grey.100"}}),e.jsxs(a,{sx:{minWidth:0,flexGrow:1},children:[e.jsxs(l,{direction:"row",spacing:.75,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[e.jsx(n,{variant:"overline",color:"text.secondary",children:_?.name||s.organization_name}),_?.verified&&e.jsx(Oe,{sx:{fontSize:16,color:"success.main"}})]}),e.jsx(n,{variant:"h2",sx:{mb:.5},children:s.title}),s.production_name&&e.jsx(n,{variant:"subtitle1",color:"text.secondary",children:s.production_name})]})]}),e.jsxs(l,{direction:"row",spacing:1,flexWrap:"wrap",useFlexGap:!0,sx:{mt:2},children:[e.jsx(g,{size:"small",label:Qe[s.audition_format]||s.audition_format,color:"primary",variant:"outlined"}),s.content_rating&&e.jsx(g,{size:"small",variant:"outlined",label:s.content_rating}),ee&&e.jsx(g,{size:"small",variant:"outlined",icon:e.jsx($e,{}),label:ee}),Z&&e.jsx(g,{size:"small",variant:"outlined",icon:e.jsx(He,{}),label:Z}),s.compensation&&e.jsx(g,{size:"small",variant:"outlined",icon:e.jsx(Ve,{}),label:s.compensation}),Q&&e.jsx(g,{size:"small",variant:"outlined",icon:e.jsx(Ye,{}),label:`Apply by ${Q}`})]}),s.description&&e.jsx(n,{variant:"body1",sx:{mt:2.5,whiteSpace:"pre-wrap"},children:s.description}),s.external_url&&e.jsxs(le,{href:s.external_url,target:"_blank",rel:"noopener noreferrer",underline:"hover",variant:"body2",sx:{display:"inline-flex",alignItems:"center",gap:.5,mt:2},children:["More about this production ",e.jsx(Ne,{sx:{fontSize:15}})]})]})}),T.length>0&&e.jsx(b,{variant:"outlined",sx:{borderRadius:3,mb:3},children:e.jsxs(v,{sx:{p:{xs:2.5,md:3.5}},children:[e.jsx(n,{variant:"overline",color:"text.secondary",children:"Roles Being Cast"}),e.jsx(l,{spacing:1.5,sx:{mt:1},children:T.map(t=>{const o=[t.age_range,t.gender,t.voice_type].filter(Boolean).join(" · ");return e.jsxs(a,{sx:{p:1.75,borderRadius:2,bgcolor:"action.hover"},children:[e.jsx(n,{variant:"subtitle2",children:t.name}),o&&e.jsx(n,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:o}),t.description&&e.jsx(n,{variant:"body2",color:"text.secondary",sx:{mt:.5,whiteSpace:"pre-wrap"},children:t.description})]},t.id)})})]})}),s.submission_instructions&&e.jsxs(oe,{severity:"info",sx:{mb:3,borderRadius:3},children:[e.jsx(n,{variant:"subtitle2",sx:{mb:.5},children:"What To Send"}),e.jsx(n,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:s.submission_instructions})]}),u?.open?e.jsx(b,{variant:"outlined",sx:{borderRadius:3},children:e.jsxs(v,{sx:{p:{xs:2.5,md:3.5}},children:[e.jsx(n,{variant:"h4",sx:{mb:.5},children:"Submit Yourself"}),e.jsxs(n,{variant:"body2",color:"text.secondary",sx:{mb:1},children:["No account needed. ",Ze[s.audition_format]||""]}),e.jsxs(n,{variant:"body2",color:"text.secondary",sx:{mb:3},children:["Already on PerformrSHOWCASE?"," ",e.jsx(le,{component:p,to:"/showcase/opportunities",underline:"hover",children:"Sign in and apply with your profile"}),"."]}),e.jsxs(a,{component:"form",onSubmit:_e,noValidate:!0,children:[e.jsx(a,{sx:{position:"absolute",left:"-9999px"},"aria-hidden":"true",children:e.jsx(j,{label:"Website",value:U,onChange:t=>Se(t.target.value),tabIndex:-1,autoComplete:"off"})}),e.jsx(n,{variant:"overline",color:"text.secondary",children:"About You"}),e.jsxs(l,{spacing:2,sx:{mt:1,mb:3},children:[e.jsxs(l,{direction:{xs:"column",sm:"row"},spacing:2,children:[e.jsx(j,{label:"Full Name",value:z,onChange:t=>he(t.target.value),required:!0,fullWidth:!0,autoComplete:"name"}),e.jsx(j,{label:"Email",type:"email",value:w,onChange:t=>pe(t.target.value),required:!0,fullWidth:!0,autoComplete:"email",helperText:"This is how the company reaches you."})]}),e.jsxs(l,{direction:{xs:"column",sm:"row"},spacing:2,children:[e.jsx(j,{label:"Phone",value:M,onChange:t=>je(t.target.value),fullWidth:!0,autoComplete:"tel"}),e.jsx(j,{label:"Where You Are Based",value:L,onChange:t=>fe(t.target.value),fullWidth:!0,placeholder:"City, State"}),e.jsxs(Be,{fullWidth:!0,children:[e.jsx(Ie,{id:"age-range-label",children:"Age Range"}),e.jsxs(Ee,{labelId:"age-range-label",label:"Age Range",value:O,onChange:t=>ge(t.target.value),children:[e.jsx(ie,{value:"",children:e.jsx("em",{children:"Prefer not to say"})}),et.map(t=>e.jsx(ie,{value:t,children:t},t))]})]})]})]}),T.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(n,{variant:"overline",color:"text.secondary",children:"Which Role"}),e.jsxs(Fe,{value:$,onChange:t=>be(t.target.value),sx:{mt:.5,mb:3},children:[T.map(t=>e.jsx(re,{value:t.id,control:e.jsx(ae,{}),label:t.name},t.id)),e.jsx(re,{value:"",control:e.jsx(ae,{}),label:"Any role I am right for"})]})]}),e.jsx(n,{variant:"overline",color:"text.secondary",children:"Your Materials"}),e.jsxs(l,{spacing:2,sx:{mt:1,mb:3},children:[e.jsx(de,{label:"Headshot",hint:"JPG, PNG, or WEBP, up to 6 MB.",file:Y,inputRef:Ae,accept:"image/jpeg,image/png,image/webp,image/heic",onPick:t=>te("headshot",t),onClear:()=>N(null)}),e.jsx(de,{label:"Resume",hint:"PDF, Word, or a photo of it, up to 6 MB.",file:D,inputRef:Te,accept:"application/pdf,.doc,.docx,image/jpeg,image/png",onPick:t=>te("resume",t),onClear:()=>G(null)}),e.jsxs(a,{sx:{p:2,borderRadius:2,border:"1px dashed",borderColor:"divider"},children:[e.jsxs(l,{direction:{xs:"column",sm:"row"},spacing:1.5,alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",sx:{mb:2},children:[e.jsx(n,{variant:"subtitle2",children:s.audition_format==="self_tape"?"Self-Tape":"Video"}),e.jsxs(De,{size:"small",exclusive:!0,value:k,onChange:(t,o)=>{o&&(d(null),we(o))},sx:{"& .MuiToggleButton-root":{textTransform:"none",px:1.75}},children:[e.jsxs(ce,{value:"link",children:[e.jsx(Ge,{sx:{fontSize:18,mr:.75}}),"Paste A Link"]}),e.jsxs(ce,{value:"upload",children:[e.jsx(Ue,{sx:{fontSize:18,mr:.75}}),"Upload The File"]})]})]}),k==="link"?e.jsx(j,{label:"Video Link",value:H,onChange:t=>ve(t.target.value),fullWidth:!0,placeholder:"https://",helperText:"A YouTube, Vimeo, or Google Drive link. Make sure anyone with the link can view it."}):e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:J,type:"file",accept:"video/mp4,video/quicktime,video/x-m4v,video/webm,video/x-matroska",hidden:!0,onChange:t=>{const o=t.target.files?.[0]||null;if(t.target.value="",d(null),!!o){if(o.size>nt){d(`That video is ${P(o.size)}. Upload one under 500 MB, or paste a link to it instead.`);return}q(o)}}}),e.jsxs(l,{direction:"row",spacing:2,alignItems:"center",justifyContent:"space-between",children:[e.jsxs(a,{sx:{minWidth:0},children:[e.jsx(n,{variant:"body2",color:h?"text.primary":"text.secondary",noWrap:!0,children:h?`${h.name} · ${P(h.size)}`:"MP4, MOV, or WEBM, up to 500 MB."}),C!==null&&e.jsxs(n,{variant:"caption",color:"text.secondary",children:["Uploading⦠",C,"%"]})]}),h?e.jsx(ue,{size:"small",onClick:()=>q(null),disabled:A,"aria-label":"Remove video",children:e.jsx(xe,{fontSize:"small"})}):e.jsx(m,{size:"small",variant:"outlined",startIcon:e.jsx(me,{}),onClick:()=>J.current?.click(),sx:{flexShrink:0},children:"Choose Video"})]}),C!==null&&e.jsx(qe,{variant:"determinate",value:C,sx:{mt:1.5,borderRadius:1}}
1),e.jsx(n,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1.5},children:"A long video takes a while to send. Keep this page open until it finishes."})]})]})]}),e.jsx(n,{variant:"overline",color:"text.secondary",children:"Anything Else"}),e.jsx(j,{label:"Note To The Company",value:V,onChange:t=>ye(t.target.value),fullWidth:!0,multiline:!0,minRows:4,sx:{mt:1,mb:3},placeholder:"Conflicts, why you are right for the role, anything they should know."}),K&&e.jsx(oe,{severity:"error",sx:{mb:2},children:K}),e.jsx(m,{type:"submit",variant:"contained",size:"large",fullWidth:!0,disabled:A,startIcon:A?e.jsx(se,{size:18,color:"inherit"}):void 0,children:A?"Sendingâ¦":"Submit For This Role"}),e.jsxs(n,{variant:"caption",color:"text.secondary",sx:{display:"block",mt:1.5,textAlign:"center"},children:["Your details and files go to ",s.organization_name," only."]})]})]})}):e.jsx(b,{variant:"outlined",sx:{borderRadius:3},children:e.jsxs(v,{sx:{p:{xs:3,md:4},textAlign:"center"},children:[e.jsx(n,{variant:"h4",sx:{mb:1},children:"Submissions are closed"}),e.jsx(n,{color:"text.secondary",sx:{mb:3},children:u?.closed_reason||"This audition is not accepting submissions right now."}),e.jsx(m,{component:p,to:"/showcase/opportunities",variant:"outlined",children:"See Other Open Calls"})]})})]})]})}function de({label:r,hint:f,file:c,accept:y,inputRef:u,onPick:W,onClear:S}){return e.jsxs(a,{sx:{p:2,borderRadius:2,border:"1px dashed",borderColor:c?"success.main":"divider",bgcolor:x=>c?Me(x.palette.success.main,.08):"transparent",transition:"border-color .15s, background-color .15s"},children:[e.jsx("input",{ref:u,type:"file",accept:y,hidden:!0,onChange:x=>{W(x.target.files?.[0]||null),x.target.value=""}}),e.jsxs(l,{direction:"row",spacing:2,alignItems:"center",justifyContent:"space-between",children:[e.jsxs(a,{sx:{minWidth:0},children:[e.jsx(n,{variant:"subtitle2",children:r}),e.jsx(n,{variant:"caption",color:"text.secondary",sx:{display:"block"},noWrap:!0,children:c?`${c.name} · ${P(c.size)}`:f})]}),c?e.jsx(ue,{size:"small",onClick:S,"aria-label":`Remove ${r}`,children:e.jsx(xe,{fontSize:"small"})}):e.jsx(m,{size:"small",variant:"outlined",startIcon:e.jsx(me,{}),onClick:()=>u.current?.click(),sx:{flexShrink:0},children:"Choose File"})]})]})}export{At 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.