1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66312],{6226:(e,n,t)=>{t.d(n,{y:()=>l});var i=t(13651),r=t(60780),s=t(16);let l=(0,i.M)({baseURL:"",plugins:[(0,r.tT)()],fetchOptions:{credentials:"include",onRequest:e=>{let n=(0,s.Ji)();n&&e.headers.set(s.ZD,n)}}})},7386:(e,n,t)=>{t.d(n,{FK:()=>a,SF:()=>i,TH:()=>c});let i="pro",r=new Set(["pro","studio"]),s=new Set(["pro","studio"]);function l(e,n,t,i){if(e<=0||n<=0||t<=0||i<=0)return null;let r=Math.round((1-t/i/(e/n))*100);return r>0?r:null}function a(e,n){if(!r.has(e.id)||e.price<=0||e.credits<=0)return null;let t=n.find(e=>"starter"===e.id);return t?l(t.price,t.credits,e.price,e.credits):null}function c(e,n,t){if(!s.has(e.slug)||!n)return null;let i="year"===t&&e.priceAnnualCents?e.priceAnnualCents/12:e.price;return l(n.price,n.credits,i,e.creditsPerMonth)}},9991:(e,n,t)=>{t.d(n,{QD:()=>l,ZC:()=>r,iv:()=>s,j$:()=>a});var i=t(19192);let r=(e,n)=>{let t=new URLSearchParams;return e&&t.set("type",e),n&&t.set("surface",n),t.set("limit","50"),(0,i.nr)("/models?".concat(t.toString())).then(e=>e.data)},s=e=>r("image",e),l=e=>r("video",e),a=e=>r("video").then(n=>n.filter(n=>n.category===e))},14972:(e,n,t)=>{t.d(n,{PricingCtaLink:()=>v});var i=t(42619),r=t(98059),s=t(30372),l=t(56731),a=t(62055),c=t(19192),o=t(19320),d=t(6226),u=t(6192),h=t(9208),p=t(27641),x=t(82995),m=t(45696),j=t(9203);function v(e){var n;let{plan:t,planName:v,monthlyPriceCents:g,annualPriceCents:f,className:y,children:M}=e,b="year"===(0,m.X)()&&null!=f?"year":"month",N=(0,s.useSearchParams)(),C=null!=(n=(0,j.m6)(N.get("next")))?n:void 0,[P,w]=(0,r.useState)(!1),S=async()=>{if(P)return;w(!0),(0,u.u4)("pricing.cta_clicked",{plan:t,interval:b});let e="year"===b&&f?f:g;(0,h.U)({event:"begin_checkout",currency:"USD",value:e/100,items:[{item_id:"plan_".concat(t),item_name:v,item_category:"subscription"}]});try{let{data:n}=await d.y.getSession(),i=(null==n?void 0:n.user)?await (0,x.Qn)(t,b,C):await (0,x.V4)(t,b,C);(0,p.Jz)("InitiateCheckout",{value:e/100,currency:"USD",content_name:v,content_category:"subscription",plan:t},{eventID:i.analyticsEventId}),(0,u.u4)("checkout_started",{type:"subscription",plan:t,interval:b,value_cents:e,account_state:(null==n?void 0:n.user)?"signed_in":"new"}),window.location.assign(i.url)}catch(e){if(e instanceof c.hD&&e.code===a.INITIAL_SUBSCRIPTION_ACTIVATION_PENDING)return void window.location.assign((0,o.Kt)(C));w(!1),l.o.error("Could not start checkout",{description:e instanceof Error?e.message:"Please try again."})}};return(0,i.jsx)("button",{type:"button",className:y,onClick:S,disabled:P,"aria-busy":P,children:P?"Opening secure checkoutâ¦":M})}},19320:(e,n,t)=>{t.d(n,{GO:()=>s,Kt:()=>d,MF:()=>a,NY:()=>l,hL:()=>o,q9:()=>c,wh:()=>u});var i=t(19192),r=t(9203);let s=["account-access"];function l(e,n){return[...s,null!=e?e:null,null!=n?n:null]}async function a(e){let n=await (0,i.nr)("/account-access",{cache:"no-store",signal:e});if("boolean"!=typeof(null==n?void 0:n.requiresInitialSubscription))throw Error("Could not verify account access.");return n}function c(e){let n=(0,r.m6)(e);if(!n||n.startsWith("/checkout/"))return"/dashboard/overview";let t=new URL(n,"http://localhost");return t.searchParams.delete("autocheckout"),"".concat(t.pathname).concat(t.search).concat(t.hash)}function o(e){let n=c(e);return(0,r.cy)("/pricing","/dashboard/overview"===n?null:n)}function d(e){let n=c(e);return(0,r.cy)("/checkout/activate","/dashboard/overview"===n?null:n)}function u(e,n,t){var i;let s=(0,r.m6)(n);return"/checkout/resume"===s||(null==s?void 0:s.split("?")[0])==="/checkout/activate"?s:e.requiresInitialSubscription?o(null!=(i=(0,r.m6)(t))?i:n):n}},30372:(e,n,t)=>{var i=t(38804);t.o(i,"redirect")&&t.d(n,{redirect:function(){return i.redirect}}),t.o(i,"useParams")&&t.d(n,{useParams:function(){return i.useParams}}),t.o(i,"usePathname")&&t.d(n,{usePathname:function(){return i.usePathname}}),t.o(i,"useRouter")&&t.d(n,{useRouter:function(){return i.useRouter}}),t.o(i,"useSearchParams")&&t.d(n,{useSearchParams:function(){return i.useSearchParams}})},32934:(e,n,t)=>{t.d(n,{I:()=>s});var i=t(42619);let r=e=>{let{s:n=18,children:t,className:r="",style:s}=e;return(0,i.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:r,style:s,"aria-hidden":"true",children:t})},s={ArrowRight:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M5 12h14"}),(0,i.jsx)("path",{d:"m12 5 7 7-7 7"})]}),ArrowUpRight:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M7 7h10v10"}),(0,i.jsx)("path",{d:"M7 17 17 7"})]}),Play:e=>(0,i.jsx)(r,{...e,children:(0,i.jsx)("path",{d:"M6 4.5 18 12 6 19.5z",fill:"
1currentColor"})}),VolumeOn:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M11 5 6 9H2v6h4l5 4z"}),(0,i.jsx)("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,i.jsx)("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"})]}),VolumeOff:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M11 5 6 9H2v6h4l5 4z"}),(0,i.jsx)("path",{d:"m22 9-6 6"}),(0,i.jsx)("path",{d:"m16 9 6 6"})]}),Sparkle:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M12 3v4"}),(0,i.jsx)("path",{d:"M12 17v4"}),(0,i.jsx)("path",{d:"M3 12h4"}),(0,i.jsx)("path",{d:"M17 12h4"}),(0,i.jsx)("path",{d:"M5.6 5.6 8.4 8.4"}),(0,i.jsx)("path",{d:"m15.6 15.6 2.8 2.8"}),(0,i.jsx)("path",{d:"m5.6 18.4 2.8-2.8"}),(0,i.jsx)("path",{d:"m15.6 8.4 2.8-2.8"})]}),Compass:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("path",{d:"m16.24 7.76-2.12 6.36-6.36 2.12 2.12-6.36z"})]}),Lightbulb:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M9 18h6"}),(0,i.jsx)("path",{d:"M10 22h4"}),(0,i.jsx)("path",{d:"M12 2a7 7 0 0 0-4 12.73c.6.5 1 1.2 1 2v1.27h6v-1.27c0-.8.4-1.5 1-2A7 7 0 0 0 12 2z"})]}),Clapperboard:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M4 9V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9"}),(0,i.jsx)("path",{d:"m2 9 4-5 4 5"}),(0,i.jsx)("path",{d:"m10 9 4-5 4 5"}),(0,i.jsx)("path",{d:"m18 9-4-5"})]}),Image:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,i.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,i.jsx)("path",{d:"m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21"})]}),BarChart:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M3 3v18h18"}),(0,i.jsx)("path",{d:"M7 14v4"}),(0,i.jsx)("path",{d:"M12 9v9"}),(0,i.jsx)("path",{d:"M17 5v13"})]}),Users:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),(0,i.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,i.jsx)("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),(0,i.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),Settings:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,i.jsx)("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]}),Layers:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"m12 2 9 5-9 5-9-5 9-5z"}),(0,i.jsx)("path",{d:"m3 17 9 5 9-5"}),(0,i.jsx)("path",{d:"m3 12 9 5 9-5"})]}),Check:e=>(0,i.jsx)(r,{...e,children:(0,i.jsx)("path",{d:"M20 6 9 17l-5-5"})}),Plus:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M12 5v14"}),(0,i.jsx)("path",{d:"M5 12h14"})]}),Minus:e=>(0,i.jsx)(r,{...e,children:(0,i.jsx)("path",{d:"M5 12h14"})}),Search:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,i.jsx)("path",{d:"m20 20-3.5-3.5"})]}),TrendingUp:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M22 7 13.5 15.5 8.5 10.5 2 17"}),(0,i.jsx)("path",{d:"M16 7h6v6"})]}),Eye:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"}),(0,i.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),Music:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M9 18V5l12-2v13"}),(0,i.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,i.jsx)("circle",{cx:"18",cy:"16",r:"3"})]}),Wand:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"m15 4 5 5-12 12-5-5z"}),(0,i.jsx)("path",{d:"M19 8 8 19"}),(0,i.jsx)("path",{d:"M14 4h3"}),(0,i.jsx)("path",{d:"M20 10v3"})]}),Film:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2"}),(0,i.jsx)("path",{d:"M7 2v20"}),(0,i.jsx)("path",{d:"M17 2v20"}),(0,i.jsx)("path",{d:"M2 12h20"}),(0,i.jsx)("path",{d:"M2 7h5"}),(0,i.jsx)("path",{d:"M2 17h5"}),(0,i.jsx)("path",{d:"M17 17h5"}),(0,i.jsx)("path",{d:"M17 7h5"})]}),Tiktok:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M16 8a5 5 0 0 0 5 5V8.5"}),(0,i.jsx)("path",{d:"M16 4v12a4 4 0 1 1-4-4"})]}),Youtube:e=>{let{s:n=20,className:t="",style:r}=e,s=Math.max(20,n),l=Math.round(159/110*s);return(0,i.jsxs)("svg",{width:l,height:s,viewBox:"0 0 159 110",className:t,style:{...r,width:l,height:s},role:"img","aria-label":"YouTube",children:[(0,i.jsx)("path",{d:"M154 17.5c-1.82-6.73-7.07-12-13.8-13.8-9.04-3.49-96.6-5.2-122 .1-6.73 1.82-12 7.07-13.8 13.8C-.244 32.58-.244 77.42 4.4 92.5c1.82 6.73 7.07 12 13.8 13.8 21.1 4.86 121 5.54 135.7 0 6.73-1.82 12-7.07 13.8-13.8 4.64-15.08 4.64-59.92.3-75z",fill:"#FF0000"}),(0,i.jsx)("path",{d:"M64.2 78.4 105.7 55 64.2 31.6z",fill:"#FFFFFF"})]})},Instagram:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"5"}),(0,i.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,i.jsx)("circle",{cx:"17.5",cy:"6.5",r:"0.5",fill:"currentColor"})]}),Facebook:e=>(0,i.jsx)(r,{...e,children:(0,i.jsx)("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"})}),X:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("path",{d:"M18 6 6 18"}),(0,i.jsx)("path",{d:"m6 6 12 12"})]}),XTwitter:e=>{let{s:n=16,className:t="",style:r}=e;return(0,i.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"
1currentColor",className:t,style:r,"aria-hidden":"true",children:(0,i.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},Star:e=>(0,i.jsx)(r,{...e,children:(0,i.jsx)("path",{d:"m12 2 3.1 6.3 7 1-5 4.9 1.2 6.9L12 17.8 5.7 21l1.2-6.9-5-4.9 7-1z"})}),Lock:e=>(0,i.jsxs)(r,{...e,children:[(0,i.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,i.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}},34093:(e,n,t)=>{t.d(n,{PricingCardPrice:()=>d,PricingCardPromoNote:()=>u});var i=t(42619),r=t(62055),s=t(16077),l=t(7386),a=t(45696);function c(e){let n=e/100;return Number.isInteger(n)?"$".concat(n):"$".concat(n.toFixed(2))}function o(e){let n=new Date(e);return Number.isNaN(n.getTime())?"soon":new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(n)}function d(e){var n;let{priceCents:t,priceAnnualCents:o,savingsPercent:d,creditsPerMonth:u,starterPack:h,slug:p}=e,x=(0,s.bP)("subscriptions",p),m=(0,a.X)(),j="year"===m&&o?o:null,v=j||(null==x?void 0:x.kind)!=="discount"?null:x,g=(null==x?void 0:x.kind)==="bonus_credits"?x:null,f=function(){var e;let n=(0,s.fI)(),t=(0,s.u)(null!=(e=null==n?void 0:n.abFlagKey)?e:null);return!!(n&&(!n.abFlagKey||"promo"===t)&&n.rows.some(e=>e.planSlugs.length>0&&(0,r.isPromoWindowActive)(e.startsAt,e.endsAt)))}(),y=j?Math.round(j/12):null,M=null!=y&&y<t,b=(0,l.TH)({slug:p,price:t,priceAnnualCents:o,creditsPerMonth:u},h,j?"year":"month");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"pricing-price".concat(v||M?" pricing-price-promo":""),children:j?(0,i.jsxs)(i.Fragment,{children:[M&&(0,i.jsx)("span",{className:"pricing-price-original",children:c(t)}),(0,i.jsx)("span",{className:"pricing-price-amount",children:c(Math.round(j/12))}),(0,i.jsx)("span",{className:"pricing-price-period",children:"/month"})]}):v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"pricing-price-original",children:c(t)}),(0,i.jsx)("span",{className:"pricing-price-amount",children:c((0,r.applyPromoDiscount)(t,v))}),(0,i.jsx)("span",{className:"pricing-price-period",children:"/month"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"pricing-price-amount",children:c(t)}),(0,i.jsx)("span",{className:"pricing-price-period",children:"/month"})]})}),(0,i.jsx)("div",{className:"pricing-plan-value-note",children:null!==b&&(0,i.jsxs)("span",{className:"pricing-plan-value-pill",children:["Save ",b,"% per credit vs Starter pack"]})}),"year"===m&&(0,i.jsxs)("div",{className:"pricing-annual-note",children:[j&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"pricing-annual-billed",children:"Billed annually"}),null!=d&&d>0&&(0,i.jsxs)("span",{className:"pricing-save-pill",children:["Save ",d,"%"]})]}),!j&&(0,i.jsx)("span",{className:"pricing-annual-billed",children:"Monthly billing only"})]}),f&&(0,i.jsxs)("div",{className:"pricing-price-pill-row",children:[v&&(0,i.jsxs)("span",{className:"pricing-promo-off",children:[v.percentOff,"% OFF"]}),g&&(0,i.jsxs)("span",{className:"pricing-promo-off",children:["+",null==(n=g.bonusCredits)?void 0:n.toLocaleString()," credits"]})]})]})}function u(e){var n;let{slug:t}=e,r=(0,s.bP)("subscriptions",t),l=(0,a.X)();if(!r)return null;let c="year"!==l&&"discount"===r.kind?r:null,d="bonus_credits"===r.kind?r:null;return c||d?(0,i.jsxs)("div",{className:"pricing-promo-bottom",children:[c&&(0,i.jsxs)("p",{className:"pricing-promo-note",children:["Code ",(0,i.jsx)("span",{className:"pricing-promo-code mono",children:c.code})," â applied automatically at checkout",c.endsAt&&(0,i.jsxs)("span",{className:"pricing-promo-limited",children:["Limited time â ends ",o(c.endsAt)]})]}),d&&(0,i.jsxs)("p",{className:"pricing-promo-note",children:[null==(n=d.bonusCredits)?void 0:n.toLocaleString()," bonus credits added on your first payment",d.endsAt&&(0,i.jsxs)("span",{className:"pricing-promo-limited",children:["Limited time â ends ",o(d.endsAt)]})]})]}):null}},45696:(e,n,t)=>{t.d(n,{PricingIntervalProvider:()=>c,PricingIntervalToggle:()=>
1o,X:()=>a});var i=t(42619),r=t(98059),s=t(6192);let l=(0,r.createContext)(null);function a(){var e,n;return null!=(n=null==(e=(0,r.useContext)(l))?void 0:e.interval)?n:"month"}function c(e){let{children:n}=e,[t,s]=(0,r.useState)("month");return(0,i.jsx)(l.Provider,{value:{interval:t,setInterval:s},children:n})}function o(){let e=(0,r.useContext)(l);if(!e)return null;let{interval:n,setInterval:t}=e;function a(e){e!==n&&(t(e),(0,s.u4)("pricing.interval_toggled",{interval:e}))}return(0,i.jsxs)("div",{className:"pricing-toggle",role:"tablist","aria-label":"Billing interval",children:[(0,i.jsx)("button",{type:"button",role:"tab","aria-selected":"month"===n,className:"pricing-toggle-btn".concat("month"===n?" is-active":""),onClick:()=>a("month"),children:"Monthly"}),(0,i.jsxs)("button",{type:"button",role:"tab","aria-selected":"year"===n,className:"pricing-toggle-btn".concat("year"===n?" is-active":""),onClick:()=>a("year"),children:["Annual",(0,i.jsx)("span",{className:"pricing-toggle-hint",children:"Save up to 21%"})]})]})}},51212:(e,n,t)=>{t.d(n,{PricingClipControls:()=>h,PricingClipDisclaimer:()=>x,PricingClipEstimate:()=>p,PricingClipEstimatesProvider:()=>d});var i=t(42619),r=t(98059),s=t(66245);function l(e){var n,t;return e.isActive&&"text-to-video"===e.category&&"per second"===e.unitLabel&&Number.isFinite(e.creditsPerUnit)&&e.creditsPerUnit>0&&(null!=(n=e.minDurationSeconds)?n:0)<=10&&(null!=(t=e.maxDurationSeconds)?t:0)>=10}function a(e,n,t){var i;if(!t)return 1;let r=null==(i=e.costModifiers)?void 0:i[n];if(null==r)return 1;if("object"!=typeof r||Array.isArray(r))return null;let s=r[t];return"number"==typeof s&&Number.isFinite(s)&&s>0?s:null}let c=(0,r.createContext)(null);function o(e){var n,t,a,o,d,u;let{children:h}=e,p=(0,s.x)(),[x,m]=(0,r.useState)("wavespeed/bytedance/seedance-2.0-mini/text-to-vi
1deo"),[j,v]=(0,r.useState)("480p"),g=(null!=(a=p.data)?a:[]).filter(l),f=null!=(o=g.find(e=>e.modelId===x))?o:g[0],y=(null==f||null==(n=f.supportedResolutions)?void 0:n.includes(j))?j:null!=(u=null!=(d=null==f?void 0:f.defaultResolution)?d:null==f||null==(t=f.supportedResolutions)?void 0:t[0])?u:null;return(0,i.jsx)(c.Provider,{value:{models:g,model:f,resolution:y,setModelId:m,setResolution:v,loading:p.isPending||p.isFetching,retry:()=>void p.refetch()},children:h})}function d(e){let{children:n,enabled:t}=e;return t?(0,i.jsx)(o,{children:n}):n}function u(e){return e.name.replace(/\s*\(Text-to-Video\)$/i,"")}function h(){var e;let n=(0,r.useContext)(c),t=(0,r.useId)();if(!n)return null;let{models:s,model:l,resolution:a,setModelId:o,setResolution:d,loading:h,retry:p}=n;return(0,i.jsxs)("div",{className:"pricing-clip-controls",children:[(0,i.jsxs)("div",{className:"pricing-clip-intro",children:[(0,i.jsx)("p",{className:"pricing-clip-heading",children:"See what your credits can create"}),(0,i.jsx)("p",{className:"pricing-clip-settings",children:"Compare monthly clip estimates by model and resolution."})]}),l?(0,i.jsxs)("div",{className:"pricing-clip-selectors",children:[(0,i.jsxs)("label",{htmlFor:"".concat(t,"-model"),children:["Video model",(0,i.jsx)("select",{id:"".concat(t,"-model"),value:l.modelId,onChange:e=>o(e.target.value),children:s.map(e=>(0,i.jsx)("option",{value:e.modelId,children:u(e)},e.modelId))})]}),!!(null==(e=l.supportedResolutions)?void 0:e.length)&&(0,i.jsxs)("label",{htmlFor:"".concat(t,"-resolution"),children:["Resolution",(0,i.jsx)("select",{id:"".concat(t,"-resolution"),value:null!=a?a:"",onChange:e=>d(e.target.value),children:l.supportedResolutions.map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]})]}):(0,i.jsxs)("div",{className:"pricing-clip-settings",role:"status",children:[h?"Loading clip estimatesâ¦":"Clip estimates are temporarily unavailable.",!h&&(0,i.jsx)("button",{type:"button",onClick:p,children:"Retry estimates"})]})]})}function p(e){var n;let{credits:t}=e,s=(0,r.useContext)(c);if(!(null==s?void 0:s.model))return null;let{model:o,resolution:d}=s,h=function(e,n,t){var i,r;if(!Number.isFinite(e)||e<0||!l(n)||t&&!(null==(i=n.supportedResolutions)?void 0:i.includes(t)))return null;let s=a(n,"resolution",n.defaultResolution),c=a(n,"resolution",null!=t?t:n.defaultResolution),o=(null==(r=n.costModifiers)?void 0:r.audioMode)?a(n,"audioMode","off"):1;if(null==s||null==c||null==o)return null;let d=Math.ceil(10*n.creditsPerUnit*(c/s)*o);return!Number.isFinite(d)||d<=0?null:Math.floor(e/d)}(t,o,d);return(0,i.jsxs)("div",{className:"pricing-clip-estimate","aria-live":"polite","aria-atomic":"true",children:[(0,i.jsxs)("p",{className:"pricing-clip-count",children:[null==h?"Estimate unavailable":"â ".concat(h.toLocaleString("en-US")," clips"),null!=h&&(0,i.jsx)("span",{children:" / month"})]}),(0,i.jsx)("p",{className:"pricing-clip-settings",children:u(o)}),(0,i.jsx)("p",{className:"pricing-clip-settings",children:"".concat(10,"s \xb7 ").concat(null!=d?d:"Standard resolution"," \xb7 ").concat(o.capabilities.generateAudio?(null==(n=o.costModifiers)?void 0:n.audioMode)?"Audio off":"Native audio included":"No audio")})]})}function x(){let e=(0,r.useContext)(c);return(null==e?void 0:e.model)?(0,i.jsx)("p",{className:"pricing-clip-disclaimer",children:"Conservative estimates using rounded model rates and all monthly plan credits. Actual clip counts may be slightly higher. Excludes promotional credits and video-reference inputs. Images, voiceovers, regenerations and AI Director productions share the same credit balance."}):null}},66245:(e,n,t)=>{t.d(n,{h:()=>s,x:()=>l});var i=t(82895),r=t(9991);function s(e){return(0,i.I)({queryKey:["models","image",null!=e?e:null],queryFn:()=>(0,r.iv)(e),staleTime:6e5})}function l(e){return(0,i.I)({queryKey:e?["models","video",e]:["models","video"],queryFn:()=>(0,r.QD)(e),staleTime:6e5})}},82895:(e,n,t)=>{t.d(n,{I:()=>s});var i=t(14126),r=t(92672);function s(e,n){return(0,r.t)(e,i.$,n)}}}]);
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.