PageSourceSearch

https://www.screenplayer.ai/_next/static/chunks/pages/choose-plan-2aaf6358ed4592bb.js

js screenplayer.ai collected 2026-10-05 13:53:17 UTC 14,442 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[976],{24514:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/choose-plan",function(){return r(4647)}])},31683:function(e,t,r){"use strict";r.d(t,{v:function(){return i}});var n=r(85893),a=r(67294);function i(e){let{fullPage:t=!1}=e,r=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e;let n=r.current;if(!n)return;let a=n.getContext("2d");if(!a)return;let i=()=>{n.width=window.innerWidth,n.height=t?Math.max(document.documentElement.scrollHeight,window.innerHeight):2.2*window.innerHeight};i(),window.addEventListener("resize",i),t&&(new MutationObserver(i).observe(document.body,{childList:!0,subtree:!0}),setTimeout(i,500),setTimeout(i,1500));let s=[];for(let e=0;e<50;e++)s.push({x:Math.random()*n.width,y:Math.random()*n.height,vx:(Math.random()-.5)*.3,vy:(Math.random()-.5)*.3,size:2*Math.random()+.5,opacity:.3*Math.random()+.1});let o=[];for(let e=0;e<4;e++)o.push({x:Math.random()*n.width,y:Math.random()*n.height,vx:(Math.random()-.5)*.15,vy:(Math.random()-.5)*.15,size:350*Math.random()+350,opacity:.18*Math.random()+.12});let l=()=>{a.clearRect(0,0,n.width,n.height);let t=a.createRadialGradient(n.width/2,n.height/3,0,n.width/2,n.height/3,.6*n.width);t.addColorStop(0,"rgba(138, 92, 246, 0.08)"),t.addColorStop(.5,"rgba(100, 60, 180, 0.04)"),t.addColorStop(1,"rgba(0, 0, 0, 0)"),a.fillStyle=t,a.fillRect(0,0,n.width,n.height),o.forEach(e=>{e.x+=e.vx,e.y+=e.vy,e.x<-e.size&&(e.x=n.width+e.size),e.x>n.width+e.size&&(e.x=-e.size),e.y<-e.size&&(e.y=n.height+e.size),e.y>n.height+e.size&&(e.y=-e.size);let t=a.createRadialGradient(e.x,e.y,0,e.x,e.y,e.size);t.addColorStop(0,"rgba(138, 92, 246, ".concat(.6*e.opacity,")")),t.addColorStop(.4,"rgba(138, 92, 246, ".concat(.3*e.opacity,")")),t.addColorStop(1,"rgba(138, 92, 246, 0)"),a.fillStyle=t,a.beginPath(),a.arc(e.x,e.y,e.size,0,2*Math.PI),a.fill()}),s.forEach(e=>{e.x+=e.vx,e.y+=e.vy,e.x<0&&(e.x=n.width),e.x>n.width&&(e.x=0),e.y<0&&(e.y=n.height),e.y>n.height&&(e.y=0),a.beginPath(),a.arc(e.x,e.y,e.size,0,2*Math.PI),a.fillStyle="rgba(200, 180, 255, ".concat(e.opacity,")"),a.fill();let t=a.createRadialGradient(e.x,e.y,0,e.x,e.y,3*e.size);t.addColorStop(0,"rgba(138, 92, 246, ".concat(.15*e.opacity,")")),t.addColorStop(1,"rgba(138, 92, 246, 0)"),a.fillStyle=t,a.beginPath(),a.arc(e.x,e.y,3*e.size,0,2*Math.PI),a.fill()}),e=requestAnimationFrame(l)};return l(),()=>{window.removeEventListener("resize",i),cancelAnimationFrame(e)}},[]),(0,n.jsx)("canvas",{ref:r,className:"".concat(t?"fixed":"absolute"," inset-0 pointer-events-none"),style:{opacity:.8}})}},77429:function(e,t,r){"use strict";r.d(t,{k:function(){return s}});var n=r(11163),a=r.n(n),i=r(77484);async function s(){try{await (0,i.T)()}catch(e){console.error("Error during 401 logout:",e),a().push("/userauth/signin")}}},77484:function(e,t,r){"use strict";r.d(t,{T:function(){return l}});var n=r(96816),a=r(11163),i=r.n(a),s=r(55678),o=r(57067);let l=async()=>{let{error:e}=await n.O.auth.signOut();if(e){console.error("Error logging out:",e),s.Am.error("Error logging out — clearing your session locally");try{for(let e of Object.keys(localStorage))e.startsWith("sb-")&&e.endsWith("-auth-token")&&localStorage.removeItem(e)}catch(e){console.error("Error force-clearing local session:",e)}}(0,o.Cm)(),window.Intercom&&window.Intercom("shutdown"),i().reload()}},18101:function(e,t,r){"use strict";r.d(t,{N2:function(){return s},Xl:function(){return i},vJ:function(){return a}});let n="sp_pending_demo";function a(e){try{localStorage.setItem(n,JSON.stringify({id:e,at:Date.now()}))}catch(e){}}function i(){try{let e=localStorage.getItem(n);if(!e)return null;let{id:t,at:r}=JSON.parse(e);if(!t||"number"!=typeof r||Date.now()-r>36e5)return localStorage.removeItem(n),null;return t}catch(e){return null}}function s(){try{localStorage.removeItem(n)}catch(e){}}},23136:function(e,t,r){"use strict";r.d(t,{m:function(){return a}});var n=r(52879);function a(){if(n.I)try{var e,t;let r=window;return(null===(e=r.Rewardful)||void 0===e?void 0:e.referral)||(null===(t=r.rewardful)||void 0===t?void 0:t.referral)||void 0}catch(e){return}}},53688:function(e,t,r){"use strict";r.d(t,{Y:function(){return s}});var n=r(67294),a=r(3013),i=r(77429);function s(){let{session:e}
1=(0,a.Kg)(),[t,r]=(0,n.useState)(!0),[s,o]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{if(!(null==e?void 0:e.access_token)){r(!1);return}try{r(!0);let n=await fetch("/api/user/subscription",{headers:{Authorization:"Bearer ".concat(e.access_token)}});if(n.ok){var t;let e=await n.json();o((null===(t=e.subscription)||void 0===t?void 0:t.isTrialPeriod)||!1),c(e.subscription)}else 401===n.status&&await (0,i.k)()}catch(e){console.error("Error fetching subscription status:",e)}finally{r(!1)}})()},[null==e?void 0:e.access_token]),{isLoading:t,isTrialPeriod:s,subscriptionData:l}}},83989:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},78865:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},12779:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},2553:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},23432:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},7656:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},4270:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},33058:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},4647:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return M}});var n=r(85893),a=r(67294),i=r(11163),s=r(41664),o=r.n(s),l=r(25675),c=r.n(l),d=r(23432),u=r(83989),h=r(55678),f=r(3013),m=r(53688),p=r(18101),x=r(31683),y=r(33058),g=r(78865),v=r(96063);let b=["STARTER","PRO","EXECUTIVE"],w={STARTER:"For hearing a script read aloud.",PRO:"For rewriting with your ears.",EXECUTIVE:"For sharing it around a team."};function j(e){let{onSelect:t}=e,[r,i]=(0,a.useState)(!1),[s,o]=(0,a.useState)("PRO");return(0,a.useEffect)(()=>{var e;let n=v.dh[s];if(!n)return;let a={planId:n.id,interval:r?"annual":"monthly",priceId:r?null===(e=n.annual)||void 0===e?void 0:e.stripePriceId:n.stripePriceId};try{localStorage.setItem("sp_intended_plan",JSON.stringify({...a,savedAt:Date.now()}))}catch(e){}null==t||t(a)},[s,r,t]),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4 flex-wrap mb-5",children:[(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 text-violet-300 text-xs font-semibold tracking-[0.08em] uppercase",children:[(0,n.jsx)(y.Z,{className:"w-3.5 h-3.5"}),"Your cast is ready"]}),(0,n.jsxs)("div",{className:"inline-flex items-center rounded-full border border-white/10 bg-white/[0.03] p-1 text-xs",children:[(0,n.jsx)("button",{type:"button",onClick:()=>i(!1),className:"px-3 py-1.5 rounded-full transition-colors ".concat(r?"text-gray-400 hover:text-gray-200":"bg-white/10 text-white"),children:"Monthly"}),(0,n.jsxs)("button",{type:"button",onClick:()=>i(!0),className:"px-3 py-1.5 rounded-full transition-colors ".concat(r?"bg-white/10 text-white":"text-gray-400 hover:text-gray-200"),children:["Annual ",(0,n.jsx)("span",{className:"text-violet-300",children:"−20%"})]})]})]}),(0,n.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold text-white leading-snug tracking-tight",children:"Pick a plan and hear your screenplay"}),(0,n.jsx)("p",{className:"mt-2 text-sm text-gray-400 max-w-xl",children:"Your screenplay and casting are already saved. Choose a plan, create your account, and we'll generate the table read — performed by the cast you picked."}),(0,n.jsx)("div",{className:"mt-6 grid sm:grid-cols-3 gap-3",children:b.map(e=>{var t,a;let i=v.dh[e];if(!i)return null;let l=r&&null!==(a=null===(t=i.annual)||void 0===t?void 0:t.price)&&void 0!==a?a:i.price,c=s===e,d=i.features.filter(e=>e.included);return(0,n.jsxs)("button",{type:"button",onClick:()=>o(e),"aria-pressed":c,className:"relative flex flex-col items-stretch justify-start text-left rounded-2xl border p-4 transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-400 ".concat(c?"border-violet-500 bg-violet-500/10 shadow-[0_0_30px_rgba(139,92,246,0.18)]":"border-white/10 bg-white/[0.02] hover:border-white/20"),children:["PRO"===e&&(0,n.jsx)("span",{className:"absolute -top-2 right-3 rounded-full bg-violet-500 px-2 py-0.5 text-[10px] font-semibold text-white",children:"Most popular"}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("p",{className:"text-white font-semibold capitalize",children:i.name}),(0,n.jsx)("span",{className:"w-4 h-4 rounded-full border flex items-center justify-center ".concat(c?"border-violet-400 bg-vi
1olet-500":"border-white/25"),children:c&&(0,n.jsx)(g.Z,{className:"w-2.5 h-2.5 text-white"})})]}),(0,n.jsxs)("p",{className:"mt-2 flex items-baseline gap-1",children:[(0,n.jsxs)("span",{className:"text-2xl font-bold text-white",children:["$",l]}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:"/mo"})]}),r&&(0,n.jsx)("p",{className:"text-[11px] text-violet-300",children:"billed yearly"}),(0,n.jsx)("p",{className:"mt-2 text-xs text-gray-500",children:w[e]}),(0,n.jsx)("ul",{className:"mt-3 space-y-1.5",children:d.map(e=>(0,n.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,n.jsx)(g.Z,{className:"w-3 h-3 text-violet-400 mt-[3px] shrink-0"}),(0,n.jsx)("span",{className:"text-[11px] leading-snug text-gray-400",children:e.name})]},e.name))})]},e)})}),(0,n.jsx)("p",{className:"mt-4 text-[11px] text-gray-600",children:"A credit generates one full table read. Unused credits roll over up to one month's allowance. Cancel any time."})]})}var k=r(23136);let N=()=>{if("undefined"==typeof document)return{};try{let e=e=>{var t;let r="; ".concat(document.cookie).split("; ".concat(e,"="));if(2===r.length)return null===(t=r.pop())||void 0===t?void 0:t.split(";").shift()};return{fbc:e("_fbc"),fbp:e("_fbp")}}catch(e){return{}}};function M(){var e,t;let r=(0,i.useRouter)(),{session:s,isLoading:l}=(0,f.Kg)(),{isLoading:y,subscriptionData:g}=(0,m.Y)(),[v,b]=(0,a.useState)(null),[w,M]=(0,a.useState)(!1),S="string"==typeof r.query.demo?r.query.demo:null,z=S?"/dashboard?demo=".concat(S):"/dashboard";(0,a.useEffect)(()=>{l||s||r.replace("/userauth/signin?from=homepage_upload")},[l,s,r]);let E=["active","trialing"].includes(null!==(e=null==g?void 0:g.status)&&void 0!==e?e:"");(0,a.useEffect)(()=>{!l&&s&&!y&&E&&r.replace(z)},[l,s,y,E,z,r]);let C=async()=>{if(!(null==s?void 0:s.access_token)||!(null==v?void 0:v.priceId)){h.Am.error("Pick a plan to continue");return}M(!0);try{let{fbc:e,fbp:t}=N(),r=await fetch("/api/checkout-session",{method:"POST",headers:{Authorization:"Bearer ".concat(s.access_token),"Content-Type":"application/json"},body:JSON.stringify({priceId:v.priceId,mode:"subscription",fbc:e,fbp:t,rewardfulReferral:(0,k.m)(),billingInterval:v.interval})}),n=await r.json();if(!r.ok||!n.url)throw Error(n.error||"Couldn't start checkout");S&&(0,p.vJ)(S),window.location.href=n.url}catch(e){h.Am.error(e.message||"Couldn't start checkout"),M(!1)}};return l||!s||y||E?(0,n.jsx)("div",{className:"min-h-screen bg-[#0a0a0f] flex items-center justify-center",children:(0,n.jsx)(d.Z,{className:"w-6 h-6 text-violet-400 animate-spin"})}):(0,n.jsxs)("div",{className:"min-h-screen bg-[#0a0a0f] relative overflow-hidden",children:[(0,n.jsx)(x.v,{}),(0,n.jsxs)("div",{className:"relative z-10 max-w-4xl mx-auto px-4 py-10 sm:py-14",children:[(0,n.jsx)("div",{className:"flex justify-center mb-8",children:(0,n.jsx)(o(),{href:"/",className:"transition-opacity hover:opacity-80",children:(0,n.jsx)(c(),{src:"/landingPage-logo.png",alt:"Screenplayer",width:200,height:46,quality:100,className:"h-9 w-auto"})})}),(0,n.jsxs)("div",{className:"bg-zinc-900/70 backdrop-blur-sm border border-zinc-800 rounded-2xl p-6 sm:p-8 shadow-2xl",style:{animation:"fadeInUp 0.5s ease-out"},children:[(0,n.jsx)(j,{onSelect:b}),(0,n.jsxs)("div",{className:"mt-7 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[(0,n.jsx)(o(),{href:z,className:"text-sm text-gray-500 hover:text-gray-300 transition-colors order-2 sm:order-1",children:"Not now — take me to my library"}),(0,n.jsx)("button",{type:"button",onClick:C,disabled:w||!v,className:"order-1 sm:order-2 inline-flex items-center justify-center gap-2 px-6 py-3 rounded-xl bg-gradient-to-r from-violet-600 to-violet-500 text-white font-semibold text-sm transition-[filter,transform] duration-150 hover:brightness-110 active:scale-[0.99] disabled:opacity-60 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-400",children:w?(0,n.jsx)(d.Z,{className:"w-4 h-4 animate-spin"}):(0,n.jsxs)(n.Fragment,{children:["Continue with"," ",(0,n.jsx)("span",{className:"capitalize",children:null!==(t=null==v?void 0:v.planId)&&void 0!==t?t:"plan"}),(0,n.jsx)(u.Z,{className:"w-4 h-4"})]})})]})]})]})]})}}},function(e){e.O(0,[1664,1768,6063,2888,9774,179],function(){return e(e.s=24514)}),_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.