1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711428,e=>{"use strict";var t=e.i(313101),r=e.i(732576);e.s(["default",0,function({annualPlans:e,monthlyPlans:a,oneTimePlans:s,locale:l}){return(0,t.jsx)("section",{className:"py-16 relative [&_h2]:text-gray-900 dark:[&_h2]:text-white [&_h3]:text-gray-900 dark:[&_h3]:text-white [&_.text-muted-foreground]:text-gray-500 dark:[&_.text-muted-foreground]:text-white/70 [&_.text-foreground]:text-gray-900 dark:[&_.text-foreground]:text-white [&_.text-gray-300]:text-gray-400 dark:[&_.text-gray-300]:text-white/50 [&_.text-gray-900]:text-gray-900 dark:[&_.text-gray-900]:text-white",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsx)(r.default,{annualPlans:e,monthlyPlans:a,oneTimePlans:s,locale:l,showViewAllLink:!1})})})}])},248542,e=>{"use strict";var t=e.i(313101),r=e.i(290573),a=e.i(813883),s=e.i(160889);function l({slide:e,isFirst:a}){let i=(0,r.useRef)(null),o=(0,r.useCallback)(()=>{i.current&&(i.current.style.opacity="0",i.current.style.pointerEvents="none")},[]);return(0,t.jsx)("section",{className:"section-cover spacer-md-bottom",children:(0,t.jsx)("div",{className:a?"section-cover--full-page section-cover--scrim-none section-cover--text-color-light":"section-cover--full-page section-cover--scrim-dark section-cover--text-color-light section-cover--full-page-small-text",children:(0,t.jsxs)("div",{className:"section-default cover grid cover--headline-size-large cover--eyebrow-size-medium relative w-full h-full min-h-[50vh] md:min-h-[60vh]",children:[(0,t.jsx)("div",{className:"cover__content relative z-10 w-full h-full flex items-center justify-center px-4 md:px-8",children:(0,t.jsx)("div",{className:"w-full max-w-7xl mx-auto grid grid-cols-12",children:(0,t.jsxs)("div",{className:`col-span-12 md:col-span-8 md:col-start-3 md:col-end-11 sm:col-span-12 xs:col-span-12${a?" text-center":""}`,children:[(0,t.jsx)("div",{className:"cover__text",children:a?(0,t.jsx)("h1",{className:"cover__text--title cover__text--title--top text-white text-5xl sm:text-6xl md:text-7xl lg:text-8xl font-display font-bold leading-[0.95] tracking-[-0.03em]",children:e.title}):(0,t.jsx)("h2",{className:"cover__text--title text-white text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-display font-light leading-[0.95] tracking-[-0.03em]",children:e.title})}),(0,t.jsx)("div",{className:`cover__text--description heading-9 mt-6${a?" text-center":" max-w-2xl"}`,children:(0,t.jsx)("p",{"data-block-key":"desc",className:"text-base md:text-lg leading-relaxed text-white/70 line-clamp-2",children:e.description})}),(0,t.jsx)("div",{className:a?"cover__buttons spacer-2xl-top deepai--dark cover__buttons--bottom mt-10":"cover__buttons spacer-2xl-top deepai--dark mt-10",children:(0,t.jsx)("div",{className:a?"button-group button-group--row":"button-group button-group--row button-group--compact compact",children:(0,t.jsxs)("div",{className:`button-group__buttons flex flex-wrap items-center${a?" justify-center":""} gap-3`,children:[e.btn1_label&&(e.btn1_href?.startsWith("#")?(0,t.jsx)("button",{type:"button",onClick:()=>{let t=document.getElementById(e.btn1_href.slice(1));t&&t.scrollIntoView({behavior:"smooth"})},className:a?"button button--primary icon-none inline-flex items-center px-6 py-3 rounded-full bg-white text-black hover:bg-white/90 font-medium text-sm transition-all":"button button--protected icon-none inline-flex items-center px-6 py-3 rounded-full border border-white/25 bg-white/[0.07] hover:bg-white/[0.14] text-white/90 hover:text-white text-sm font-medium transition-all backdrop-blur-sm",children:(0,t.jsx)("div",{className:"button__label",children:e.btn1_label})}):(0,t.jsx)(s.Link,{href:e.btn1_href||"#",className:a?"button button--primary icon-none inline-flex items-center px-6 py-3 rounded-full bg-white text-black hover:bg-white/90 font-medium text-sm transition-all":"button button--protected icon-none inline-flex items-center px-6 py-3 rounded-full border border-white/25 bg-white/[0.07] hover:bg-white/[0.14] text-white/90 hover:text-white text-sm font-medium transition-all backdrop-blur-sm",target:e.btn1_href?.startsWith("http")?"_blank":void 0,rel:e.btn1_href?.startsWith("http")?"noopener noreferrer":void 0,children:(0,t.jsx)("div",{className:"button__label",children:e.btn1_label})})),e.btn2_label&&(0,t.jsx)(s.Link,{href:e.btn2_href||"#",className:a?"button button--primary icon-none inline-flex items-center px-6 py-3 rounded-full border border-white/25 bg-white/[0.08] hover:bg-white/[0.16] text-white hover:text-white font-medium text-sm transition-all backdrop-blur-sm":"button button--protected icon-none inline-flex items-center px-6 py-3 rounded-full border border-white/25 bg-white/[0.07] hover:bg-white/[0.14] text-white/90 hover:text-white text-sm font-medium transition-all backdrop-blur-sm",target:e.btn2_href?.startsWith("http")?"_blank":void 0,rel:e.btn2_href?.startsWith("http")?"noopener noreferrer":void 0,children:(0,t.jsx)("div",{className:"button__label",children:e.btn2_label})}),e.btn3_label&&a&&(0,t.jsx)(s.Link,{href:e.btn3_href||"#",className:"button button--protected icon-none inline-flex items-center px-6 py-3 rounded-full border border-white/25 bg-white/[0.07] hover:bg-white/[0.14] text-white/90 hover:text-white text-sm font-medium transition-all backdrop-blur-sm",children:(0,t.jsx)("div",{className:"button__label",children:e.btn3_label})})]})})})]})})}),e.videoSrc&&(0,t.jsx)("div",{className:"cover__media absolute inset-4 md:inset-6 z-0",children:(0,t.jsx)("div",{className:"media-content-wrapper w-full h-full",children:(0,t.jsx)("div",{className:"media__container no-light-mode-mobile no-dark-mode no-dark-mode-mobile has-default-media spacer-block-none-bottom w-full h-full",children:(0,t.jsx)("figure",{className:"media-video-figure w-full h-full",children:(0,t.jsxs)("div",{className:"media-video-container no-light-mode-mobile no-dark-mode no-dark-mode-mobile has-default-media w-full h-full relative rounded-2xl overflow-hidden","data-height":"1080","data-width":"1920",children:[(0,t.jsx)("div",{className:"absolute inset-0 z-[2] pointer-events-none rounded-2xl",style:{background:"linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.05) 70%, transparent 100%)"}}),!a&&(0,t.jsx)("div",{className:"absolute inset-0 z-[3] pointer-events-none rounded-2xl",style:{background:"linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.4) 100%)"}}),(0,t.jsxs)("div",{className:"video-wrapper w-full h-full",children:[(0,t.jsx)("div",{ref:i,className:"media-video-poster absolute inset-0 z-[1] transition-opacity duration-700",style:{opacity:1},children:e.poster&&(0,t.jsx)("div",{className:"media__container no-light-mode-mobile no-dark-mode no-dark-mode-mobile has-default-media w-full h-full",children:(0,t.jsx)("picture",{className:"image w-full h-full block","aria-hidden":"false",children:(0,t.jsx)("img",{src:e.poster,alt:"",className:"picture__image w-full h-full object-cover",loading:"lazy",role:"presentation"})})})}),(0,t.jsx)("video",{className:"media-video media-video--custom absolute inset-0 w-full h-full object-cover",autoPlay:!0,loop:!0,muted:!0,playsInl
1ine:!0,preload:"metadata",onPlay:o,children:(0,t.jsx)("source",{src:e.videoSrc})})]})]})})})})})]})})})}e.s(["default",0,function(){let e=(0,a.useTranslations)("Landing.Hero").raw("slides"),s=e.length,i=[e[s-1],...e,e[0]],[o,n]=(0,r.useState)(1),[d,c]=(0,r.useState)(!1),m=(0,r.useRef)(o);m.current=o;let x=(0,r.useRef)(null),u=(0,r.useId)(),p=(0,r.useCallback)(()=>{n(e=>Math.min(e+1,s+1))},[s]),h=(0,r.useCallback)(()=>{n(e=>Math.max(e-1,0))},[s]),g=(0,r.useCallback)(e=>{if(e.target!==e.currentTarget)return;let t=m.current;0===t?(c(!0),n(s)):t===s+1&&(c(!0),n(1))},[s]);(0,r.useEffect)(()=>{if(d){let e=setTimeout(()=>c(!1),50);return()=>clearTimeout(e)}},[d]);let f=0===o?s-1:o===s+1?0:o-1;return(0,t.jsx)("section",{className:"section--carousel section-default section--no-header spacer-block-md-bottom section-padding-top",id:"cover",children:(0,t.jsx)("div",{className:"section-container mx-auto",children:(0,t.jsx)("div",{className:"block-cover_carousel",children:(0,t.jsxs)("section",{className:"carousel-block carousel js-carousel spacer-block-none-bottom carousel--full-width relative overflow-hidden bg-background","aria-label":"Carousel","aria-roledescription":"carousel","data-event-module-name":"Carousel",id:u,role:"region",children:[(0,t.jsxs)("div",{"aria-atomic":"true","aria-live":"polite",className:"sr-only",id:`carousel-announcer-${u}`,children:["Slide ",f+1," of ",s]}),(0,t.jsx)("div",{className:"embla is-loop overflow-hidden",children:(0,t.jsx)("div",{ref:x,className:"embla__container flex",onTransitionEnd:g,style:{transform:`translate3d(${8-84*o}%, 0px, 0px)`,transition:d?"none":"transform 0.45s ease-in-out"},children:i.map((e,r)=>{let a=1===r||r===s+1;return(0,t.jsx)("div",{className:r===o?"block-cover active-slide is-in-view":"block-cover embla__slide--peeked",style:{flex:"0 0 84%"},children:(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(l,{slide:e,isFirst:a})})},r)})})}),(0,t.jsxs)("div",{className:"carousel__pagination relative z-20 flex items-center justify-between px-4 md:px-6 pb-2 pt-1",children:[(0,t.jsx)("figcaption",{className:"caption carousel__caption",children:(0,t.jsx)("div",{className:"caption__text text-caption caption--fill select-none text-xs text-gray-400 dark:text-white/30 tracking-[0.15em] uppercase font-medium",children:"Explore the latest"})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"combo-button-group flex items-center gap-2",children:[(0,t.jsx)("button",{"aria-controls":u,"aria-label":"Previous",className:"js-carousel__button--prev flex items-center justify-center w-9 h-9 rounded-full border border-gray-300 dark:border-white/20 hover:bg-gray-100 dark:hover:bg-white/10 hover:border-gray-400 dark:hover:border-white/40 transition-all",onClick:h,children:(0,t.jsx)("span",{"aria-hidden":"true",className:"icon-md-fill flex items-center justify-center text-gray-600 dark:text-white/70",children:(0,t.jsx)("svg",{viewBox:"0 -960 960 960","aria-hidden":"true",fill:"currentColor",height:"24px",width:"24px",children:(0,t.jsx)("path",{d:"M560.62-253.85 333.85-480.62l226.77-227.15 32.61 32.62-194.15 194.53 194.15 194.16-32.61 32.61Z"})})})}),(0,t.jsx)("button",{"aria-controls":u,"aria-label":"Next",className:"js-carousel__button--next flex items-center justify-center w-9 h-9 rounded-full border border-gray-300 dark:border-white/20 hover:bg-gray-100 dark:hover:bg-white/10 hover:border-gray-400 dark:hover:border-white/40 transition-all",onClick:p,children:(0,t.jsx)("span",{"aria-hidden":"true",className:"icon-md-fill flex items-center justify-center text-gray-600 dark:text-white/70",children:(0,t.jsx)("svg",{viewBox:"0 -960 960 960","aria-hidden":"true",fill:"currentColor",height:"24px",width:"24px",children:(0,t.jsx)("path",{d:"M536.92-480.62 342.77-675.15l32.61-32.62 226.77 227.15-226.77 226.77-32.61-32.61 194.15-194.16Z"})})})})]})})]})]})})})})}])},660595,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(647899),s=e.i(160889);let l=[{image:"https://prompts.aiveo4.net/image-to-video/item-01/thumbnail.png",titleKey:"cap1_title",descKey:"cap1_desc",href:"/studio/text-to-video"},{image:"/images/examples/flux-kontext-pro/test2-after.webp",titleKey:"cap2_title",descKey:"cap2_desc",href:"/studio/image-to-image"},{image:"/images/examples/multi-images/test-1-after.webp",titleKey:"cap3_title",descKey:"cap3_desc",href:"/multi-image-kontext-pro"},{image:"/images/examples/flux-kontext-pro/test6-after.webp",titleKey:"cap4_title",descKey:"cap4_desc",href:"/flux-kontext-pro"}];e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.CapabilitiesGrid");return(0,t.jsx)("section",{className:"section-glow py-16 relative overflow-hidden","data-accent":"multi",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"text-center mb-12",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-4",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"section-desc",children:e("description")})]}),(0,t.jsx)("div",{className:"color-grid color-grid-start-3 grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:l.map((r,l)=>(0,t.jsxs)(s.Link,{href:r.href,className:"card-glass-interactive group",children:[(0,t.jsxs)("div",{className:"relative h-52 md:h-60 overflow-hidden rounded-t-2xl",children:[(0,t.jsx)(a.default,{src:r.image,alt:e(r.titleKey),fill:!0,className:"object-cover group-hover:scale-105 transition-transform duration-700"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent"})]}),(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2 transition-colors",children:e(r.titleKey)}),(0,t.jsx)("p",{className:"text-gray-500 dark:text-white/50 text-sm leading-relaxed",children:e(r.descKey)})]})]},l))})]})})}])},560719,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(647899),s=e.i(160889),l=e.i(195861),i=e.i(58260);
1let o=[{image:"https://prompts.aiveo4.net/image-to-video/item-01/thumbnail.png",titleKey:"demo1_title",descKey:"demo1_desc",promptKey:"demo1_prompt",href:"/studio/text-to-video"},{image:"/images/examples/flux-kontext-pro/test2-after.webp",titleKey:"demo2_title",descKey:"demo2_desc",promptKey:"demo2_prompt",href:"/studio/image-to-image"},{image:"/images/examples/flux-kontext-pro/test6-after.webp",titleKey:"demo3_title",descKey:"demo3_desc",promptKey:"demo3_prompt",href:"/flux-kontext-pro"},{image:"/images/examples/multi-images/test-1-after.webp",titleKey:"demo4_title",descKey:"demo4_desc",promptKey:"demo4_prompt",href:"/multi-image-kontext-pro"},{image:"https://r2.4k-videos.com/videoframe_2338.png",titleKey:"demo5_title",descKey:"demo5_desc",promptKey:"demo5_prompt",href:"/studio/text-to-video"},{image:"/images/examples/flux-kontext-pro/test4-after.webp",titleKey:"demo6_title",descKey:"demo6_desc",promptKey:"demo6_prompt",href:"/studio/image-to-image"}];e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.DemoShowcase");return(0,t.jsx)("section",{className:"section-glow py-20 relative overflow-hidden","data-accent":"multi",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"text-center mb-14",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-4",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"section-desc",children:e("description")})]}),(0,t.jsx)("div",{className:"color-grid color-grid-start-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:o.map((r,o)=>(0,t.jsxs)(s.Link,{href:r.href,className:"card-glass-interactive group flex flex-col",children:[(0,t.jsxs)("div",{className:"relative h-44 overflow-hidden rounded-t-2xl",children:[(0,t.jsx)(a.default,{src:r.image,alt:e(r.titleKey),fill:!0,className:"object-cover group-hover:scale-105 transition-transform duration-700"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent"})]}),(0,t.jsxs)("div",{className:"p-5 flex flex-col flex-1",children:[(0,t.jsx)("div",{className:"badge-gradient mb-3 self-start",children:e(r.titleKey)}),(0,t.jsxs)("p",{className:"text-gray-400 dark:text-white/40 text-xs leading-relaxed mb-3 line-clamp-2 italic",children:["â",e(r.promptKey),"â"]}),(0,t.jsx)("p",{className:"text-gray-700 dark:text-white/70 text-sm leading-relaxed mb-4 flex-1",children:e(r.descKey)}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-medium mt-auto item-text",children:[(0,t.jsx)(l.Sparkles,{className:"w-3.5 h-3.5"}),e("tryButton"),(0,t.jsx)(i.ArrowRight,{className:"w-3.5 h-3.5 group-hover:translate-x-1 transition-transform"})]})]})]},o))})]})})}])},182126,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(194322),a=a,s=e.i(818345),l=e.i(931),i=e.i(945857),o=e.i(290573);e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.WhatIsSection"),n=(0,o.useRef)(null),d=(0,o.useRef)(new Map),[c,m]=(0,o.useState)(0),[x,u]=(0,o.useState)(!0),p=(0,o.useId)(),h=(0,o.useRef)(null),g=(0,o.useRef)(0),f=e.raw("videos"),b=(0,o.useCallback)(()=>{let e=n.current;if(!e)return;let t=e.getBoundingClientRect(),r=t.left+t.width/2,a=0,s=1/0;Array.from(e.children).forEach((e,t)=>{let l=e.getBoundingClientRect(),i=Math.abs(l.left+l.width/2-r);i<s&&(s=i,a=t)}),m(a)},[]),v=(0,o.useCallback)(e=>{let t=n.current;if(!t)return;let r=0;for(let a=0;a<e;a++){let e=t.children[a];e&&(r+=e.offsetWidth+24)}r=Math.min(r,t.scrollWidth-t.clientWidth),t.scrollTo({left:r,behavior:"smooth"})},[]),j=(0,o.useCallback)(()=>{v(Math.min(c+1,f.length-1))},[c,v,f.length]),y=(0,o.useCallback)(()=>{v(Math.max(c-1,0))},[c,v]),w=(0,o.useCallback)(()=>{h.current&&clearInterval(h.current),h.current=setInterval(()=>{let e=n.current;if(!e)return;let t=(g.current+1)%f.length,r=0;for(let a=0;a<t;a++){let t=e.children[a];t&&(r+=t.offsetWidth+24)}r=Math.min(r,e.scrollWidth-e.clientWidth),e.scrollTo({left:r,behavior:"smooth"})},5e3)},[f.length]);(0,o.useEffect)(()=>{g.current=c},[c]);let N=(0,o.useCallback)(()=>{h.current&&clearInterval(h.current),w()},[w]);(0,o.useEffect)(()=>
1{if(f&&!(f.length<=1))return w(),()=>{h.current&&clearInterval(h.current)}},[w,f]),(0,o.useEffect)(()=>{let e=f[c]?.key;d.current.forEach((t,r)=>{r===e?t.play().catch(()=>{}):t.pause()})},[c,f]);let k=(0,o.useCallback)((e,t)=>{t?d.current.set(e,t):d.current.delete(e)},[]),C=(0,o.useCallback)(()=>{u(e=>{let t=!e;return d.current.forEach(e=>{e.muted=t}),t})},[]),_=(0,o.useCallback)(()=>{j(),N()},[j,N]),S=(0,o.useCallback)(()=>{y(),N()},[y,N]),I=(0,o.useCallback)(e=>{v(e),N()},[v,N]);return f&&0!==f.length?(0,t.jsxs)("section",{id:p,className:"section-glow py-10 md:py-16 relative overflow-hidden","data-accent":"multi",children:[(0,t.jsx)("div",{className:"dot-corner top-12 left-12"}),(0,t.jsx)("div",{className:"dot-corner top-12 right-12"}),(0,t.jsx)("div",{className:"dot-corner bottom-12 left-12"}),(0,t.jsx)("div",{className:"dot-corner bottom-12 right-12"}),(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("header",{className:"text-center mb-8 md:mb-12",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-6",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"text-base md:text-lg text-gray-500 dark:text-white/60 leading-relaxed max-w-4xl mx-auto",children:e("description")})]})}),(0,t.jsx)("div",{className:"relative w-full",children:(0,t.jsx)("div",{ref:n,onScroll:b,className:"flex snap-x snap-mandatory gap-6 overflow-x-auto scroll-smooth pb-8 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",style:{paddingLeft:"max(1.5rem, calc((100% - 1280px) / 2 + 1.5rem))",paddingRight:"max(1.5rem, calc((100% - 1280px) / 2 + 1.5rem))",scrollPaddingLeft:"max(1.5rem, calc((100% - 1280px) / 2 + 1.5rem))",scrollPaddingRight:"max(1.5rem, calc((100% - 1280px) / 2 + 1.5rem))"},children:f.map((r,a)=>{let s=a===c;return(0,t.jsxs)("div",{"data-video-key":r.key,className:"flex w-[85vw] shrink-0 snap-center flex-col transition-all duration-300 md:w-[600px] md:snap-start",children:[(0,t.jsx)("div",{role:"button",tabIndex:0,className:`relative mb-6 w-full cursor-pointer overflow-hidden rounded-3xl border bg-card text-left shadow-2xl transition-all duration-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 ${s?"scale-100 border-primary/50 opacity-100 shadow-[0_0_42px_rgba(201,162,77,0.22)]":"scale-[0.98] border-white/10 opacity-70 hover:border-primary/25 hover:opacity-100"}`,onClick:()=>I(a),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),I(a))},children:(0,t.jsxs)("div",{className:"relative aspect-video w-full",children:[(0,t.jsx)("video",{ref:e=>k(r.key,e),src:r.src,className:"absolute inset-0 h-full w-full object-cover",loop:!0,muted:x,playsInline:!0,preload:"metadata","aria-label":e(`${r.key}_title`)}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),C()},className:"absolute right-3 top-3 z-20 inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/65 text-white shadow-lg transition hover:bg-black/80 md:h-10 md:w-10","aria-label":x?"Unmute video":"Mute video",children:x?(0,t.jsx)(l.VolumeX,{className:"h-4 w-4 md:h-5 md:w-5"}):(0,t.jsx)(i.Volume2,{className:"h-4 w-4 md:h-5 md:w-5"})})]})}),(0,t.jsxs)("div",{className:`pr-4 transition-all duration-500 ease-in-out md:pr-8 ${s?"pointer-events-auto translate-y-0 opacity-100":"pointer-events-none translate-y-4 opacity-0"}`,children:[(0,t.jsx)("h3",{className:"mb-2 text-xl font-bold tracking-tight text-foreground md:text-2xl",children:e(`${r.key}_title`)}),(0,t.jsx)("p",{className:"text-base leading-relaxed text-muted-foreground md:text-lg line-clamp-3",children:e(`${r.key}_desc`)})]})]},r.key)})})}),(0,t.jsx)("div",{className:"mx-auto mt-4 flex max-w-7xl px-6 md:px-8",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-1 rounded-full border border-border/50 bg-card p-1 shadow-sm backdrop-blur-md",children:[(0,t.jsx)("button",{type:"button",onClick:S,disabled:0===c,className:"inline-flex h-10 w-10 items-center justify-center rounded-full transition md:h-12 md:w-12 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Previous feature",children:(0,t.jsx)(a.default,{className:"h-5 w-5"})}),(0,t.jsxs)("span",{className:"min-w-[3rem] text-center text-sm text-muted-foreground tabular-nums",children:[c+1," / ",f.length]}),(0,t.jsx)("button",{type:"button",onClick:_,disabled:c===f.length-1,className:"inline-flex h-10 w-10 items-center justify-center rounded-full transition md:h-12 md:w-12 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Next feature",children:(0,t.jsx)(s.ChevronRight,{className:"h-5 w-5"})})]})})]}):null}],182126)},53609,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(647899),s=e.i(160889),l=e.i(58260),i=e.i(290573);function o({src:e,poster:r}){let s=(0,i.useRef)(null),[l,n]=(0,i.useState)(!1);return(0,t.jsxs)("div",{className:"relative w-full h-full rounded-xl overflow-hidden bg-black/60",onMouseEnter:()=>{let e=s.current;e&&(e.play(),n(!0))},onMouseLeave:()=>{let e=s.current;e&&(e.pause(),e.currentTime=0,n(!1))},children:[(0,t.jsx)("video",{ref:s,src:e,poster:r,muted:!0,loop:!0,playsInl
1ine:!0,preload:"none",className:"w-full h-full object-cover"}),!l&&(0,t.jsx)("div",{className:"absolute inset-0",children:(0,t.jsx)(a.default,{src:r,alt:"",fill:!0,className:"object-cover",sizes:"(max-width: 768px) 45vw, 20vw"})})]})}let n=[{videos:[{src:"https://prompts.ovi.studio/video/text-to-video-ai.webm",poster:"https://prompts.ovi.studio/video/text-to-video-ai.webp"},{src:"https://prompts.ovi.studio/video/image-to-video-ai-V2.webm",poster:"https://prompts.ovi.studio/video/image-to-video-ai-V2.webp"}],eyebrowKey:"feature1_eyebrow",titleKey:"feature1_title",descKey:"feature1_desc",href:"/studio/text-to-video",direction:"left",gradient:"from-violet-600/20 via-purple-600/10 to-transparent"},{videos:[{src:"https://prompts.ovi.studio/video/camera-movements.webm",poster:"https://prompts.ovi.studio/video/camera-movements.webp"},{src:"https://prompts.ovi.studio/video/video-references.webm",poster:"https://prompts.ovi.studio/video/video-references.webp"}],eyebrowKey:"feature2_eyebrow",titleKey:"feature2_title",descKey:"feature2_desc",href:"/studio/image-to-image",direction:"right",gradient:"from-rose-600/20 via-pink-600/10 to-transparent"},{videos:[{src:"https://prompts.ovi.studio/video/video-style-transfer.webm",poster:"https://prompts.ovi.studio/video/video-style-transfer.webp"}],eyebrowKey:"feature3_eyebrow",titleKey:"feature3_title",descKey:"feature3_desc",href:"/multi-image-kontext-pro",direction:"left",gradient:"from-blue-600/20 via-cyan-600/10 to-transparent"},{videos:[{src:"https://prompts.ovi.studio/video/elements-ai-character-consistency.webm",poster:"https://prompts.ovi.studio/video/elements-ai-character-consistency.webp"},{src:"https://prompts.ovi.studio/video/elements-ai-variations.webm",poster:"https://prompts.ovi.studio/video/elements-ai-variations.webp"}],eyebrowKey:"feature4_eyebrow",titleKey:"feature4_title",descKey:"feature4_desc",href:"/studio/text-to-video",direction:"right",gradient:"from-emerald-600/20 via-teal-600/10 to-transparent"}];e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.WhyChooseUs");return(0,t.jsxs)("section",{className:"section-glow py-20 md:py-32 relative overflow-hidden","data-accent":"multi",id:"why-choose-us","aria-labelledby":"why-choose-us-heading",children:[(0,t.jsx)("div",{className:"dot-corner top-12 left-12"}),(0,t.jsx)("div",{className:"dot-corner top-12 right-12"}),(0,t.jsx)("div",{className:"dot-corner bottom-12 left-12"}),(0,t.jsx)("div",{className:"dot-corner bottom-12 right-12"}),(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("header",{className:"text-center mb-20 md:mb-24",children:[(0,t.jsx)("p",{className:"text-sm font-medium item-text mb-4 tracking-widest uppercase",children:e("eyebrow")}),(0,t.jsx)("h2",{id:"why-choose-us-heading",className:"font-bold text-2xl text-white md:text-4xl mb-6",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:e("description")})]}),(0,t.jsx)("div",{className:"space-y-16 md:space-y-20",children:n.map((r,a)=>(0,t.jsxs)("article",{className:`relative flex flex-col lg:flex-row items-center gap-12 lg:gap-20 ${"right"===r.direction?"lg:flex-row-reverse":""}`,children:[(0,t.jsxs)("div",{className:"relative flex-1 w-full",children:[(0,t.jsx)("div",{className:`absolute inset-0 bg-gradient-to-br ${r.gradient} rounded-3xl blur-3xl scale-110`}),(0,t.jsx)("div",{className:"relative rounded-3xl overflow-hidden bg-card border border-border/50 shadow-2xl p-4",children:(0,t.jsx)("div",{className:`grid ${1===r.videos.length?"grid-cols-1":"grid-cols-2"} gap-3`,children:r.videos.map((e,a)=>(0,t.jsx)("div",{className:`relative ${1===r.videos.length?"aspect-[12/5]":"aspect-[6/5]"}`,children:(0,t.jsx)(o,{src:e.src,poster:e.poster})},a))})})]}),(0,t.jsxs)("div",{className:"flex-1 space-y-6",children:[(0,t.jsx)("span",{className:"inline-block text-sm font-medium item-text tracking-widest uppercase",children:e(r.eyebrowKey
1)}),(0,t.jsx)("h3",{className:"text-3xl md:text-4xl font-bold text-gray-900 dark:text-white tracking-tight",children:e(r.titleKey)}),(0,t.jsx)("p",{className:"text-lg text-gray-500 dark:text-white/60 leading-relaxed",children:e(r.descKey)}),(0,t.jsx)("div",{children:(0,t.jsxs)(s.Link,{href:r.href,className:"inline-flex items-center gap-2 item-text font-medium hover:gap-3 transition-all duration-300",children:[e("learnMore"),(0,t.jsx)(l.ArrowRight,{className:"w-4 h-4"})]})})]})]},a))})]})]})}])},361145,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(124476),a=a,s=e.i(601544),l=e.i(562557),l=l,i=e.i(111518),i=i,o=e.i(380545),o=o,n=e.i(665733),d=e.i(126346),c=e.i(195861),m=e.i(361896);let x=[{icon:a.default,key:"cap1"},{icon:s.Camera,key:"cap2"},{icon:l.default,key:"cap3"},{icon:i.default,key:"cap4"},{icon:o.default,key:"cap5"},{icon:n.Mic,key:"cap6"},{icon:d.Users,key:"cap7"},{icon:c.Sparkles,key:"cap8"},{icon:m.Music,key:"cap9"}];e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.CoreCapabilities");return(0,t.jsx)("section",{className:"section-glow py-20 relative overflow-hidden","data-accent":"multi",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"text-center mb-14 md:mb-20",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-4",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"section-desc",children:e("description")})]}),(0,t.jsx)("div",{className:"color-grid color-grid-start-2 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-px bg-white/[0.06] dark:bg-white/[0.06] rounded-2xl overflow-hidden border border-gray-200 dark:border-white/[0.08]",children:x.map((r,a)=>{let s=r.icon;return(0,t.jsxs)("div",{className:"card-glass-cell p-8 xl:p-10 space-y-4 group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-11 h-11 rounded-xl bg-gray-100 dark:bg-white/[0.05] flex items-center justify-center border border-gray-200 dark:border-white/[0.06] transition-colors duration-300 item-border item-bg-subtle",children:(0,t.jsx)(s,{className:"w-5.5 h-5.5 item-text"})}),(0,t.jsx)("h3",{className:"text-base lg:text-lg font-semibold text-gray-900 dark:text-white",children:e(`${r.key}_title`)})]}),(0,t.jsx)("p",{className:"text-sm lg:text-base text-gray-500 dark:text-white/50 leading-relaxed",children:e(`${r.key}_desc`)})]},a)})})]})})}],361145)},101490,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(797950),a=a,s=e.i(792486),s=s,l=e.i(51219);let i=[{icon:a.default,key:"step1"},{icon:s.default,key:"step2"},{icon:l.Download,key:"step3"}];e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.HowItWorks");return(0,t.jsx)("section",{className:"section-glow py-20 relative overflow-hidden","data-accent":"multi",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"text-center mb-16",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-4",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"section-desc",children:e("description")})]}),(0,t.jsx)("div",{className:"color-grid color-grid-start-5 grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:i.map((r,a)=>{let s=r.icon;return(0,t.jsxs)("div",{className:"relative flex flex-col items-center text-center group",children:[a<i.length-1&&(0,t.jsx)("div",{className:"hidden md:block absolute top-12 left-[calc(50%+40px)] w-[calc(100%-80px)] h-px",style:{background:"linear-gradient(90deg, color-mix(in srgb, var(--accent, #22d3ee) 20%, transparent), color-mix(in srgb, var(--accent, #22d3ee) 10%, transparent), transparent)"}}),(0,t.jsxs)("div",{className:"relative mb-6",children:[(0,t.jsx)("div",{className:"w-24 h-24 rounded-full card-glass flex items-center justify-center",children:(0,t.jsx)(s,{className:"w-10 h-10 item-text"})}),(0,t.jsx)("div",{className:"absolute -top-1 -right-1 w-7 h-7 rounded-full item-bg text-black text-xs font-bold flex items-center justify-center shadow-lg item-glow",children:a+1})]}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:e(`${r.key}_title`)}),(0,t.jsx)("p",{className:"text-sm text-gray-500 dark:text-white/50 leading-relaxed max-w-xs",children:e(`${r.key}_desc`)})]},a)})})]})})}],101490)},646061,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(647899),s=e.i(160889),l=e.i(290573),i=e.i(418872),i=i;function o({src:e,poster:r}){let s=(0,l.useRef)(null),[i,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{className:"relative w-full h-full overflow-hidden",onMouseEnter:()=>{let e=s.current;e&&(e.play(),n(!0))},onMouseLeave:()=>{let e=s.current;e&&(e.pause(),e.currentTime=0,n(!1))},children:[(0,t.jsx)(a.default,{src:r,alt:"",fill:!0,className:"scale-110 object-cover opacity-55 blur-xl saturate-125",sizes:"(max-width: 640px) 100v
1w, (max-width: 1024px) 50vw, 25vw","aria-hidden":"true"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-black/25"}),(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("div",{className:"relative max-h-full max-w-full overflow-hidden h-full w-full",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-transparent",children:(0,t.jsx)("video",{ref:s,poster:r,loop:!0,muted:!0,playsInline:!0,preload:"none",className:"size-full object-cover",src:e,children:(0,t.jsx)("track",{kind:"captions"})})})})}),!i&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)(a.default,{src:r,alt:"",fill:!0,className:"object-cover",sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw"})}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-black/65 via-black/20 to-transparent"})]})}e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.WorkflowShowcase");return(0,t.jsx)("section",{className:"w-full bg-background py-16 md:py-24",children:(0,t.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4",children:[(0,t.jsxs)("div",{className:"mb-10 text-center md:mb-14",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"mx-auto mt-4 max-w-3xl text-base text-gray-400 leading-relaxed md:text-lg",children:e("description")})]}),(0,t.jsx)("div",{className:"mt-10 grid items-stretch gap-5 sm:grid-cols-2 lg:grid-cols-4",children:[{videoSrc:"https://prompts.ovi.studio/video/text-to-vi
1deo-ai.webm",posterSrc:"https://prompts.ovi.studio/video/text-to-video-ai.webp",badgeKey:"w1_badge",titleKey:"w1_title",descKey:"w1_desc",step1Key:"w1_step1",step2Key:"w1_step2",href:"/studio/text-to-video"},{videoSrc:"https://prompts.ovi.studio/video/image-to-video-ai-V2.webm",posterSrc:"https://prompts.ovi.studio/video/image-to-video-ai-V2.webp",badgeKey:"w2_badge",titleKey:"w2_title",descKey:"w2_desc",step1Key:"w2_step1",step2Key:"w2_step2",href:"/studio/image-to-video"},{videoSrc:"https://prompts.ovi.studio/video/video-style-transfer.webm",posterSrc:"https://prompts.ovi.studio/video/video-style-transfer.webp",badgeKey:"w3_badge",titleKey:"w3_title",descKey:"w3_desc",step1Key:"w3_step1",step2Key:"w3_step2",href:"/studio/image-to-image"},{videoSrc:"https://prompts.ovi.studio/video/elements-ai-character-consistency.webm",posterSrc:"https://prompts.ovi.studio/video/elements-ai-character-consistency.webp",badgeKey:"w4_badge",titleKey:"w4_title",descKey:"w4_desc",step1Key:"w4_step1",step2Key:"w4_step2",href:"/studio/image-to-video"}].map((r,a)=>(0,t.jsxs)(s.Link,{href:r.href,className:"group flex h-full flex-col overflow-hidden rounded-lg border border-border/70 bg-card/90 transition duration-300 hover:-translate-y-0.5 hover:border-foreground
1/30 hover:shadow-lg hover:shadow-black/10",children:[(0,t.jsxs)("div",{className:"relative aspect-[16/10] w-full overflow-hidden bg-black",children:[(0,t.jsx)(o,{src:r.videoSrc,poster:r.posterSrc}),(0,t.jsx)("div",{className:"absolute left-3 top-3 z-10",children:(0,t.jsx)("span",{className:"inline-flex items-center justify-center rounded-full border border-white/15 bg-black/50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-white backdrop-blur-md",children:e(r.badgeKey)})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col p-5",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h3",{className:"font-semibold text-lg leading-snug text-white",children:e(r.titleKey)}),(0,t.jsx)("p",{className:"line-clamp-2 text-sm leading-6 text-muted-foreground",children:e(r.descKey)})]}),(0,t.jsxs)("ul",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,t.jsxs)("li",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-md border bg-background px-2 py-0.5 font-medium text-foreground",children:e(r.step1Key)}),(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M5 12h14"}),(0,t.jsx)("path",{d:"m12 5 7 7-7 7"})]})]}),(0,t.jsx)("li",{className:"inline-flex items-center gap-2",children:(0,t.jsx)("span",{className:"rounded-md border bg-background px-2 py-0.5 font-medium text-foreground",children:e(r.step2Key)})})]})]})]},a))}),(0,t.jsx)("div",{className:"mt-10 flex justify-center md:mt-12",children:(0,t.jsxs)(s.Link,{href:"/studio",className:"group inline-flex items-center gap-2 rounded-full border border-white/20 px-6 py-3 text-sm font-medium text-white/85 transition hover:border-white/45 hover:text-white",children:[(0,t.jsx)("span",{children:e("cta")}),(0,t.jsx)(i.default,{className:"size-3.5 transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5","aria-hidden":"true"})]})})]})})}],646061)},455388,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(214284);let s=["row1","row2","row3","row4","row5","row6","row7","row8","row9","row10"];function l({value:e}){return"â"===e?(0,t.jsx)(a.Check,{className:"w-4 h-4 text-green-400 mx-auto"}):"â"===e?(0,t.jsx)("span",{className:"text-gray-300 dark:text-white/20",children:"â"}):(0,t.jsx)(t.Fragment,{children:e})}e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.ComparisonTable");return(0,t.jsxs)("section",{className:"section-glow py-20 relative overflow-hidden","data-accent":"multi",children:[(0,t.jsx)("div",{className:"dot-corner top-12 left-12"}),(0,t.jsx)("div",{className:"dot-corner top-12 right-12"}),(0,t.jsx)("div",{className:"dot-corner bottom-12 left-12"}),(0,t.jsx)("div",{className:"dot-corner bottom-12 right-12"}),(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)("div",{className:"text-center mb-14",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-4",children:e.rich("title",{highlight:e=>(0,t.jsx)("span",{className:"bg-gradient-to-br from-[#FFE9D5] via-[#FFB48A] to-[#FF6FB2] bg-clip-text text-transparent",children:e})})}),(0,t.jsx)("p",{className:"section-desc",children:e("description")})]}),(0,t.jsx)("div",{className:"overflow-x-auto rounded-2xl card-glass p-0",children:(0,t.jsxs)("table",{className:"w-full border-collapse min-w-[640px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-gray-200 dark:border-white/[0.06]",children:[(0,t.jsx)("th",{className:"py-4 px-5 text-left text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider w-[140px]",children:e("featureColumn")}),(0,t.jsx)("th",{className:"py-4 px-5 text-center text-sm font-semibold text-gray-900 dark:text-white w-[130px]",style:{backgroundColor:"color-mix(in srgb, var(--accent, #0891b2) 8%, transparent)"},children:e("productColumn")}),(0,t.jsx)("th",{className:"py-4 px-5 text-center text-sm font-medium text-gray-400 dark:text-white/50 w-[130px]",children:e("competitor1Column")}),(0,t.jsx)("th",{className:"py-4 px-5 text-center text-sm font-medium text-gray-400 dark:text-white/50 w-[130px]",children:e("competitor2Column")}),(0,t.jsx)("th",{className:"py-4 px-5 text-center text-sm font-medium text-gray-400 dark:text-white/50 w-[130px]",children:e("competitor3Column")})]})}),(0,t.jsx)("tbody",{className:"color-grid",children:s.map((r,a)=>{let s=e(`${r}.label`),i=e(`${r}.product`),o=e(`${r}.competitor1`),n=e(`${r}.competitor2`),d=e(`${r}.competitor3`);return(0,t.jsxs)("tr",{className:"border-b border-gray-100 dark:border-white/[0.04] transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.02] last:border-b-0",children:[(0,t.jsx)("td",{className:"py-3.5 px-5 text-sm text-gray-600 dark:text-white/60 font-medium",children:s}),(0,t.jsx)("td",{className:"py-3.5 px-5 text-center text-sm text-gray-900 dark:text-white",style:{backgroundColor:"color-mix(in srgb, var(--item-color, #0891b2) 6%, transparent)"},children:(0,t.jsx)(l,{value:i})}),(0,t.jsx)("td",{className:"py-3.5 px-5 text-center text-sm text-gray-500 dark:text-white/45",children:(0,t.jsx)(l,{value:o})}),(0,t.jsx)("td",{className:"py-3.5 px-5 text-center text-sm text-gray-500 dark:text-white/45",children:(0,t.jsx)(l,{value:n})}),(0,t.jsx)("td",{className:"py-3.5 px-5 text-center text-sm text-gray-500 dark:text-white/45",children:(0,t.jsx)(l,{value:d})})]},r)})})]})}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsx)("p",{className:"text-sm text-gray-400 dark:text-white/40 max-w-3xl mx-auto leading-relaxed",children:e("conclusion")})})]})]})}])},366817,e=>{"use strict";var t=e.i(313101),r=e.i(813883),a=e.i(636404),s=e.i(290573),l=e.i(584601),i=e.i(758151);let o=["from-cyan-400 to-blue-500","from-emerald-400 to-teal-500","from-violet-400 to-purple-500","from-indigo-400 to-purple-500","from-amber-400 to-orange-500"];function n({rating:e}){return(0,t.jsx)("div",{className:"flex items-center gap-0.5",children:Array.from({length:5},(r,a)=>(0,t.jsx)(i.Star,{className:`w-3.5 h-3.5 ${a<e?"text-yellow-400 fill-yellow-400":"text-gray-200 dark:text-white/10"}`},a))})}function d({name:e}){let r=e.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2),a=o[e.length%o.length];return(0,t.jsx)("div",{className:`w-9 h-9 rounded-full bg-gradient-to-br ${a} flex items-center justify-center text-white text-xs font-semibold shrink-0`,children:r})}function c({item:e}){return(0,t.jsxs)("div",{className:"w-[360px] shrink-0 p-5 card-glass hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[(0,t.jsx)(n,{rating:e.rating}),(0,t.jsxs)("p",{className:"text-sm text-gray-600 dark:text-white/60 leading-relaxed mt-3 line-clamp-4",children:["â",e.content,"â"]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-4 pt-4 border-t border-gray-200 dark:border-white/[0.06]",children:[(0,t.jsx)(d,{name:e.name}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800 dark:text-white/85 truncate",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-amber-400/60 truncate",children:e.role})]})]})]})}function m({items:e,dir:r}){let a=(0,s.useMemo)(()=>
1{if(0===e.length)return[];let t=[];for(let r=0;r<3;r++)t.push(...e);return t},[e]),i=376*e.length;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(l.motion.div,{className:"flex gap-4",animate:{x:"left"===r?[0,-i]:[-i,0]},transition:{x:{duration:6*e.length,repeat:1/0,ease:"linear"}},children:a.map((e,a)=>(0,t.jsx)(c,{item:e},`${r}-${e.name}-${a}`))})})}e.s(["default",0,function(){let e=(0,r.useTranslations)("Landing.TestimonialsScroll"),l=(0,a.useMessages)(),i=e.rich("title",{highlight:e=>e}),o=e("description"),n=(0,s.useMemo)(()=>{let e=l.Landing,t=e?.TestimonialsScroll;return t?Object.keys(t).filter(e=>/^testimonial\d+$/.test(e)).sort((e,t)=>parseInt(e.replace("testimonial",""),10)-parseInt(t.replace("testimonial",""),10)).map(e=>{let r=t[e];return{content:String(r.content||""),name:String(r.name||""),role:String(r.role||""),rating:"number"==typeof r.rating?r.rating:Number(r.rating)||5}}):[]},[l]),d=(0,s.useMemo)(()=>n.filter((e,t)=>t%2==0),[n]),c=(0,s.useMemo)(()=>n.filter((e,t)=>t%2==1),[n]);return 0===n.length?null:(0,t.jsxs)("section",{className:"section-glow py-20 relative overflow-hidden","data-accent":"multi",children:[(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"text-center mb-14",children:[(0,t.jsx)("h2",{className:"font-bold text-2xl text-white md:text-4xl mb-4",children:i}),(0,t.jsx)("p",{className:"section-desc",children:o})]})}),(0,t.jsxs)("div",{className:"relative space-y-6",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-32 z-10 pointer-events-none bg-gradient-to-r from-white to-transparent dark:from-[#0a0a0a] dark:to-transparent"}),(0,t.jsx)("div",{className:"absolute right-0 top-0 bottom-0 w-32 z-10 pointer-events-none bg-gradient-to-l from-white to-transparent dark:from-[#0a0a0a] dark:to-transparent"}),(0,t.jsx)(m,{items:d,dir:"left"}),(0,t.jsx)(m,{items:c,dir:"right"})]})]})}])},748766,e=>{"use strict";var t=e.i(358025),r=e.i(313101),a=e.i(682939),s=e.i(164104),l=e.i(361896),i=e.i(429732),o=e.i(195861),n=e.i(890240),d=e.i(849447),c=e.i(665733),m=e.i(786499),x=e.i(43448),u=e.i(744849),u=u,p=e.i(290573),h=e.i(813883),g=e.i(229580);let f=(0,g.createServerReference)("40fa8d12883da0cbb86b0130460f3bd6954009628a",g.callServer,void 0,g.findSourceMapURL,"createTask"),b=(0,g.createServerReference)("40cf15e75c1ccfc0346e30ab0faeb6aafe4a7eb0eb",g.callServer,void 0,g.findSourceMapURL,"getTaskDetail"),v=(0,g.createServerReference)("700eecb8aa01526e6ab0284b1475e777bdca9e0f94",g.callServer,void 0,g.findSourceMapURL,"uploadFile");var j=e.i(584601),y=e.i(20773),w=e.i(300969),N=e.i(574553),k=e.i(899317),C=e.i(59377),_=e.i(855589),S=e.i(244491),I=e.i(255200),M=e.i(507906),M=M,T=e.i(598464),F=e.i(825631),K=e.i(630374),A=e.i(127341),U=e.i(62870),R=e.i(167881),L=e.i(23750),E=e.i(184762),$=e.i(647163);let V=(0,g.createServerReference)("4030250ea8375b42dcc11848a96f6360eb4dd3d45c",g.callServer,void 0,g.findSourceMapURL,"createAudio"),D=(0,g.createServerReference)("405c84f4450a8c9854ffb91fa76e8d655d6b1e9437",g.callServer,void 0,g.findSourceMapURL,"saveUserVoice"),z=(0,g.createServerReference)("00b42fed094a70787b1f5681bb7d7da2f617a1dba9",g.callServer,void 0,g.findSourceMapURL,"getUserVoices"),B=(0,g.createServerReference)("40e9e28579b9a7993f7d157dfb10a6f3857a28a68e",g.callServer,void 0,g.findSourceMapURL,"deleteUserVoice"),P=["from-pink-500/70 to-rose-600/70","from-purple-500/70 to-indigo-600/70","from-blue-500/70 to-cyan-600/70","from-teal-500/70 to-emerald-600/70","from-orange-500/70 to-amber-600/70","from-violet-500/70 to-purple-600/70","from-sky-500/70 to-blue-600/70","from-green-500/70 to-teal-600/70","from-yellow-500/70 to-orange-600/70","from-red-500/70 to-pink-600/70"];function O(e){return P[function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return Math.abs(t)}(e)%P.length]}function W(e){return e.slice(0,2).toUpperCase()}function G(e){if(0===e.length)return null;let t=e[0];return t.includes("女")||t.startsWith("F")?(0,r.jsx)("span",{className:"text-xs font-extrabold text-pink-400 leading-none",children:"â"}):t.includes("ç·")||t.startsWith("M")?(0,r.jsx)("span",{className:"text-xs font-extrabold text-blue-400 leading-none",children:"â"}):null}function X(e){return e.slice(1)}function H({open:e,onOpenChange:t,onCreated:a,onUse:s}){let l=(0,h.useTranslations)("VoiceLibrary"),[i,n]=(0,p.useState)("myVoices"),[m,x
1]=(0,p.useState)([]),[u,g]=(0,p.useState)(!1),[f,b]=(0,p.useState)(""),[v,j]=(0,p.useState)(""),[y,w]=(0,p.useState)(""),[N,k]=(0,p.useState)(""),[C,_]=(0,p.useState)(!1),[P,q]=(0,p.useState)(null),J=l.raw("presets"),Z=Object.keys(J),Q=(0,p.useCallback)(async()=>{g(!0);try{let e=await z();e.success&&e.data&&x(e.data)}catch{}finally{g(!1)}},[]);(0,p.useEffect)(()=>{e&&"myVoices"===i&&Q()},[e,i,Q]);let Y=async e=>{try{await B(e),x(t=>t.filter(t=>t.id!==e))}catch{q(l("errors.deleteFailed"))}},ee=async()=>{if(f&&v.trim()){_(!0),q(null);try{let e=await V({audioId:f,name:v.trim(),voiceDescription:y.trim()||void 0,exampleDialogue:N.trim()||void 0});if(e.success&&e.data){let t=await D({kieAudioId:e.data.kieAudioId,name:e.data.name,presetId:f,voiceDescription:y.trim()||null,exampleDialogue:N.trim()||null});if(!t.success){console.error("Failed to save voice to database:",t.error),q(l("errors.saveFailed")+": "+t.error);return}a({kieAudioId:e.data.kieAudioId,name:e.data.name,audioId:f}),b(""),j(""),w(""),k(""),q(null),n("myVoices"),Q()}else q(e.error||l("errors.createFailed"))}catch(e){q(e instanceof Error?e.message:l("errors.createFailed"))}finally{_(!1)}}};return(0,r.jsx)(K.Dialog,{open:e,onOpenChange:t,children:(0,r.jsxs)(K.DialogContent,{className:"sm:max-w-[700px] h-[760px] flex flex-col p-0 gap-0 bg-background border-border shadow-lg",children:[(0,r.jsx)("div",{className:"px-6 pt-5 pb-3 border-b shrink-0 border-border",children:(0,r.jsxs)(K.DialogHeader,{children:[(0,r.jsxs)(K.DialogTitle,{className:"flex items-center gap-2 text-lg",children:[(0,r.jsx)(c.Mic,{className:"w-5 h-5 text-foreground"}),(0,r.jsx)("span",{className:"text-foreground",children:"Voice"})]}),(0,r.jsx)(K.DialogDescription,{className:"text-muted-foreground",children:l("subtitle")})]})}),(0,r.jsxs)(A.Tabs,{value:i,onValueChange:n,className:"flex flex-col flex-1 min-h-0",children:[(0,r.jsx)("div",{className:"px-6 pt-3 pb-0 shrink-0",children:(0,r.jsx)(A.TabsList,{className:"w-full h-9 p-0.5 gap-0.5 rounded-lg bg-muted",children:["myVoices","create"].map(e=>(0,r.jsx)(A.TabsTrigger,{value:e,className:"flex-1 h-full text-xs font-medium rounded-md transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm text-muted-foreground",children:l(`tabs.${e}`)},e))})}),(0,r.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4 [&::-webkit-scrollbar]:hidden [scrollbar-width:none]",children:[(0,r.jsx)(A.TabsContent,{value:"myVoices",className:"mt-0",children:u?(0,r.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,r.jsx)(d.Loader2,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):0===m.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,r.jsx)(c.Mic,{className:"w-10 h-10 mb-3 opacity-30 text-muted-foreground"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:l("empty.myVoices")}),(0,r.jsx)("p",{className:"text-xs mt-1 text-muted-foreground",children:l("empty.myVoicesHint")})]}):(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:m.map(e=>{let i=e.name,n=J[e.presetId];n?.tags?.[0];let d=n?X(n.tags):[];return(0,r.jsxs)("div",{className:"group relative rounded-xl border border-border p-3 flex flex-col gap-1.5 hover:border-primary transition-colors bg-card",children:[(0,r.jsx)("button",{type:"button",onClick:()=>Y(e.id),className:"absolute top-2 right-2 w-6 h-6 rounded-md flex items-center justify-center transition-colors hover:bg-red-500/15 text-muted-foreground hover:text-red-500",title:l("actions.delete"),children:(0,r.jsx)(S.Trash2,{className:"w-3.5 h-3.5"})}),(0,r.jsxs)("div",{className:"flex items-center gap-2.5 pr-5",children:[(0,r.jsx)("div",{className:(0,$.cn)("shrink-0 w-9 h-9 rounded-full bg-gradient-to-br flex items-center justify-center text-white text-xs font-bold",O(e.kieAudioId)),children:W(i)}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium truncate text-foreground",children:i}),n&&G(n.tags)]}),(0,r.jsx)("p",{className:"text-[10px] truncate text-muted-foreground",children:n?.label??e.presetId})]})]}),d.length>0&&(0,r.jsx)("div",{className:"flex items-center gap-1 flex-wrap min-h-4",children:d.slice(0,3).map(e=>(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium bg-primary/8 text-primary leading-none",children:e},e))}),e.voiceDescription&&(0,r.jsx)("p",{className:"text-[10px] leading-relaxed text-muted-foreground
1/60 truncate",children:e.voiceDescription}),(0,r.jsxs)(R.Button,{size:"sm",onClick:()=>{let r;return r={kieAudioId:e.kieAudioId,name:e.name,audioId:e.presetId},void(s?s(r):a(r),t(!1))},className:"w-full h-7 text-xs gap-1.5 bg-gradient-to-r from-primary to-purple-600 hover:from-primary/90 hover:to-purple-600/90 text-primary-foreground shadow-sm shadow-primary/20 mt-auto",children:[(0,r.jsx)(o.Sparkles,{className:"w-3 h-3"}),l("actions.use")]})]},e.id)})})}),(0,r.jsxs)(A.TabsContent,{value:"create",className:"mt-0 space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,r.jsx)(I.Tag,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,r.jsxs)("label",{className:"text-xs font-medium text-foreground",children:[l("form.preset")," ",(0,r.jsx)("span",{className:"text-red-400",children:"*"})]})]}),(0,r.jsxs)(U.Select,{value:f,onValueChange:b,children:[(0,r.jsx)(U.SelectTrigger,{className:"w-full h-auto min-h-10 py-2 bg-muted/60 border-border text-foreground rounded-xl px-3.5 transition-all focus:ring-2 focus:ring-primary/20 hover:border-primary/50",children:(0,r.jsx)(U.SelectValue,{children:f?(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:(0,$.cn)("shrink-0 w-7 h-7 rounded-full bg-gradient-to-br flex items-center justify-center text-white text-[10px] font-bold",O(f)),children:W(J[f].label)}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 flex-wrap",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-foreground truncate",children:J[f].label}),G(J[f].tags),X(J[f].tags).slice(0,2).map(e=>(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium bg-primary/10 text-primary shrink-0 leading-none",children:e},e))]})]}):(0,r.jsx)("span",{className:"text-xs text-muted-foreground/70",children:l("form.presetPlaceholder")})})}),(0,r.jsx)(U.SelectContent,{className:"max-h-[280px] bg-popover border-border shadow-xl rounded-xl",children:Z.map(e=>{let t=J[e],a=X(t.tags);return(0,r.jsx)(U.SelectItem,{value:e,className:"py-2.5 px-3 focus:bg-muted/80",children:(0,r.jsxs)("div",{className:"flex items-center gap-2.5 w-full",children:[(0,r.jsx)("div",{className:(0,$.cn)("shrink-0 w-8 h-8 rounded-full bg-gradient-to-br flex items-center justify-center text-white text-[10px] font-bold",O(e)),children:W(t.label)}),(0,r.jsx)("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)("span",{className:"font-semibold text-foreground truncate text-xs",children:t.label}),G(t.tags),a.slice(0,2).map(e=>(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium bg-primary/10 text-primary shrink-0 leading-none",children:e},e))]})})]})},e)})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,r.jsx)(c.Mic,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,r.jsxs)("label",{className:"text-xs font-medium text-foreground",children:[l("form.name")," ",(0,r.jsx)("span",{className:"text-red-400",children:"*"})]})]}),(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(L.Input,{value:v,maxLength:210,onChange:e=>j(e.target.value.slice(0,210)),placeholder:l("form.namePlaceholder"),className:"h-10 text-xs bg-muted/60 border-border text-foreground placeholder:text-muted-foreground/40 rounded-xl px-3.5 transition-all focus-visible:ring-2 focus-visible:ring-primary/20 focus-visible:border-primary/50"})}),(0,r.jsx)("div",{className:"flex justify-end mt-1 px-0.5",children:(0,r.jsxs)("span",{className:(0,$.cn)("text-[10px] transition-colors",v.length>=190?"text-amber-400":"text-muted-foreground/40"),children:[v.length,"/210"]})})]}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,r.jsx)(M.default,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,r.jsx)("label",{className:"text-xs font-medium text-foreground",children:l("form.description")})]}),(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(E.Textarea,{value:y,onChange:e=>w(e.target.value.slice(0,2e4)),placeholder:l("form.descriptionPlaceholder"),maxLength:2e4,rows:1,className:"text-xs resize-y bg-muted/60 border-border text-foreground placeholder:text-muted-foreground
1/40 rounded-xl px-3.5 py-2.5 transition-all focus-visible:ring-2 focus-visible:ring-primary/20 focus-visible:border-primary/50"})})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[(0,r.jsx)(T.MessageSquare,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,r.jsx)("label",{className:"text-xs font-medium text-foreground",children:l("form.dialogue")})]}),(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(E.Textarea,{value:N,onChange:e=>k(e.target.value.slice(0,120)),placeholder:l("form.dialoguePlaceholder"),maxLength:120,rows:1,className:"text-xs resize-y bg-muted/60 border-border text-foreground placeholder:text-muted-foreground/40 rounded-xl px-3.5 py-2.5 transition-all focus-visible:ring-2 focus-visible:ring-primary/20 focus-visible:border-primary/50"})}),(0,r.jsx)("div",{className:"flex justify-end mt-1 px-0.5",children:(0,r.jsxs)("span",{className:(0,$.cn)("text-[10px] transition-colors",N.length>=100?"text-amber-400":"text-muted-foreground/40"),children:[N.length,"/120"]})})]}),P&&(0,r.jsxs)("div",{className:"flex items-start gap-2 px-3.5 py-2.5 rounded-xl bg-red-500/10 border border-red-500/20",children:[(0,r.jsx)(F.AlertCircle,{className:"w-4 h-4 text-red-400 shrink-0 mt-0.5"}),(0,r.jsx)("span",{className:"text-xs text-red-400 leading-relaxed",children:P})]}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(R.Button,{onClick:ee,disabled:!f||!v.trim()||C,className:"w-1/3 h-10 text-xs gap-2 rounded-xl bg-gradient-to-r from-primary to-purple-600 hover:from-primary/90 hover:to-purple-600/90 text-primary-foreground shadow-sm shadow-primary/20 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:C?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Loader2,{className:"w-4 h-4 animate-spin"}),l("actions.creating")]}):(0,r.jsx)(r.Fragment,{children:l("actions.create")})})})]})]})]})]})})}var q=e.i(866119);let J=(0,g.createServerReference)("403ed1200a7c0ccf0d201be9fc4374552ac5f2eb6c",g.callServer,void 0,g.findSourceMapURL,"createCharacter"),Z=(0,g.createServerReference)("405614b5d2ad8114d6e1e43392322d64380c0400bf",g.callServer,void 0,g.findSourceMapURL,"saveUserCharacter"),Q=(0,g.createServerReference)("004e23074925f2771f2c06c78d368588af529e81d6",g.callServer,void 0,g.findSourceMapURL,"getUserCharacters"),Y=(0,g.createServerReference)("4008b05852a5d067a3484a8a6388cae6d5d4615213",g.callServer,void 0,g.findSourceMapURL,"deleteUserCharacter"),ee=["from-pink-500/70 to-rose-600/70","from-purple-500/70 to-indigo-600/70","from-blue-500/70 to-cyan-600/70","from-teal-500/70 to-emerald-600/70","from-orange-500/70 to-amber-600/70","from-violet-500/70 to-purple-600/70","from-sky-500/70 to-blue-600/70","from-green-500/70 to-teal-600/70","from-yellow-500/70 to-orange-600/70","from-red-500/70 to-pink-600/70"];function et(e){return ee[function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return Math.abs(t)}(e)%ee.length]}function er(e){return e.slice(0,2).toUpperCase()}function ea({open:e,onOpenChange:t,voices:a,onCreated:s,onUse:l}){let i=(0,p.useRef)(null),[c,x]=(0,p.useState)("myCharacters"),[u,g]=(0,p.useState)([]),[f,b]=(0,p.useState)(!1),j=(0,h.useTranslations)("VoiceLibrary").raw("presets"),[y,w]=(0,p.useState)(null),[N,k]=(0,p.useState)(null),[C,_]=(0,p.useState)(""),[I,M]=(0,p.useState)(""),[T,F]=(0,p.useState)(""),[V,D]=(0,p.useState)(!1),[B,P]=(0,p.useState)(null),[O,W]=(0,p.useState)([]),[G,X]=(0,p.useState)(!1),H=(0,p.useCallback)(async()=>{b(!0);try{let e=await Q();e.success&&e.data&&g(e.data)}catch{}finally{b(!1)}},[]),ee=(0,p.useCallback)(async()=>{X(!0);try{let e=await z();e.success&&e.data&&W(e.data.map(e=>({kieAudioId:e.kieAudioId,name:e.name,audioId:e.presetId})))}catch{}finally{X(!1)}},[]);(0,p.useEffect)(()=>{e&&("myCharacters"===c&&H(),ee())},[e,c,H,ee]);let es=(0,p.useCallback)(e=>{let t=e.target.files?.[0];if(t){if(t.size>0x1400000)return void P("Image must be under 20MB");if(!t.type.startsWith("image/"))return void P("Only image files are supported");w(t),k(URL.createObjectURL(t)),P(null)}},[]),el=(0,p.useCallback)(()=>{N&&URL.revokeObjectURL(N),w(null),k(null),i.current&&(i.current.value="")},[N]),ei=async e=>{try{await Y(e),g(t=>t.filter(t=>t.id!==e))}catch{P("Failed to delete character")}},eo=async()=>
1{if(y&&C.trim()&&I.trim()){D(!0),P(null);try{let e=await new Promise((e,t)=>{let r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=t,r.readAsDataURL(y)}),t=await v(y.name,e,y.type);if(!t.success||!t.data){P("Failed to upload image"),D(!1);return}let r=T?[T]:void 0,a=await J({descriptions:I.trim(),imageUrls:[t.data.url],characterName:C.trim(),audioIds:r});a.success&&a.data?(await Z({kieCharacterId:a.data.characterId,name:a.data.characterName,imageUrl:a.data.imageUrl,description:I.trim(),linkedAudioId:T||null}).catch(()=>{}),s({characterId:a.data.characterId,characterName:a.data.characterName,imageUrl:a.data.imageUrl,description:I.trim()}),el(),_(""),M(""),F(""),x("myCharacters"),H()):P(a.error||"Failed to create character")}catch(e){P(e instanceof Error?e.message:"An unexpected error occurred")}finally{D(!1)}}};return(0,r.jsx)(K.Dialog,{open:e,onOpenChange:t,children:(0,r.jsxs)(K.DialogContent,{className:"sm:max-w-[700px] h-[760px] flex flex-col p-0 gap-0 bg-background border-border shadow-lg",children:[(0,r.jsx)("div",{className:"px-6 pt-5 pb-3 border-b shrink-0 border-border",children:(0,r.jsxs)(K.DialogHeader,{children:[(0,r.jsxs)(K.DialogTitle,{className:"flex items-center gap-2 text-lg",children:[(0,r.jsx)(m.User,{className:"w-5 h-5 text-foreground"}),(0,r.jsx)("span",{className:"text-foreground",children:"Character"})]}),(0,r.jsx)(K.DialogDescription,{className:"text-muted-foreground",children:"Select or create a character for your video"})]})}),(0,r.jsxs)(A.Tabs,{value:c,onValueChange:x,className:"flex flex-col flex-1 min-h-0",children:[(0,r.jsx)("div",{className:"px-6 pt-3 pb-0 shrink-0",children:(0,r.jsx)(A.TabsList,{className:"w-full h-9 p-0.5 gap-0.5 rounded-lg bg-muted",children:["myCharacters","create"].map(e=>(0,r.jsx)(A.TabsTrigger,{value:e,className:"flex-1 h-full text-xs font-medium rounded-md transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm text-muted-foreground",children:"myCharacters"===e?"My Characters":"Create"},e))})}),(0,r.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4 [&::-webkit-scrollbar]:hidden [scrollbar-width:none]",children:[(0,r.jsx)(A.TabsContent,{value:"myCharacters",className:"mt-0",children:f?(0,r.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,r.jsx)(d.Loader2,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):0===u.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,r.jsx)(m.User,{className:"w-10 h-10 mb-3 opacity-30 text-muted-foreground"}),(0,r.jsx)("p",{className:"text-sm font-medium text-foreground",children:"No characters created yet"}),(0,r.jsx)("p",{className:"text-xs mt-1 text-muted-foreground",children:"Create your first character in the Create tab"})]}):(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:u.map(e=>(0,r.jsxs)("div",{className:"group relative rounded-xl border border-border p-3 flex flex-col gap-2 hover:border-primary transition-colors bg-card",children:[(0,r.jsx)("button",{type:"button",onClick:()=>ei(e.id),className:"absolute top-2 right-2 w-6 h-6 rounded-md flex items-center justify-center transition-colors hover:bg-red-500/15 text-muted-foreground hover:text-red-500 z-10",title:"Delete",children:(0,r.jsx)(S.Trash2,{className:"w-3.5 h-3.5"})}),(0,r.jsx)("div",{className:"relative w-full aspect-[4/3] rounded-lg overflow-hidden bg-muted",children:(0,r.jsx)("img",{src:e.imageUrl,alt:e.name,className:"w-full h-full object-cover"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium truncate text-foreground",children:e.name}),(0,r.jsx)("p",{className:"text-[10px] mt-0.5 line-clamp-2 text-muted-foreground/60 leading-relaxed",children:e.description})]}),(0,r.jsxs)(R.Button,{size:"sm",onClick:()=>{let r;return r={characterId:e.kieCharacterId,characterName:e.name,imageUrl:e.imageUrl,description:e.description},void(l?l(r):s(r),t(!1))},className:"w-full h-7 text-xs gap-1.5 bg-gradient-to-r from-primary to-purple-600 hover:from-primary/90 hover:to-purple-600/90 text-primary-foreground shadow-sm shadow-primary/20 mt-auto",children:[(0,r.jsx)(o.Sparkles,{className:"w-3 h-3"}),"Use"]})]},e.id))})}),(0,r.jsxs)(A.TabsContent,{value:"create",className:"mt-0 space-y-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-foreground",children:["Character Name ",(0,r.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,r.jsx)(L.Input,{value:C,onChange:e=>_(e.target.value),placeholder:"e.g., Hero Warrior",className:"h-9 text-xs bg-muted border-border text-foreground"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Reference Voice"}),(0,r.jsxs)(U.Select,{value:T,onValueChange:F,children:[(0,r.jsx)(U.SelectTrigger,{className:"w-full h-9 text-xs bg-muted/60 border-border text-foreground rounded-xl px-3 transition-all focus:ring-2 focus:ring-primary/20 hover:border-primary/50",children:(0,r.jsx)(U.SelectValue,{children:T?(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:(0,$.cn)("shrink-0 w-7 h-7 rounded-full bg-gradient-to-br flex items-center justify-center text-white text-[10px] font-bold",et(T)),children:er(O.find(e=>e.kieAudioId===T)?.name||"")}),(0,r.jsx)("span",{className:"text-xs font-medium text-foreground truncate",children:O.find(e=>e.kieAudioId===T)?.name||"Selected"})]}
1):(0,r.jsx)("span",{className:"text-xs text-muted-foreground/70",children:0===O.length?"No voices available":"Select a voice..."})})}),(0,r.jsx)(U.SelectContent,{className:"max-h-[280px] bg-popover border-border shadow-xl rounded-xl",children:0===O.length?(0,r.jsx)("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No voices available. Create one in the Voice dialog first."}):O.map(e=>{let t=j[e.audioId],a=t?t.tags.slice(1):[];return(0,r.jsx)(U.SelectItem,{value:e.kieAudioId,className:"py-2.5 px-3 focus:bg-muted/80",children:(0,r.jsxs)("div",{className:"flex items-center gap-2.5 w-full",children:[(0,r.jsx)("div",{className:(0,$.cn)("shrink-0 w-8 h-8 rounded-full bg-gradient-to-br flex items-center justify-center text-white text-[10px] font-bold",et(e.kieAudioId)),children:er(e.name)}),(0,r.jsx)("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)("span",{className:"font-semibold text-foreground truncate text-xs",children:e.name}),t&&function(e){if(0===e.length)return null;let t=e[0];return t.includes("女")||t.startsWith("F")?(0,r.jsx)("span",{className:"text-xs font-extrabold text-pink-400 leading-none",children:"â"}):t.includes("ç·")||t.startsWith("M")?(0,r.jsx)("span",{className:"text-xs font-extrabold text-blue-400 leading-none",children:"â"}):null}(t.tags),a.slice(0,2).map(e=>(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium bg-primary/10 text-primary shrink-0 leading-none",children:e},e))]})})]})},e.kieAudioId)})})]})]})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-foreground",children:["Descriptions ",(0,r.jsx)("span",{className:"text-red-400",children:"*"})]}
1),(0,r.jsx)(E.Textarea,{value:I,onChange:e=>M(e.target.value),placeholder:"Define the character's appearance, identity, style, clothing, or personality...",rows:3,className:"text-xs resize-y bg-muted border-border text-foreground"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-foreground",children:["Reference Image ",(0,r.jsx)("span",{className:"text-red-400",children:"*"})]}),N?(0,r.jsxs)("div",{className:"relative w-full h-32 rounded-lg overflow-hidden border border-border bg-muted flex items-center justify-center",children:[(0,r.jsx)("img",{src:N,alt:"Character preview",className:"object-contain max-w-full max-h-full"}),(0,r.jsx)("button",{type:"button",onClick:el,className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-black/50 flex items-center justify-center hover:bg-black/70 transition-colors",children:(0,r.jsx)(n.X,{className:"w-3.5 h-3.5 text-white"})})]}):(0,r.jsxs)("div",{onClick:()=>i.current?.click(),className:"w-full h-32 rounded-lg border-2 border-dashed border-muted-foreground/25 flex flex-col items-center justify-center gap-1 cursor-pointer hover:border-muted-foreground/50 transition-colors bg-muted/30",children:[(0,r.jsx)(q.Upload,{className:"w-5 h-5 text-muted-foreground/50"}),(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"Click to upload (max 20MB)"})]}),(0,r.jsx)("input",{ref:i,type:"file",accept:"image/*",className:"sr-only",onChange:es})]}),B&&(0,r.jsx)("div",{className:"text-xs text-red-500 dark:text-red-400",children:B}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(R.Button,{onClick:eo,disabled:!y||!C.trim()||!I.trim()||V,className:"w-1/3 h-10 text-xs gap-2 rounded-xl bg-gradient-to-r from-primary to-purple-600 hover:from-primary/90 hover:to-purple-600/90 text-primary-foreground shadow-sm shadow-primary/20 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:V?(0,r.jsx)(d.Loader2,{className:"w-3.5 h-3.5 animate-spin"}):(0,r.jsx)(r.Fragment,{children:"Create Character"})})})]})]})]})]})})}var es=e.i(143533),el=e.i(905559),ei=e.i(977324),eo=e.i(365184),en=e.i(396157),ed=e.i(905323);let ec=(0,g.createServerReference)("405b5c4805b14fba29a8fa630999ea53302c101d0e",g.callServer,void 0,g.findSourceMapURL,"saveGeneratedJob"),em=(0,g.createServerReference)("607ade3067be95f8ce39d6d546278cdc4a60bbdf46",g.callServer,void 0,g.findSourceMapURL,"deductCredits"),ex={image:"image/*,.png,.jpg,.jpeg,.webp",video:"video/*,.mp4,.mov,.webm,.mkv,.avi",audio:"audio/*,.mp3,.wav,.m4a,.ogg,.aac"},eu={blue:"#3b82f6",purple:"#a855f7",emerald:"#10b981",pink:"#ec4899",amber:"#f59e0b"},ep={image:"Image",video:"Video",audio:"Audio"};function eh({type:e,icon:t,color:a,onFilesSelected:s,selectedCount:l,maxCount:o,onRequireAuth:n}){let d=(0,p.useRef)(null),c=eu[a]||eu.blue,m=l>=o,x=(0,p.useCallback)(()=>{!n()||m||d.current?.click()},[n,m]),u=(0,p.useCallback)(t=>{t.target.files&&t.target.files.length>0&&(s(e,Array.from(t.target.files)),t.target.value="")},[e,s]);return(0,r.jsxs)("div",{role:"presentation",tabIndex:0,onClick:x,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),x())},className:`relative shrink-0 rounded-2xl border flex flex-col items-center justify-center transition-all duration-300 group hover:-translate-y-1 hover:shadow-xl ${m?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{width:80,height:84,borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-deep)",boxShadow:"var(--glass-tile-shadow)"},children:[(0,r.jsx)("input",{ref:d,accept:ex[e],multiple:"image"===e,type:"file",className:"sr-only",tabIndex:-1,onChange:u}),(0,r.jsx)("div",{className:"absolute inset-0 opacity-[0.04] group-hover:opacity-[0.08] transition-opacity duration-300 rounded-2xl",style:{backgroundColor:c}}),(0,r.jsx)("div",{className:"absolute top-0 left-3 right-3 h-px rounded-full pointer-events-none z-10",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge), transparent)"}}),(0,r.jsx)("div",{className:"absolute bottom-0 left-2 right-2 h-[1px] rounded-full pointer-events-none z-10",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge-bottom), transparent)"}}),(0,r.jsx)("div",{className:"absolute -top-1.5 -right-1.5 z-10 flex items-center justify-center min-w-5 h-5 px-1 rounded-full text-white text-[9px] font-mono font-bold",style:{backgroundColor:c},children:l>0?`${l}/${o}`:(0,r.jsx)(i.Plus,{className:"w-3 h-3"})}),(0,r.jsx)("div",{className:"relative z-10 transition-all duration-300 group-hover:scale-110 group-hover:-translate-y-[3px]",children:(0,r.jsx)(t,{style:{color:c},className:"w-6 h-6"})}),l>0&&(0,r.jsxs)("span",{className:"relative z-10 text-[10px] leading-none mt-1.5 font-mono",style:{color:"var(--glass-text-muted)"},children:[l," file",l>1?"s":""]})]})}function eg({icon:e,color:t,count:a,maxCount:s,onClick:l}){let o=eu[t]||eu.blue,n=a>=s;return(0,r.jsxs)("div",{role:"presentation",tabIndex:0,onClick:n?void 0:l,onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),n||l())},className:`relative shrink-0 rounded-2xl border flex flex-col items-center justify-center transition-all duration-300 group hover:-translate-y-1 hover:shadow-xl ${n?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{width:80,height:84,borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-deep)",boxShadow:"var(--glass-tile-shadow)"},children:[(0,r.jsx)("div",{className:"absolute inset-0 opacity-[0.04] group-hover:opacity-[0.08] transition-opacity duration-300 rounded-2xl",style:{backgroundColor:o}}),(0,r.jsx)("div",{className:"absolute top-0 left-3 right-3 h-px rounded-full pointer-events-none z-10",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge), transparent)"}}),(0,r.jsx)("div",{className:"absolute bottom-0 left-2 right-2 h-[1px] rounded-full pointer-events-none z-10",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge-bottom), transparent)"}}),(0,r.jsx)("div",{className:"absolute -top-1.5 -right-1.5 z-10 flex items-center justify-center min-w-5 h-5 px-1 rounded-full text-white text-[9px] font-mono font-bold",style:{backgroundColor:o},children:a>0?`${a}/${s}`:(0,r.jsx)(i.Plus,{className:"w-3 h-3"})}),(0,r.jsx)("div",{className:"relative z-10 transition-all duration-300 group-hover:scale-110 group-hover:-translate-y-[3px]",children:(0,r.jsx)(e,{style:{color:o},className:"w-6 h-6"})}),a>0&&(0,r.jsxs)("span",{className:"relative z-10 text-[10px] leading-none mt-1.5 font-mono",style:{color:"var(--glass-text-muted)"},children:[a,"/",s]})]})}e.s(["default",0,function(){let e=(0,h.useTranslations)("Landing.GeneratorSection"),i=(0,h.useTranslations)("AiGenerator"),g=(0,h.useTranslations)(),[S,I]=(0,p.useState)(""),[M,T]=(0,p.useState)(!1),[F,K]=(0,p.useState)([]),A=(0,p.useRef)(null),U=(0,p.useRef)({image:0,video:0,audio:0}),R=(0,p.useRef)(null),[L,E]=(0,p.useState)(!1),[V,D]=(0,p.useState)(null),[z,B]=(0,p.useState)(null),[P,O]=(0,p.useState)(null),[W,G]=(0,p.useState)(null),[X,q]=(0,p.useState)("video"),[J,Z]=(0,p.useState)([]),[Q,Y]=(0,p.useState)([]),[ee,et]=(0,p.useState)(!1),[er,ex]=(0,p.useState)(!1),[ef,eb]=(0,p.useState)(null),ev=(0,p.useRef)(null),[ej,ey]=(0,p.useState)("all"),[ew,eN]=(0,p.useState)("all"),[ek,eC]=(0,p.useState)(""),[e_,eS]=(0,p.useState)(""),[eI,eM]=(0,p.useState)({}),{user:eT,loading:eF}=(0,ei.useAuth)(),{openLoginModal:eK}=(0,eo.useLoginModalContext)(),{benefits:eA,isLoading:eU,mutate:eR,optimisticDeduct:eL}=(0,en.useUserBenefits)(),eE=void 0!==t.default,e$=(0,p.useCallback)(e=>!eF&&(eT?(e?.(),!0):(eK(),!1)),[eT,eF,eK]),eV=(0,p.useMemo)(()=>"image"===X?y.AIMediaType.IMAGE:y.AIMediaType.VIDEO,[X]);(0,p.useMemo)(()=>(0,w.getAvailableModels)({mediaType:eV}).filter(e=>"ltx"!==e.series),[eV]);let eD=(0,p.useMemo)(()=>(0,w.getAvailableSeries)({mediaType:eV}).filter(e=>"ltx"!==e),[eV]),ez=(0,p.useMemo)(()=>(0,w.findModelEntry)(ek),[ek]),eB=(0,p.useMemo)(()=>ez?.promptConfig?.maxLength??5e3,[ez]),eP=(0,p.useMemo)(()=>{if(!ez)if("image"===X)return y.AIScene.TEXT_TO_IMAGE;else return y.AIScene.TEXT_TO_VIDEO;let e=F.map(e=>e.type);return(0,w.detectScene)(ez,X,e)},[X,F,ez]),eO=e_||ek,eW=(0,p.useMemo)(()=>eO?(0,w.getModelCreditCost)(eO,eI):0,[eO,eI]),eG=(0,p.useMemo)(()=>ez?(0,w.getUploadCapabilities)(ez):null,[ez]),eX=eG?.supportsImageUpload??!1,eH=eG?.supportsVideoUpload??!1,eq=eG?.supportsAudioUpload??!1;(0,p.useEffect)(()=>{ey("all"),eN("all"),eC(""),eS(""),eM({});let e=(0,w.getAvailableModels)({mediaType:eV}).filter(e=>"ltx"!==e.series);e.length>0&&eC(e[0].model)},[eV]),(0,p.useEffect)(()=>{D(null),B(null),O(null),G(null)},[X]),(0,p.useEffect)(()=>{if(ez){let e={};for(let t of ez.paramConfig.params)e[t.name]=t.defaultValue;eM(e),ez.versions&&ez.versions.length>0?eS(ez.versions[0].model):eS("")}},[ek]),(0,p.useEffect)(()=>{if(!V)return;let e=!1,t=null,r=async()=>{try{let r=await b(V);if(e||!r.success||!r.data)return;let a=r.data.state||r.data.status;if(a&&B(a),"success"===a){let e,a=r.data.resultJson;if(a)try{let t=JSON.parse(a);e=t.resultUrls?.[0]}catch{}if(!e){let t=r.data.output;e=t?.imageUrl??t?.videoUrl}if(e||(e=r.data.outputUrl),e){O(e);let t=R.current;t&&(t.providerJobId=V,ec({...t,outputUrl:e}).catch(()=>{}))}t&&clearInterval(t)}
1else"fail"===a&&t&&clearInterval(t)}catch{}};return r(),t=setInterval(r,2e3),()=>{e=!0,t&&clearInterval(t)}},[V]),(0,p.useEffect)(()=>{!(L||V)&&A.current&&S&&(A.current.textContent=S)},[L,V]);let eJ=(0,p.useCallback)(async()=>{if(S.trim()&&!L){E(!0),D(null),G(null),R.current=null;try{if(!eT){eK(),E(!1);return}if(eE){if(eU){G("Loading credit balance..."),E(!1);return}if(!eA||eA.totalAvailableCredits<eW){G(i("insufficientCredits")),E(!1);return}let e=await em(eW,`GeneratorSection ${X} generation`);if(!e.success){G(e.error||"Failed to deduct credits"),E(!1);return}eL(eW)}let e=[],t=[],r=[],a=e=>new Promise((t,r)=>{let a=new FileReader;a.onloadend=()=>t(a.result),a.onerror=r,a.readAsDataURL(e)});for(let s of F){let l=await a(s.file),i=await v(s.file.name,l,s.file.type);if(!i.success||!i.data){G(`Upload failed for ${s.label}`),E(!1);return}let o=i.data.url;"image"===s.type?e.push(o):"video"===s.type?t.push({url:o,start:0,ends:10}):"audio"===s.type&&r.push(o)}let s=J.map(e=>e.kieAudioId),l=Q.map(e=>e.characterId),o={};eI.duration&&(o.duration=String(eI.duration)),eI.resolution&&(o.resolution=eI.resolution),eI.aspect_ratio&&(o.aspectRatio=eI.aspect_ratio),eI.seed&&(o.seed=Number(eI.seed));let n=eP===y.AIScene.TEXT_TO_IMAGE||eP===y.AIScene.IMAGE_TO_IMAGE,d={model:ek||"gemini-omni-video",scene:eP,prompt:S,imageUrls:e.length?e:void 0,videoList:t.length?t:void 0,audioIds:[...r,...s].length?[...r,...s]:void 0,characterIds:l.length?l:void 0};n||(d.duration=o.duration||"6"),o.resolution&&(d.resolution=o.resolution),o.aspectRatio&&(d.aspectRatio=o.aspectRatio),o.seed&&(d.seed=o.seed),R.current={mediaType:eV,scene:eP,provider:ez?.provider||"kie",model:eO,prompt:S,options:{...o},amount:eW,providerJobId:""};let c=await f(d);c.success&&c.data?(D(c.data.taskId),B("submitted"),O(null)):G(c.error||"Failed to create task")}catch(e){G(e instanceof Error?e.message:"An unexpected error occurred")}finally{E(!1)}}},[S,F,L,J,Q,ek,eI]),eZ=(0,p.useCallback)(()=>{A.current&&I(A.current.textContent||"")},[]),eQ=(0,p.useCallback)(e=>{e.preventDefault();let t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)},[]),eY=(0,p.useCallback)((e,t)=>{let r={image:7,video:1,audio:3}[e];K(a=>{let s=a.filter(t=>t.type===e).length,l=r-s;if(l<=0)return a;let i=7-(("image"===e?s:a.filter(e=>"image"===e.type).length)+2*("video"===e?s:a.filter(e=>"video"===e.type).length)+Q.length),o=Math.floor(i/("video"===e?2:1)),n=Math.min(t.length,l,o);if(n<=0){let t="video"===e?`Video needs 2 slots â only ${i} slot${1!==i?"s":""} remaining`:"Shared slot pool full â remove some files first";return ev.current&&clearTimeout(ev.current),eb(t),ev.current=setTimeout(()=>eb(null),4e3),a}let d=t.slice(0,n),c=ep[e];return[...a,...d.map(t=>(U.current[e]++,{id:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,type:e,file:t,label:`${c}${U.current[e]}`,previewUrl:"audio"!==e?URL.createObjectURL(t):void 0}))]})},[F,Q,eb]),e0=(0,p.useCallback)(e=>{K(t=>{let r=t.find(t=>t.id===e);return r?.previewUrl&&URL.revokeObjectURL(r.previewUrl),t.filter(t=>t.id!==e)})},[]),e5=(0,p.useMemo)(()=>F.filter(e=>"image"===e.type).length+2*F.filter(e=>"video"===e.type).length+Q.length,[F,Q]),e1=(0,p.useMemo)(()=>{let e=F.filter(e=>"image"===e.type).length,t=F.filter(e=>"video"===e.type).length,r=F.filter(e=>"audio"===e.type).length;return e+2*t+Q.length<=7&&e<=7&&t<=1&&r<=3&&Q.length<=3&&J.length<=3},[F,Q,J]),e2=(0,p.useMemo)(()=>{if(!V)return null;let e="processing";return"success"===z?e="succeeded":"fail"===z?e="failed":("submitted"===z||"waiting"===z)&&(e="starting"),{job_id:V,status:e,output_url:P||void 0,error:W||void 0}},[V,z,P,W]),e3=(0,p.useCallback)(()=>{D(null),B(null),O(null),G(null)},[]),e4=(0,p.useCallback)(()=>{if(P){let e=document.createElement("a");e.href=P;let t="image"===X?P.split(".").pop()?.split("?")[0]||"png":"mp4";e.download=`generated-${X}.${t}`,e.click()}},[P,X]),e6=(0,p.useCallback)(e=>{Z(t=>t.filter(t=>t.kieAudioId!==e))},[]),e8=(0,p.useCallback)(e=>{Y(t=>t.filter(t=>t.characterId!==e))},[]),e7=(0,p.useCallback)(e=>F.filter(t=>t.type===e).length,[F]);return(0,r.jsxs)("section",{id:"generator",className:"py-6 md:py-8","data-accent":"multi",children:[(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"glass-card relative mx-auto overflow-hidden rounded-3xl border backdrop-blur-2xl md:aspect-[2/1]",style:{maxWidth:"90rem",borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg)",boxShadow:"var(--glass-shadow)"},children:[(0,r.jsx)("div",{className:"absolute top-0 left-4 right-4 h-[1px] rounded-full pointer-events-none z-20",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge), transparent)"}}),(0,r.jsx)("div",{className:"absolute bottom-0 left-8 right-8 h-[1px] rounded-full pointer-events-none z-20",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge-bottom), transparent)"}}),(0,r.jsxs)("div",{className:"relative z-10 p-4 lg:p-5 h-full flex flex-col",children:[(0,r.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-3 relative",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-xs font-medium absolute left-0",style:{borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-chip)",color:"var(--glass-text-muted)"},children:[(0,r.jsx)("span",{children:eP===y.AIScene.IMAGE_TO_VIDEO?"Image to Video":eP===y.AIScene.TEXT_TO_IMAGE?"Text to Image":eP===y.AIScene.IMAGE_TO_IMAGE?"Image to Image":"Text to Video"}),eP===y.AIScene.IMAGE_TO_VIDEO&&(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full accent-bg"})]}),(0,r.jsx)("div",{className:"inline-flex gap-1 p-1 rounded-xl border",style:{borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-chip)"},children:[{value:"image",Icon:a.Image,label:i("generatorTypes.image"),color:"#3b82f6"},{value:"video",Icon:s.Video,label:i("generatorTypes.video"),color:"#a85
15f7"}].map(e=>{let t=X===e.value;return(0,r.jsxs)("button",{type:"button",onClick:()=>q(e.value),className:"relative px-4 py-2 text-sm font-medium rounded-lg transition-colors duration-200",style:{color:t?"#fff":"var(--glass-text-muted)"},children:[t&&(0,r.jsx)(j.motion.div,{layoutId:"activeTab",className:"absolute inset-0 rounded-lg bg-white dark:bg-white/10",transition:{type:"spring",stiffness:400,damping:30}}),(0,r.jsxs)("span",{className:"relative z-10 flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"relative flex items-center justify-center w-7 h-7 rounded-lg overflow-hidden",style:{backgroundColor:t?`${e.color}30`:`${e.color}18`,boxShadow:"var(--glass-tile-shadow)"},children:[(0,r.jsx)("span",{className:"absolute top-0 left-2 right-2 h-px rounded-full pointer-events-none",style:{background:"linear-gradient(90deg, transparent, var(--glass-edge), transparent)"}}),(0,r.jsx)(e.Icon,{className:"w-3.5 h-3.5",style:{color:e.color}})]}),e.label]})]},e.value)})})]}),(0,r.jsx)("div",{className:"flex flex-col lg:flex-row items-stretch gap-6 w-full flex-1 min-h-0",children:(0,r.jsx)("div",{className:"w-full lg:flex-1 lg:min-w-0 flex flex-col gap-3 h-full min-h-0",id:"generation-form",children:(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 flex-1 min-h-0",children:[(0,r.jsxs)("div",{className:"flex flex-row sm:flex-col gap-3 sm:self-start",children:[eX&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"px-0.5 text-[11px] font-medium",style:{color:"var(--glass-text)"},children:"Image"}),(0,r.jsx)(eh,{type:"image",icon:a.Image,color:"blue",onFilesSelected:eY,selectedCount:e7("image"),maxCount:7,onRequireAuth:e$})]}),eH&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"px-0.5 text-[11px] font-medium",style:{color:"var(--glass-text)"},children:"Video"}),(0,r.jsx)(eh,{type:"video",icon:s.Video,color:"purple",onFilesSelected:eY,selectedCount:e7("video"),maxCount:1,onRequireAuth:e$})]}),eq&&ez?.model!=="gemini-omni-video"&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"px-0.5 text-[11px] font-medium",style:{color:"var(--glass-text)"},children:"Audio"}),(0,r.jsx)(eh,{type:"audio",icon:l.Music,color:"emerald",onFilesSelected:eY,selectedCount:e7("audio"),maxCount:3,onRequireAuth:e$})]}),"video"===X&&"gemini-omni-video"===ek&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"px-0.5 text-[11px] font-medium",style:{color:"var(--glass-text)"},children:"Voice"}),(0,r.jsx)(eg,{icon:c.Mic,color:"pink",count:J.length,maxCount:3,onClick:()=>e$(()=>et(!0))})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"px-0.5 text-[11px] font-medium",style:{color:"var(--glass-text)"},children:"Character"}),(0,r.jsx)(eg,{icon:m.User,color:"amber",count:Q.length,maxCount:Math.min(3,7-(e5-Q.length)),onClick:()=>e$(()=>ex(!0))})]})]})]}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col gap-3 min-h-0",children:[L||V?(0,r.jsx)(r.Fragment,{children:"image"===X?(0,r.jsx)(el.default,{resultImage:P,isProcessing:L||!!V&&"success"!==z&&"fail"!==z,job:e2,onDownload:e4,compact:!0}):(0,r.jsx)(es.default,{resultUrl:P,isProcessing:L||!!V&&"success"!==z&&"fail"!==z,job:e2,onDownload:e4,compact:!0})}):(0,r.jsx)("div",{className:"relative flex-1",children:(0,r.jsxs)("div",{className:"flex flex-col h-full rounded-xl border p-4 backdrop-blur-sm transition-all duration-300",style:{borderColor:M?"var(--glass-border-focus)":"var(--glass-border)",backgroundColor:M?"var(--glass-bg-focus)":"var(--glass-bg-input)",boxShadow:M?"0 0 0 1px var(--glass-ring-focus), inset 0 1px 3px rgba(0,0,0,0.04)":"inset 0 1px 3px rgba(0,0,0,0.03)",transition:"background-color 0.25s, border-color 0.25s, box-shadow 0.25s"},children:[(J.length>0||Q.length>0||F.length>0)&&(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[J.map(e=>(0,r.jsxs)("div",{className:"group/media-card relative flex items-center gap-3 rounded-xl border px-3 py-2.5 pr-2.5 backdrop-blur-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg",style:{borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-deep)",boxShadow:"var(--glass-tile-shadow)",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s"},children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg shrink-0 flex items-center justify-center",style:{backgroundColor:"#ec489915"},children:(0,r.jsx)(c.Mic,{className:"w-5 h-5",style:{color:"#ec4899"}})}),(0,r.jsxs)("div",{className:"flex flex-col leading-tight min-w-0",children:[(0,r.jsx)("span",{className:"text-xs font-medium truncate max-w-[90px]",style:{color:"var(--glass-text)"},children:e.name}),(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium leading-none w-fit",style:{backgroundColor:"#ec489920",color:"#ec4899"},children:"Voice"})]}),(0,r.jsx)("button",{type:"button",onClick:()=>e6(e.kieAudioId),className:"ml-0.5 w-5 h-5 rounded-full flex items-center justify-center transition-all duration-200 hover:scale-110",style:{color:"var(--glass-text-muted)",backgroundColor:"var(--glass-bg-chip)"},children:(0,r.jsx)(n.X,{className:"w-3 h-3"})})]},e.kieAudioId)),Q.map(e=>(0,r.jsxs)("div",{className:"group/media-card relative flex items-center gap-3 rounded-xl border px-3 py-2.5 pr-2.5 backdrop-blur-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg",style:{borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-deep)",boxShadow:"var(--glass-tile-shadow)",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s"},children:[e.imageUrl?(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg overflow-hidden shrink-0 bg-cover bg-center",style:{backgroundImage:`url(${e.imageUrl})`}}):(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg shrink-0 flex items-center justify-center",style:{backgroundColor:"#f59e0b15"},children:(0,r.jsx)(m.User,{className:"w-5 h-5",style:{color:"#f59e0b"}})}),(0,r.jsxs)("div",{className:"flex flex-col leading-tight min-w-0",children:[(0,r.jsx)("span",{className:"text-xs font-medium truncate max-w-[90px]",style:{color:"var(--glass-text)"},children:e.characterName||"Character"}),(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium leading-none w-fit",style:{backgroundColor:"#f59e0b20",color:"#f59e0b"},children:"Character"})]}),(0,r.jsx)("button",{type:"button",onClick:()=>e8(e.characterId),className:"ml-0.5 w-5 h-5 rounded-full flex items-center justify-center transition-all duration-200 hover:scale-110",style:{color:"var(--glass-text-muted)",backgroundColor:"var(--glass-bg-chip)"},children:(0,r.jsx)(n.X,{className:"w-3 h-3"})})]},e.characterId)),F.map(e=>{let t=eu[e.type]||eu.blue,i="image"===e.type?a.Image:"video"===e.type?s.Video:l.Music,o=e.previewUrl;return(0,r.jsxs)("div",{className:"group/media-card relative flex items-center gap-3 rounded-xl border px-3 py-2.5 pr-2.5 backdrop-blur-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg",style:{borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-deep)",boxShadow:"var(--glass-tile-shadow)",transition:"transform 0.2s, box-shadow 0.2s, border-color 0.2s"},children:[o&&"image"===e.type?(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg overflow-hidden shrink-0 bg-cover bg-center",style:{backgroundImage:`url(${o})`}}):o&&"video"===e.type?(0,r.jsxs)("div",{className:"relative w-10 h-10 rounded-lg overflow-hidden shrink-0 bg-black/5 dark:bg-white/5 flex items-center justify-center",children:[(0,r.jsx)("video",{src:o,className:"w-full h-full object-cover",muted:!0,preload:"metadata"}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/10",children:(0,r.jsx)("div",{className:"w-5 h-5 rounded-full bg-black/40 flex items-center justify-center",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:"white",className:"w-3 h-3 ml-0.5",children:(0,r.jsx)("path",{d:"M8 5v14l11-7z"})})})})]}):(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg shrink-0 flex items-center justify-center",style:{backgroundColor:`${t}15`},children:(0,r.jsx)(i,{className:"w-5 h-5",style:{color:t}})}),(0,r.jsxs)("div",{className:"flex flex-col leading-tight min-w-0",children:[(0,r.jsx)("span",{className:"text-xs font-medium truncate max-w-[90px]",style:{color:"var(--glass-text)"},children:e.label}),(0,r.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium leading-none w-fit",style:{backgroundColor:`${t}20`,color:t},children:ep[e.type]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>e0(e.id),className:"ml-0.5 w-5 h-5 rounded-full flex items-center justify-center transition-all duration-200 hover:scale-110",style:{color:"var(--glass-text-muted)",backgroundColor:"var(--glass-bg-chip)"},children:(0,r.jsx)(n.X,{className:"w-3 h-3"})})]},e.id)})]}
1),(0,r.jsxs)("div",{className:"flex-1 relative min-h-[60px]",children:[(0,r.jsx)("div",{ref:A,contentEditable:!0,role:"textbox","aria-multiline":"true",onInput:eZ,onFocus:()=>T(!0),onBlur:()=>T(!1),onPaste:eQ,className:"w-full h-full outline-none whitespace-pre-wrap break-words overflow-y-auto",style:{lineHeight:1.6,minHeight:"60px",color:"var(--glass-text)"}}),!S&&!M&&(0,r.jsx)("div",{className:"absolute top-0 left-0 text-base pointer-events-none select-none",style:{color:"var(--glass-text-muted)"},children:"image"===X?"Describe the image you want to create...":"Describe the video you want to create..."})]}),(0,r.jsx)("div",{className:"flex justify-end pt-2",children:(0,r.jsxs)("div",{className:"text-xs font-mono px-2 py-0.5 rounded-full border",style:{color:"var(--glass-text-muted)",borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-chip)"},children:[(0,r.jsx)("span",{children:S.length}),(0,r.jsx)("span",{children:"/"}),(0,r.jsx)("span",{children:eB})]})})]})}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-start gap-3",children:[(0,r.jsx)("div",{className:"w-64 shrink-0",children:(0,r.jsx)(N.ModelSelect,{mediaType:eV,scene:eP,provider:ej,series:ew,model:ek,version:e_,onProviderChange:ey,onSeriesChange:eN,onModelChange:eC,onVersionChange:eS,showProviderSelector:!1,showSeriesSelector:!1,allowedSeries:eD,showVersionSelector:!1})}),ez?.versions&&ez.versions.length>0&&(0,r.jsx)("div",{className:"pt-1",children:(0,r.jsx)(k.VersionSelect,{versions:ez.versions,selectedVersion:e_,onVersionChange:eS})})]}),ez?.model==="gemini-omni-video"?(0,r.jsxs)("div",{className:"flex-1 min-w-[200px]",style:{color:"var(--glass-text)"},children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,r.jsx)("div",{className:(0,$.cn)("w-2 h-2 rounded-full transition-colors duration-300",e1?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-red-500 shadow-[0_0_6px_rgba(239,68,68,0.5)]")}),(0,r.jsx)("span",{className:"text-xs font-medium",children:"Upload Quota"})]}),(0,r.jsxs)("div",{className:"text-[11px] leading-relaxed opacity-70 space-y-0.5",children:[(0,r.jsx)("div",{children:"Pool: 7 image slots (images + videosÃ2 + characters)"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 mt-0.5",children:[(0,r.jsx)("div",{children:"⢠Images: max 7, â¤20MB"}),(0,r.jsx)("div",{children:"⢠Videos: max 1, â¤100MB/30s (Equal 2 images)"}),(0,r.jsx)("div",{children:"⢠Audio: max 3 IDs"}),(0,r.jsx)("div",{children:"⢠Characters: max 3, 1 slot each"})]})]}),ef&&(0,r.jsx)("div",{className:"mt-1.5 text-[10px] leading-tight text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg px-2 py-1.5 animate-in fade-in slide-in-from-top-1 duration-200",children:ef}),W&&!V&&(0,r.jsx)("div",{className:"mt-1.5 text-xs leading-tight text-destructive bg-destructive/10 border border-destructive/20 rounded-lg px-3 py-2 animate-in fade-in slide-in-from-top-1 duration-200",children:W})]}):ez?.descriptionKey&&(0,r.jsxs)("div",{className:"flex-1 min-w-[200px] text-xs leading-relaxed opacity-80",style:{color:"var(--glass-text)"},children:[(0,r.jsxs)("span",{className:"font-medium",children:[e("desc"),": "]}),i(ez.descriptionKey)]}),(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,r.jsxs)("button",{disabled:!(L||V)&&(!S.trim()||L),onClick:L||V?e3:eJ,className:"inline-flex items-center justify-center gap-2 whitespace-nowrap focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-primary/90 px-4 py-2 w-full h-14 text-base font-semibold rounded-xl bg-gradient-to-r from-primary to-purple-600 hover:from-primary/90 hover:to-purple-600/90 shadow-lg shadow-primary/20 transition-all duration-300 group relative overflow-hidden active:scale-[0.97]",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-white/20 translate-y-full group-hover:translate-y-0 transition-transform duration-300"}),(0,r.jsx)("div",{className:"flex items-center justify-center gap-2",children:L||V?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.default,{className:"w-5 h-5"}),(0,r.jsx)("span",{children:"Back Prompt"})]}):(0,r.jsxs)(r.Fragment,{children:[L?(0,r.jsx)(d.Loader2,{className:"w-5 h-5 animate-spin fill-white/20"}):(0,r.jsx)(o.Sparkles,{className:"w-5 h-5 fill-white/20"}),(0,r.jsx)("span",{children:L?i(`generating_${X}`):i(`generate_${X}`)})]})})]}),eE&&eT&&(0,r.jsx)(ed.CreditBar,{balance:eA?.totalAvailableCredits??0,cost:eW,isLoading:eU})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:ez&&ez.paramConfig.params.length>0&&ez.paramConfig.params.filter(e=>!e.hidden?.({currentValues:eI,scene:eP,model:e_||ek})).map(e=>{let t=eI[e.name]??e.defaultValue,a="slider"===e.type?`${t}s`:String(t??"");return(0,r.jsxs)(C.Popover,{children:[(0,r.jsx)(C.PopoverTrigger,{asChild:!0,children:(0,r.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 h-9 px-3.5 border text-xs font-medium whitespace-nowrap cursor-pointer rounded-full data-[state=open]:rounded-b-none data-[state=open]:border-0 transition-none",style:{borderColor:"var(--glass-border)",backgroundColor:"var(--glass-bg-deep-solid)",color:"var(--glass-text)",boxShadow:"var(--glass-tile-shadow)"},children:[(0,r.jsx)("span",{className:"font-medium",children:g(e.labelKey)}),(0,r.jsx)("span",{style:{color:"var(--glass-text-muted)"},children:a}),(0,r.jsx)(x.ChevronDown,{className:"w-3 h-3 opacity-50 transition-transform duration-200 data-[state=open]:rotate-180"})]})}),(0,r.jsx)(C.PopoverContent,{align:"center",sideOffset:0,className:"w-72 rounded-md border-0",style:{borderColor:"var(--glass-border)",borderTopColor:"transparent",backgroundColor:"var(--glass-bg-deep-solid)",boxShadow:"var(--glass-tile-shadow)"},children:(0,r.jsx)(_.ParamRenderer,{config:e,value:eI[e.name]??e.defaultValue,onChange:(e,t)=>
1eM(r=>({...r,[e]:t})),context:{currentValues:eI,scene:eP,model:e_||ek}})})]},e.name)})})]})]})]})})})]})]})}),(0,r.jsx)("style",{children:` 2 :root { 3 --glass-bg: rgba(255, 255, 255, 0.65); 4 --glass-bg-inset: rgba(255, 255, 255, 0.30); 5 --glass-bg-input: rgba(255, 255, 255, 0.20); 6 --glass-bg-focus: rgba(0, 0, 0, 0.04); 7 --glass-bg-deep: rgba(255, 255, 255, 0.35); 8 --glass-bg-chip: rgba(255, 255, 255, 0.55); 9 --glass-border: rgba(0, 0, 0, 0.07); 10 --glass-border-focus: rgba(0, 0, 0, 0.20); 11 --glass-ring-focus: rgba(0, 0, 0, 0.06); 12 --glass-text: #18181b; 13 --glass-text-muted: #a1a1aa; 14 --glass-edge: rgba(255, 255, 255, 0.85); 15 --glass-edge-bottom: rgba(255, 255, 255, 0.30); 16 --glass-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 17 0 8px 40px rgba(0, 0, 0, 0.04), 18 inset 0 1px 0 rgba(255, 255, 255, 0.70); 19 --glass-bg-deep-solid: rgb(255, 255, 255); 20 --glass-tile-shadow: inset 0 1.5px 0 rgba(255,255,255,0.7), 21 inset 0 -1px 1px rgba(0,0,0,0.03), 22 0 2px 8px rgba(0,0,0,0.05); 23 } 24 .dark { 25 --glass-bg-deep-solid: rgb(22, 22, 28); 26 --glass-bg: rgba(22, 22, 28, 0.82); 27 --glass-bg-inset: rgba(22, 22, 28, 0.45); 28 --glass-bg-input: rgba(0, 0, 0, 0.25); 29 --glass-bg-focus: rgba(0, 0, 0, 0.40); 30 --glass-bg-deep: rgba(22, 22, 28, 0.45); 31 --glass-bg-chip: rgba(255, 255, 255, 0.04); 32 --glass-border: rgba(255, 255, 255, 0.06); 33 --glass-border-focus: rgba(255, 255, 255, 0.18); 34 --glass-ring-focus: rgba(255, 255, 255, 0.05); 35 --glass-text: #f4f4f5; 36 --glass-text-muted: #52525b; 37 --glass-edge: rgba(255, 255, 255, 0.12); 38 --glass-edge-bottom: rgba(255, 255, 255, 0.03); 39 --glass-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), 40 0 12px 48px rgba(0, 0, 0, 0.35), 41 inset 0 1px 0 rgba(255, 255, 255, 0.05); 42 --glass-bg-deep-solid: rgb(22, 22, 28); 43 --glass-tile-shadow: inset 0 1.5px 0 rgba(255,255,255,0.08), 44 inset 0 -1px 1px rgba(0,0,0,0.15), 45 0 2px 8px rgba(0,0,0,0.20); 46 } 47 48 .glass-card { 49 --glass-bg-deep-solid: rgb(255, 255, 255); 50 --glass-bg: rgba(255, 255, 255, 0.65); 51 --glass-bg-inset: rgba(255, 255, 255, 0.30); 52 --glass-bg-input: rgba(255, 255, 255, 0.20); 53 --glass-bg-focus: rgba(0, 0, 0, 0.04); 54 --glass-bg-deep: rgba(255, 255, 255, 0.35); 55 --glass-bg-chip: rgba(255, 255, 255, 0.55); 56 --glass-border: rgba(0, 0, 0, 0.07); 57 --glass-border-focus: rgba(0, 0, 0, 0.20); 58 --glass-ring-focus: rgba(0, 0, 0, 0.06); 59 --glass-text: #18181b; 60 --glass-text-muted: #a1a1aa; 61 --glass-edge: rgba(255, 255, 255, 0.85); 62 --glass-edge-bottom: rgba(255, 255, 255, 0.30); 63 --glass-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 64 0 8px 40px rgba(0, 0, 0, 0.04), 65 inset 0 1px 0 rgba(255, 255, 255, 0.70); 66 --glass-tile-shadow: inset 0 1.5px 0 rgba(255,255,255,0.7), 67 inset 0 -1px 1px rgba(0,0,0,0.03), 68 0 2px 8px rgba(0,0,0,0.05); 69 } 70 71 .dark .glass-card { 72 --glass-bg-deep-solid: rgb(22, 22, 28); 73 --glass-bg: rgba(22, 22, 28, 0.82); 74 --glass-bg-inset: rgba(22, 22, 28, 0.45); 75 --glass-bg-input: rgba(0, 0, 0, 0.25); 76 --glass-bg-focus: rgba(0, 0, 0, 0.40); 77 --glass-bg-deep: rgba(22, 22, 28, 0.45); 78 --glass-bg-chip: rgba(255, 255, 255, 0.04); 79 --glass-border: rgba(255, 255, 255, 0.06); 80 --glass-border-focus: rgba(255, 255, 255, 0.18); 81 --glass-ring-focus: rgba(255, 255, 255, 0.05); 82 --glass-text: #f4f4f5; 83 --glass-text-muted: #52525b; 84 --glass-edge: rgba(255, 255, 255, 0.12); 85 --glass-edge-bottom: rgba(255, 255, 255, 0.03); 86 --glass-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), 87 0 12px 48px rgba(0, 0, 0, 0.35), 88 inset 0 1px 0 rgba(255, 255, 255, 0.05); 89 --glass-tile-shadow: inset 0 1.5px 0 rgba(255,255,255,0.08), 90 inset 0 -1px 1px rgba(0,0,0,0.15), 91 0 2px 8px rgba(0,0,0,0.20); 92 } 93 94 .dark .glass-card [contenteditable] { 95 caret-color: #f4f4f5; 96 } 97 .dark .glass-card [contenteditable]:focus { 98 caret-color: #f4f4f5; 99 } 100 101 /* Media card hover border */ 102 .group/media-card:hover { 103 border-color: var(--glass-border-focus) !important; 104 } 105 `}),(0,r.jsx)(H,{open:ee,onOpenChange:et,onCreated:()=>{},onUse:e=>Z(t=>[...t,e])}),(0,r.jsx)(ea,{open:er,onOpenChange:ex,voices:J,onCreated:()=>{},onUse:e=>Y(t=>[...t,e])})]})}],748766)}]);
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.