PageSourceSearch

https://performrgo.com/assets/StageActivatingPage.BZRPWB7L.js

js performrgo.com collected 2026-10-05 22:48:34 UTC 3,008 bytes, 1 lines download raw bytes

1import{u as S,b as c,d as r,Y as T,j as e,e as A,h as f,T as a,A as E,R as k,B as y,v as j,a3 as P}from"./index.BdFycjDt.js";function B(){const s=S(),o=c(t=>t.initialize),[v,d]=r.useState(!1),m=r.useRef(Date.now()),[p]=T(),n=(p.get("ref")||p.get("code")||"").trim(),[l,w]=r.useState(""),[u,h]=r.useState(!1),[g,i]=r.useState(""),C=async()=>{if(i(""),l.trim().length<2){i("Enter your company or production name.");return}h(!0);try{const t=await P.redeemCompCode({code:n,companyName:l});if(t.status==="redeemed"){await o(),s("/app/stage/productions",{replace:!0});return}i(t.status==="rejected"?t.message:"That code is not valid.")}catch(t){i(t instanceof Error?t.message:"That code could not be redeemed.")}finally{h(!1)}};return r.useEffect(()=>{let t=!1;if(c.getState().user?.stage_access){s("/app/stage/productions",{replace:!0});return}if(n)return;const x=async()=>{if(!t){try{await o()}catch{}if(!t){if(c.getState().user?.stage_access){s("/app/stage/productions",{replace:!0});return}if(Date.now()-m.current>12e4){d(!0);return}window.setTimeout(x,3e3)}}},b=window.setTimeout(x,2500);return()=>{t=!0,window.clearTimeout(b)}},[o,s,n]),e.jsx(A,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"#faf7f5",px:3},children:e.jsx(f,{spacing:3,alignItems:"center",sx:{maxWidth:440,textAlign:"center"},children:n?e.jsxs(e.Fragment,{children:[e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:"#2a2320"},children:"Name your company"}),e.jsx(a,{sx:{color:"#6b615c"},children:"This is the name your cast and crew will see. Everything is included, and there is nothing to pay."}),e.jsxs(f,{spacing:1.5,sx:{width:"100%",textAlign:"left"},children:[g&&e.jsx(E,{severity:"error",children:g}),e.jsx(k,{fullWidth:!0,size:"small",label:"Company or Production Name",value:l,onChange:t=>w(t.target.value),placeholder:"e.g. Riverside Theatre Company"}),e.jsx(y,{variant:"contained",disabled:u,onClick:()=>{C()},startIcon:u?e.jsx(j,{size:18,color:"inherit"}):void 0,sx:{bgcolor:"#7b2d3a","&:hover":{bgcolor:"#652430"}},children:u?"Setting Up...":"Create My Company"})]})]}):v?e.jsxs(e.Fragment,{children:[e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:"#2a2320"},children:"Almost there"}),e.jsx(a,{sx:{color:"#6b615c"},children:"Your payment went through. Setup is taking a little longer than usual. Try refreshing in a moment, or reach us at [email protected] if it doesn't appear."}),e.jsx(y,{variant:"contained",onClick:()=>{d(!1),m.current=Date.now(),o().then(()=>{c.getState().user?.stage_access&&s("/app/stage/productions",{replace:!0})})},sx:{bgcolor:"#7b2d3a","&:hover":{bgcolor:"#652430"}},children:"Check Again"})]}):e.jsxs(e.Fragment,{children:[e.jsx(j,{sx:{color:"#7b2d3a"}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:"#2a2320"},children:"Setting up your company"}),e.jsx(a,{sx:{color:"#6b615c"},children:"Your subscription is confirmed. We're building your PerformrSTAGE workspace and departments now. This usually takes a few seconds."})]})})})}export{B 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.