1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6325],{4617:(e,t,s)=>{s.d(t,{bq:()=>m,eb:()=>f,gC:()=>x,l6:()=>d,s3:()=>c,yv:()=>u});var r=s(51129);s(65133);var a=s(41349),n=s(22755),i=s(32247),l=s(8402),o=s(55730);function d(e){let{...t}=e;return(0,r.jsx)(a.bL,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,r.jsx)(a.YJ,{"data-slot":"select-group",...t})}function u(e){let{...t}=e;return(0,r.jsx)(a.WT,{"data-slot":"select-value",...t})}function m(e){let{className:t,size:s="default",children:i,...l}=e;return(0,r.jsxs)(a.l9,{"data-slot":"select-trigger","data-size":s,className:(0,o.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l,children:[i,(0,r.jsx)(a.In,{asChild:!0,children:(0,r.jsx)(n.A,{className:"size-4 opacity-50"})})]})}function x(e){let{className:t,children:s,position:n="popper",...i}=e;return(0,r.jsx)(a.ZL,{children:(0,r.jsxs)(a.UC,{"data-slot":"select-content",className:(0,o.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...i,children:[(0,r.jsx)(g,{}),(0,r.jsx)(a.LM,{className:(0,o.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,r.jsx)(p,{})]})})}function f(e){let{className:t,children:s,...n}=e;return(0,r.jsxs)(a.q7,{"data-slot":"select-item",className:(0,o.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...n,children:[(0,r.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(a.VF,{children:(0,r.jsx)(i.A,{className:"size-4"})})}),(0,r.jsx)(a.p4,{children:s})]})}function g(e){let{className:t,...s}=e;return(0,r.jsx)(a.PP,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,r.jsx)(l.A,{className:"size-4"})})}function p(e){let{className:t,...s}=e;return(0,r.jsx)(a.wn,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,r.jsx)(n.A,{className:"size-4"})})}},9353:(e,t,s)=>{s.d(t,{d:()=>i});var r=s(70357);let a=(0,r.createServerReference)("7fe85ee6e8840eb392570ee71e95d583e979438817",r.callServer,void 0,r.findSourceMapURL,"consumeCreditsAction"),n=(0,r.createServerReference)("7f136f3ea96dab37c176a8d902ed3cae461b327d44",r.callServer,void 0,r.findSourceMapURL,"getCreditBalanceAction"),i=(0,s(48403).v)((e,t)=>({balance:0,isLoading:!1,error:null,fetchCredits:async function(s){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!t().isLoading){if(!s){e({balance:0,error:null});return}console.log("fetchCredits, fetching credits from server, useCache:",r),e({isLoading:!0,error:null});try{var a,i;let t=await n({useCache:r});if(null==t?void 0:null===(a=t.data)||void 0===a?void 0:a.success){let s=t.data.credits||0;console.log("fetchCredits, set new balance",s),e({balance:s,isLoading:!1,error:null})}else console.warn("fetchCredits, failed to fetch credit balance",t),e({error:(null==t?void 0:null===(i=t.data)||void 0===i?void 0:i.error)||"Failed to fetch credit balance",isLoading:!1})}catch(t){console.error("fetchCredits, error:",t),e({error:"Failed to fetch credit balance",isLoading:!1})}}},consumeCredits:async(s,r)=>{let{balance:n}
1=t();if(n<s)return console.log("consumeCredits, insufficient credits",n,s),e({error:"Insufficient credits"}),!1;e({balance:n-s,error:null,isLoading:!0});try{var i,l;let t=await a({amount:s,description:r});if(null==t?void 0:null===(i=t.data)||void 0===i?void 0:i.success)return e({isLoading:!1,error:null}),!0;return console.warn("consumeCredits, reverting optimistic update"),e({balance:n,error:(null==t?void 0:null===(l=t.data)||void 0===l?void 0:l.error)||"Failed to consume credits",isLoading:!1}),!1}catch(t){return console.error("consumeCredits, error:",t),e({balance:n,error:"Failed to consume credits",isLoading:!1}),!1}}}))},10528:(e,t,s)=>{s.d(t,{XO:()=>n,iN:()=>o,tx:()=>d});var r=s(91112),a=s(32764);let{Link:n,getPathname:i,redirect:l,usePathname:o,useRouter:d}=(0,r.A)(a.DT)},13800:(e,t,s)=>{s.d(t,{I:()=>i});var r=s(77193),a=s(9353),n=s(65133);function i(){let{balance:e,isLoading:t,error:s,fetchCredits:i,consumeCredits:l}=(0,a.d)(),{data:o}=r.y.useSession(),d=(0,n.useCallback)(function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=null==o?void 0:o.user;t&&i(t,e)},[null==o?void 0:o.user,i]);return(0,n.useEffect)(()=>{let e=null==o?void 0:o.user;e&&i(e,!0)},[null==o?void 0:o.user,i]),{balance:e,isLoading:t,error:s,fetchCredits:d,consumeCredits:l,hasEnoughCredits:t=>e>=t}}},24819:(e,t,s)=>{s.d(t,{p:()=>n});var r=s(51129);s(65133);var a=s(55730);function n(e){let{className:t,type:s,...n}=e;return(0,r.jsx)("input",{type:s,"data-slot":"input",className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}},33811:(e,t,s)=>{s.d(t,{T:()=>n});var r=s(51129);s(65133);var a=s(55730);function n(e){let{className:t,...s}=e;return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...s})}},36877:(e,t,s)=>{s.d(t,{h:()=>l});var r=s(51129),a=s(99725),n=s(97973),i=s(76329);function l(e){let{open:t,onOpenChange:s,currentCredits:l,requiredCredits:o,onViewPlans:d}=e,c=(0,i.c3)("Common.insufficientCreditsModal"),u=(0,i.c3)("Common");return(0,r.jsx)(a.lG,{open:t,onOpenChange:s,children:(0,r.jsxs)(a.Cf,{className:"max-w-md",children:[(0,r.jsx)(a.c7,{children:(0,r.jsx)(a.L3,{className:"text-lg font-medium",children:c("title")})}),(0,r.jsxs)("div",{className:"py-4 space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 bg-muted/30 rounded-lg border",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),(0,r.jsx)("span",{className:"text-sm text-muted-foreground",children:c("needLabel")}),(0,r.jsxs)("span",{className:"font-semibold text-foreground",children:[o," ",c("creditsLabel")]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 text-muted-foreground",children:[(0,r.jsxs)("span",{className:"text-sm",children:[c("balanceLabel"),":"]}),(0,r.jsx)("span",{className:"font-medium text-foreground",children:l})]})]}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:c("description")})]}),(0,r.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,r.jsx)(n.$,{variant:"outline",className:"flex-1",onClick:()=>s(!1),children:u("cancel")}),(0,r.jsx)(n.$,{className:"flex-1",onClick:()=>{s(!1),d()},children:c("viewPlans")})]})]})})}},41788:(e,t,s)=>{s.d(t,{T:()=>y});var r=s(51129),a=s(99725),n=s(74507),i=s(85827),l=s(67828),o=s(8685),d=s(23852),c=s(13800),u=s(55730),m=s(55915),x=s(76329),f=s(65133),g=s(65952),p=s(46174),v=s(47915),h=s(65028),b=s(97973);function y(e){var t,s;let{open:y,onOpenChange:j,metadata:w}=e,N=(0,x.c3)("PricingPage"),{currentPlan:k,subscription:S}=(0,d.u)(),{balance:C}=(0,c.I)(),{selectedCurrency:T}=(0,v.c)(),_=!!(S||k&&!k.isFree),[A,I]=(0,f.useState)("year"),[L,E]=(0,f.useState)(!1),[P,O]=(0,f.useState)(!1),z=async()=>{try{await navigator.clipboard.writeText("[email protected]"),O(!0),setTimeout(()=>O(!1),2e3)}catch(e){console.error("Failed to copy email:",e)}};(0,f.useEffect)(()=>{_?I("pack"):I("year")},[_]);let R=Object.values((0,l.I)()),F=(null==k?void 0:k.id)||null,M=R.filter(e=>!e.isFree&&!e.disabled&&e.prices.some(e=>!e.disabled&&e.type===m.Y.SUBSCRIPTION)),D=R.filter(e=>!e.isFree&&!e.disabled&&e.prices.some(e=>!e.disabled&&e.type===m.Y.ONE_TIME)),V=M.some(e=>e.prices.some(e=>e.type===m.Y.SUBSCRIPTION&&e.interval===m.c.MONTH)),B=M.some(e=>e.prices.some(e=>e.type===m.Y.SUBSCRIPTION&&e.interval===m.c.YEAR)),U=!!(null==w?void 0:w.credits_needed),Y=(null==w?void 0:w.discount_percentage)||"50";return(0,r.jsx)(a.lG,{open:y,onOpenChange:j,children:(0,r.jsx)(a.Cf,{className:"w-[95vw] max-w-[1200px] max-h-[90vh] overflow-y-auto p-4 sm:p-6 sm:max-w-[90vw] md:max-w-[85vw] lg:max-w-[1000px] xl:max-w-[1200px]",children:(0,r.jsxs)("div",{className:"overflow-visible",children:[(0,r.jsxs)(a.c7,{children:[(0,r.jsx)(a.L3,{className:"text-center text-3xl font-bold tracking-tight",children:N(U?"modal.insufficientCreditsTitle":"title")}),(0,r.jsx)("p",{className:"text-center text-muted-foreground mt-2",children:N(U?"modal.insufficientCreditsSubtitle":"subtitle")})]}),(null===(s=o.u.payment)||void 0===s?void 0:null===(t=s.multiCurrency)||void 0===t?void 0:t.enabled)&&(0,r.jsx)("div",{className:"flex justify-center mt-4",children:(0,r.jsx)(p.J,{})}),(0,r.jsx)("div",{className:"flex justify-center mt-4",children:(0,r.jsx)("div",{className:"bg-gradient-to-r from-yellow-100 to-orange-100 dar
1k:bg-gradient-to-r dark:from-yellow-900/20 dark:to-orange-900/20 border border-yellow-300 dark:border-yellow-600 rounded-full px-4 py-2 text-sm shadow-sm",children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-yellow-600 dark:text-yellow-400",children:"â"}),(0,r.jsx)("span",{className:"font-medium text-yellow-800 dark:text-yellow-200 whitespace-nowrap",children:N("limitedTimeBanner",{percent:30})})]})})}),(null==w?void 0:w.promo_code)&&(0,r.jsx)("div",{className:"mx-auto mt-4 max-w-full",children:(0,r.jsx)("div",{className:"bg-gradient-to-r from-green-50 via-emerald-50 to-green-50 dark:from-green-950/30 dark:via-emerald-950/30 dark:to-green-950/30 border border-green-200 dark:border-green-800 rounded-xl p-4 shadow-sm",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-1",children:[(0,r.jsx)("div",{className:"text-2xl sm:text-3xl flex-shrink-0",children:"\uD83C\uDF89"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"font-bold text-sm sm:text-base text-green-900 dark:text-green-100",children:N("promoBanner.limitedTimeOfferActive")}
1),(0,r.jsxs)("div",{className:"text-xs sm:text-sm text-green-700 dark:text-green-300 mt-1 flex items-center flex-wrap gap-1",children:[(0,r.jsx)("span",{children:N("promoBanner.promoCodeLabel")}),(0,r.jsx)(i.i,{code:w.promo_code,size:"sm",showLabel:!1,variant:"default",className:"inline-flex"}),(0,r.jsx)("span",{children:N("promoBanner.readySuffix",{percent:Y})})]})]})]}),(0,r.jsxs)("div",{className:"hidden sm:flex flex-col items-end flex-shrink-0",children:[(0,r.jsx)("div",{className:"text-xl sm:text-2xl font-bold text-green-600 dark:text-green-400",children:N("promoBanner.offerTag",{percent:Y})}),(0,r.jsx)("div",{className:"text-xs text-orange-600 dark:text-orange-400",children:N("promoBanner.offerSubTag")})]})]})})}),(0,r.jsxs)("div",{className:"flex flex-col gap-4 mt-4 pb-4",children:[(V||B||D.length>0)&&(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)(n.O,{size:"sm",type:"single",value:A,onValueChange:e=>e&&I(e),className:"border rounded-lg p-1",children:[V&&(0,r.jsx)(n.d,{value:"month",className:(0,u.cn)("px-4 py-1 cursor-pointer text-sm rounded-md","data-[state=on]:bg-primary data-[state=on]:text-primary-foreground"),children:N("monthly")}),B&&(0,r.jsx)(n.d,{value:"year",className:(0,u.cn)("px-4 py-1 cursor-pointer text-sm rounded-md","data-[state=on]:bg-primary data-[state=on]:text-primary-foreground"),children:(0,r.jsxs)("div",{className:"relative",children:[N("yearly"),(0,r.jsx)("span",{className:"absolute -top-5 left-1/2 transform -translate-x-1/2 text-[10px] bg-orange-500 text-white px-1.5 py-0.5 rounded-full font-medium whitespace-nowrap",children:N("savePercentageShort",{percent:30})})]})}),D.length>0&&(0,r.jsx)(n.d,{value:"pack",className:(0,u.cn)("px-4 py-1 cursor-pointer text-sm rounded-md","data-[state=on]:bg-primary data-[state=on]:text-primary-foreground"),children:N("pack")})]})}),("month"===A||"year"===A)&&M.length>0?(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)("div",{className:"bg-orange-50 dark:bg-orange-900/20 text-orange-800 dark:text-orange-200 px-4 py-2 rounded-full text-sm",children:N("cancelAnytime")})}):"pack"===A&&D.length>0?(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)("div",{className:"bg-orange-50 dark:bg-orange-900/20 text-orange-800 dark:text-orange-200 px-4 py-2 rounded-full text-sm",children:N("packNotice")})}):null,(0,r.jsx)("div",{className:(0,u.cn)("grid gap-4 overflow-x-auto pt-4",1===("month"===A||"year"===A?M:D).length&&"grid-cols-1 max-w-sm mx-auto w-full",2===("month"===A||"year"===A?M:D).length&&"grid-cols-1 md:grid-cols-2",("month"===A||"year"===A?M:D).length>=3&&"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"),children:"pack"===A?D.map(e=>(0,r.jsx)(g.L,{plan:e,paymentType:m.Y.ONE_TIME,metadata:w,isCurrentPlan:F===e.id,promoCode:null==w?void 0:w.promo_code,selectedCurrency:T},e.id)):M.map(e=>(0,r.jsx)(g.L,{plan:e,interval:"month"===A?m.c.MONTH:m.c.YEAR,paymentType:m.Y.SUBSCRIPTION,metadata:w,isCurrentPlan:F===e.id,promoCode:null==w?void 0:w.promo_code,selectedCurrency:T},e.id))})]}),(0,r.jsx)(h.PaymentMethods,{className:"mt-8"}),(0,r.jsx)("section",{className:"px-4 py-16 bg-background",children:(0,r.jsx)("div",{className:"mx-auto max-w-5xl px-6",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("h2",{className:"text-balance text-3xl font-semibold lg:text-4xl",children:N("contact.title")}),(0,r.jsx)("div",{className:"mt-8",children:L?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-muted-foreground",children:N("contact.sendUsEmail")}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4 max-w-md mx-auto",children:[(0,r.jsx)("span",{className:"text-lg font-medium text-foreground",children:"[email protected]"}),(0,r.jsx)(b.$,{variant:"default",size:"sm",onClick:z,children:N(P?"contact.copied":"contact.copy")})]})]}):(0,r.jsx)(b.$,{size:"lg",variant:"outline",onClick:()=>E(!0),children:N("contact.contactSupport")})})]})})})]})})})}},44711:(e,t,s)=>{function r(e){var t;let{model:s}=e;return null!==(t=({V4_5ALL:7,V4:12,V4_5:12,V4_5PLUS:12,V5:12})[s])&&void 0!==t?t:12}function a(){return 1}s.d(t,{m:()=>r,z:()=>a})},50711:(e,t,s)=>{s.d(t,{BV:()=>n,l4:()=>i});var r,a=s(8685),n=function(e){return e.Root="/",e.FAQ="/#faq",e.Features="/#features",e.Pricing="/pricing",e.Extensions="/extensions",e.CookiePolicy="/cookie",e.PrivacyPolicy="/privacy",e.TermsOfService="/terms",e.RefundPolicy="/refund",e.Login="/auth/login",e.Register="/auth/register",e.AuthError="/auth/error",e.ForgotPassword="/auth/forgot-password",e.ResetPassword="/auth/reset-password",e.ExtensionSuccess="/extension/success",e.Dashboard="/dashboard",e.AdminUsers="/admin/users",e.AdminCreations="/admin/creations",e.AdminPayments="/admin/payments",e.SettingsProfile="/settings/profile",e.SettingsBilling="/settings/billing",e.SettingsCredits="/settings/credits",e.SettingsSecurity="/settings/security",e.SettingsNotifications="/settings/notifications",e.Generate="/generate",e.AILyricsGenerator="/ai-lyrics-generator",e.Creations="/creations",e}({});let i=null!==(r=a.u.routes.defaultLoginRedirect)&&void 0!==r?r:"/"},81963:(e,t,s)=>{s.d(t,{l:()=>a});var r=s(65133);function a(e){let{generationId:t,enabled:s=!0,pollingInterval:a=3e4,onCompleted:n,onFailed:i}=e,[l,o]=(0,r.useState)(null),[d,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),x=(0,r.useRef)(n),f=(0,r.useRef)(i);return(0,r.useEffect)(()=>{x.current=n,f.current=i},[n,i]),(0,r.useEffect)(()=>{let e;if(!t||!s)return;let r=!0,n=async()=>
1{if(r){c(!0),m(null);try{var s,a;console.log("[VideoStatus] Fetching status for: ".concat(t));let n=await fetch("/api/video-generation/".concat(t,"/status"));if(!n.ok){404===n.status?m("Video generation not found"):m("Failed to fetch status");return}let i=await n.json();console.log("[VideoStatus] Status for ".concat(t,":"),i.status),o(i),"completed"===i.status?(null===(s=x.current)||void 0===s||s.call(x,i),r=!1,clearInterval(e)):"failed"===i.status&&(null===(a=f.current)||void 0===a||a.call(f,i),r=!1,clearInterval(e))}catch(e){m(e instanceof Error?e.message:"Unknown error")}finally{c(!1)}}};return n(),e=setInterval(n,a),()=>{r=!1,e&&clearInterval(e)}},[t,s,a]),{status:l,isLoading:d,error:u,isCompleted:(null==l?void 0:l.status)==="completed",isFailed:(null==l?void 0:l.status)==="failed",isProcessing:(null==l?void 0:l.status)==="processing"||(null==l?void 0:l.status)==="pending"}}},92993:(e,t,s)=>{s.d(t,{dj:()=>m});var r=s(65133);let a=0,n=new Map,i=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,t)},l=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},o=[],d={toasts:[]};function c(e){d=l(d,e),o.forEach(e=>{e(d)})}function u(e){let{...t}=e,s=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),r=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||r()}}}),{id:s,dismiss:r,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=r.useState(d);return r.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},97973:(e,t,s)=>{s.d(t,{$:()=>o,r:()=>l});var r=s(51129);s(65133);var a=s(50551),n=s(11036),i=s(55730);let l=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:s,size:n,asChild:o=!1,...d}=e,c=o?a.DX:"button";return(0,r.jsx)(c,{"data-slot":"button",className:(0,i.cn)(l({variant:s,size:n,className:t})),...d})}}}]);
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.