1import{u as xe,c as be,r as i,j as t}from"./index-L9AYrVUw.js";import{A as ye}from"./FloatingTopMenu-CIhwk2RR.js";import{loadStoreContext as ve}from"./KnowledgeBasePage-DJT9Fkps.js";import{S as p,p as P}from"./studioVisualLayout-BybetI-G.js";import{s as ke}from"./ArrowUp.es-sg_sCqx1.js";import{n as se,aY as je,aZ as Fe,a_ as Ae,b as le}from"./PlanAccessModal-P_W2GThH.js";import{n as we}from"./Plus.es-BeVefyFz.js";import{p as Ce,l as Re}from"./preset-lifestyle-CiuIBzeu.js";import{a as Se}from"./ProductPickerModal-DZV-fDl_.js";import"./locale-Cctu0V3Y.js";import"./productFunnel-DiJFcMU2.js";import"./SnewLogo-Cg53XTnQ.js";import"./ArrowsClockwise.es-CX8V1pij.js";import"./ChatCircle.es-ys8V5LKI.js";import"./FloppyDisk.es-DCGe340Q.js";import"./Globe.es-5iBT42E4.js";import"./Image.es-BLTC_PgL.js";import"./MagicWand.es-CAihBnXI.js";import"./Package.es-CyLjTX4J.js";import"./Palette.es-Dd5ZEM4v.js";import"./Target.es-Ds7XP-fd.js";import"./WarningCircle.es-CHfqKWRY.js";import"./hydrateStoreContext-CnRDd9GD.js";import"./firstAsset-DWUwvZpm.js";import"./modal-close-button-BhLoO4jQ.js";import"./tabs-CmDZA0dx.js";import"./index-BKpKuXmL.js";import"./index-Eo00qZvG.js";import"./SearchInput-h5gAN-Be.js";import"./ImageSquare.es-Ckk4CjAE.js";import"./overImage-BfLII5AZ.js";const D=[{id:"cinematic-slow",title:"Cinematográfico",description:"Câmera lenta, iluminação dramática, tom premium",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4",prompt:"Cinematic slow motion product shot, dramatic directional lighting, dark premium background, film grain, shallow depth of field, camera slowly orbiting the product",badge:"Popular"},{id:"product-spin",title:"Rotação 360°",description:"Giro do produto, fundo limpo, luz de estúdio",videoUrl:Ce,prompt:"Product rotating 360 degrees on clean neutral background, soft diffused studio lighting, sharp focus, professional e-commerce quality"},{id:"lifestyle-motion",title:"Lifestyle em movimento",description:"Cena real, luz natural, autêntico",videoUrl:Re,prompt:"Lifestyle product video, natural daylight, authentic real-life scene, handheld camera feel, warm color grade, person interacting with product naturally"},{id:"reels-hook",title:"Reels com hook",description:"Vertical 9:16, abertura forte, CTA no final",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4",prompt:"Vertical 9:16 social media video, strong visual hook in first 3 seconds, fast cuts, energetic pacing, product as hero, clear CTA moment at end",badge:"Reels"},{id:"unboxing",title:"Unboxing premium",description:"Mãos abrindo embalagem, antecipação",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4",prompt:"Premium unboxing video, hands carefully opening packaging, warm close-up lighting, anticipation and reveal, focus on product details and material quality"},{id:"tv-ad",title:"Anúncio para TV",description:"Storytelling 30s, narrativa cinematográfica",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4",prompt:"30 second TV commercial style, emotional narrative storytelling, broadcast quality cinematography, polished color grade, product hero shot at end"},{id:"macro-detail",title:"Macro detalhe",description:"Close extremo na textura e material",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4",prompt:"Extreme macro close-up video of product texture and material, razor-sharp focus, slow camera drift across surface details, communicates quality and craftsmanship"},{id:"fashion-walk",title:"Fashion em movimento",description:"Modelo em ação, editorial, attitude",videoUrl:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4",prompt:"Fashion editorial video, model wearing product with confident attitude, editorial lighting, dramatic poses and movement, high contrast cinematic look",badge:"Fashion"}];function Ee({style:d,selected:w,onClick:o}){const l=i.useRef(null),[C,R]=i.useState(!1),S=C||w;return i.useEffect(()=>{const b=l.current;if(b){if(S){b.play().catch(()=>{});return}b.pause()}},[S]),t.jsxs("button",{onClick:o,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),style:{border:"none",padding:0,background:"none",cursor:"pointer",textAlign:"left",flexShrink:0,width:"100%",display:"block",borderRadius:14,outline:w?"2px solid #1A1A1A":"none"},children:[t.jsxs("div",{style:{width:"100%",aspectRatio:"1.4 / 1",borderRadius:14,overflow:"hidden",background:"#0A0A0A",position:"relative"},children:[t.jsx("video",{ref:l,src:d.videoUrl,muted:!0,loop:!0,playsInl
1ine:!0,preload:"metadata",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),t.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%)",pointerEvents:"none"}}),w&&t.jsx("div",{style:{position:"absolute",top:8,right:8,width:22,height:22,borderRadius:"50%",background:"#1A1A1A",border:"2px solid #FFF",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:t.jsx("path",{d:"M1 4l2.5 2.5 5.5-6",stroke:"#FFF",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t.jsx("div",{style:{padding:"8px 2px 0"},children:t.jsx("p",{style:{fontSize:13,fontWeight:500,color:"#1A1A1A",margin:0,letterSpacing:"-0.01em",lineHeight:1.3},children:d.title})})]})}const V=[{id:"kling-3.0",label:"Kling 3.0",badge:"Recomendado"},{id:"seedance-2.0",label:"Seedance 2.0",badge:null},{id:"veo-3.1",label:"Veo 3.1",badge:"Premium"},{id:"wan-pro",label:"Wan Pro",badge:null},{id:"minimax-video",label:"Minimax Video",badge:null}],B=[{id:"1:1",label:"1:1",sub:"Quadrado"},{id:"9:16",label:"9:16",sub:"Vertical"},{id:"16:9",label:"16:9",sub:"Widescreen"}],q=(d=!1)=>({appearance:"none",height:28,padding:"0 10px",borderRadius:999,border:`1px solid ${d?"#1A1A1A":"#E5E5E5"}`,background:"#FFFFFF",color:"#1A1A1A",fontSize:12,fontWeight:500,fontFamily:"inherit",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:6}),_={position:"absolute",bottom:"calc(100% + 6px)",left:0,minWidth:190,zIndex:1e3,background:"#FFFFFF",border:"1px solid #E5E5E5",borderRadius:12,padding:6,boxShadow:"0 12px 32px rgba(0,0,0,0.10)",display:"flex",flexDirection:"column",gap:2},M=(d=!1)=>({appearance:"none",textAlign:"left",padding:"8px 12px",borderRadius:8,background:d?"#F2F2F2":"transparent",border:"none",color:d?"#1A1A1A":"#444",fontSize:13,fontWeight:d?500:400,cursor:"pointer",fontFamily:"inherit"});function st(){var ie,re,ae;const d=xe(),o=be().state,l=o==null?void 0:o.creativeEntry,C=(()=>{const r={kling:"kling-3.0","runway-gen3":"kling-3.0","veo-3":"veo-3.1"}[(o==null?void 0:o.model)??""]??(o==null?void 0:o.model);return V.some(n=>n.id===r)?r:"kling-3.0"})(),R=B.some(e=>e.id===(o==null?void 0:o.format))&&!(C==="veo-3.1"&&(o==null?void 0:o.format)==="1:1")?o.format:"9:16",S=String((o==null?void 0:o.duration)??"5").startsWith("10")?10:5,[b,de]=i.useState(!0),c=i.useMemo(()=>ve(),[]),G=(c==null?void 0:c.name)??"Studio",[y,z]=i.useState((l==null?void 0:l.prompt)??(o==null?void 0:o.initialPrompt)??(o==null?void 0:o.autoPrompt)??""),[m,Y]=i.useState(D.some(e=>e.id===(o==null?void 0:o.presetId))?(o==null?void 0:o.presetId)??null:null),[f,ce]=i.useState(C),[h,H]=i.useState(R),[v,pe]=i.useState(S),[K,k]=i.useState(!1),[J,j]=i.useState(!1),[Q,x]=i.useState(!1),[ue,T]=i.useState(!1),[O,E]=i.useState(!1),[F,W]=i.useState((l==null?void 0:l.product.image)??""),[X,L]=i.useState((l==null?void 0:l.product.name)??""),[u,I]=i.useState(""),A=i.useRef(0),Z=i.useRef(null),ee=i.useRef(null),te=i.useRef(null),oe=i.useRef(null),U=i.useRef(null);i.useEffect(()=>{const e=r=>{var n,s,a;(n=Z.current)!=null&&n.contains(r.target)||k(!1),(s=ee.current)!=null&&s.contains(r.target)||j(!1),(a=te.current)!=null&&a.contains(r.target)||x(!1)};return document.addEventListener("mousedown",e,!0),()=>document.removeEventListener("mousedown",e,!0)},[]),i.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]);const me=i.useCallback(e=>{const r=Array.from(e),n=r.find(a=>a.type.startsWith("image/")),s=r.filter(a=>!a.type.startsWith("image/")).map(a=>a.name);if(n){const a=new FileReader;a.onload=g=>{var ne;return I((ne=g.target)==null?void 0:ne.result)},a.readAsDataURL(n)}s.length&&z(a=>`${a}${a.trim()?` 2`:""}Arquivos anexados: ${s.join(", ")}`)},[]),$=i.useCallback(()=>{const e=D.find(s=>s.id===m),r=y.trim()||(e==null?void 0:e.prompt)||"Criar vÃdeo do produto principal",n=c!=null&&c.name?`${r} â brand: ${c.name}, tone: ${c.tone||"premium"}`:r;d("/generate-image",{state:{_ts:Date.now(),autoPrompt:n,initialCategory:"video",initialMode:null,videoMode:!0,videoModel:f,videoFormat:h,videoDuration:v,videoRefImage:u||F||null,styleId:m??(o==null?void 0:o.presetId)??null}})},[y,m,f,h,v,F,u,d,c,o==null?void 0:o.presetId]),N=!!(y.trim()||m||F||u),ge=((ie=V.find(e=>e.id===f))==null?void 0:ie.label)??f,fe=((re=B.find(e=>e.id===h))==null?void 0:re.label)??h,he=B.filter(e=>f!=="veo-3.1"||e.id!=="1:1");return t.jsxs("div",{style:{display:"flex",width:"100vw",height:"100vh",overflow:"hidden"},children:[t.jsx(ye,{collapsed:b,onToggleCollapse:()=>de(e=>!e)}),t.jsx("div",{style:{flex:1,minWidth:0,overflowY:"auto",background:"hsl(40,7%,96%)"},children:t.jsxs("div",{style:{maxWidth:p.pageMaxWidth,margin:"0 auto",padding:`${P(p.pagePaddingTop)} ${P(p.pagePaddingX)} ${P(p.pagePaddingBottom)}`},children:[t.jsxs("div",{style:{maxWidth:p.chatMaxWidth,margin:"0 auto 80px"},children:[t.jsx("h1",{style:{fontSize:p.headerFontSize,fontWeight:p.headerFontWeight,color:"#1A1A1A",letterSpacing:p.headerLetterSpacing,textAlign:"center",margin:`0 0 ${P(p.headerToChatboxGap)}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c?`Criar vÃdeo para ${G}`:"Criar vÃdeo com IA"}),t.jsxs("div",{onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),A.current+=1,E(!0)},onDragOver:e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"),E(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),A.current=Math.max(0,A.current-1),A.current===0&&E(!1)},onDrop:e=>{e.preventDefault(),e.stopPropagation(),A.current=0,E(!1),me(e.dataTransfer.files)},style:{background:"#FFF",border:`1.5px solid ${O?"#1A1A1A":"#EAEAEA"}`,borderRadius:p.chatboxRadius,padding:p.chatboxPadding,boxShadow:O?"0 10px 30px rgba(0,0,0,0.10)":"0 1px 2px rgba(0,0,0,0.03)",display:"flex",flexDirection:"column",gap:10,position:"relative",transition:"border-color 0.15s ease, box-shadow 0.15s ease"},children:[O&&t.jsx("div",{style:{position:"absolute",inset:8,borderRadius:18,border:"1px dashed hsl(var(--foreground) / 0.35)",background:"hsl(var(--background) / 0.72)",display:"flex",alignItems:"center",justifyContent:"center",color:"hsl(var(--foreground))",fontSize:13,fontWeight:500,pointerEvents:"none",zIndex:5},children:"Solte os arquivos aqui"}),(u||F)&&t.jsxs("div",{className:"flex items-center gap-3 rounded-xl bg-neutral-50 p-3",children:[t.jsx("img",{src:u||F,alt:u?"Imagem de referência":X,className:"h-16 w-16 rounded-lg object-cover"}),t.jsx("span",{className:"text-sm",children:u?"Imagem de referência":X}),t.jsx("button",{type:"button",className:"ml-auto text-sm underline",onClick:()=>{var e,r;return u?(e=U.current)==null?void 0:e.click():(r=oe.current)==null?void 0:r.click()},children:"Trocar imagem"}),t.jsx("button",{type:"button","aria-label":"Remover imagem",className:"text-neutral-500",onClick:()=>u?I(""):(W(""),L("")),children:t.jsx(se,{size:14})})]}),t.jsx("textarea",{value:y,onChange:e=>z(e.target.value),placeholder:c?`Descreva o vÃdeo para ${G}...`:"Descreva a cena ou escolha um preset abaixo...",rows:3,onKeyDown:e=>{e.key==="Enter"&&!e.shiftKey&&N&&(e.preventDefault(),$())},style:{width:"100%",border:"none",outline:"none",resize:"none",fontSize:14,color:"#1A1A1A",background:"transparent",fontFamily:"inherit",lineHeight:1.5,padding:0,boxSizing:"border-box",minHeight:84}}),t.jsx("input",{ref:oe,type:"file",accept:"image/*",hidden:!0,onChange:e=>{var s;const r=(s=e.target.files)==null?void 0:s[0];if(!r)return;const n=new FileReader;n.onload=a=>{var g;W((g=a.target)==null?void 0:g.result),L(r.name.replace(/\.[^.]+$/,""))},n.readAsDataURL(r),e.target.value=""}}),t.jsx("input",{ref:U,type:"file",accept:"image/*",hidden:!0,onChange:e=>{var s;const r=(s=e.target.files)==null?void 0:s[0];if(!r)return;const n=new FileReader;n.onload=a=>{var g;I((g=a.target)==null?void 0:g.result)},n.readAsDataURL(r),e.target.value=""}}),t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[t.jsxs("div",{ref:te,style:{position:"relative"},onClick:e=>e.stopPropagation(),children:[t.jsxs(je,{delayDuration:120,children:[t.jsx(Fe,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":"Adicionar",onClick:()=>{x(e=>!e),j(!1),k(!1)},style:{...q(Q),width:28,padding:0,justifyContent:"center",flexShrink:0},children:t.jsx(we,{size:14})})}),t.jsx(Ae,{side:"top",sideOffset:8,children:"Adicionar"})]}),Q&&t.jsxs("div",{style:_,children:[t.jsx("button",{style:M(!1),onClick:()=>{x(!1),T(!0)},children:"Catálogo de produtos"}),t.jsx("button",{style:M(!1),onClick:()=>{var e;x(!1),(e=U.current)==null||e.click()},children:"Imagem de referência"})]})]}),t.jsxs("div",{ref:ee,style:{position:"relative"},onClick:e=>e.stopPropagation(),children:[t.jsxs("button",{type:"button",onClick:()=>{j(e=>!e),x(!1),k(!1)},style:q(J),children:[fe,t.jsx(le,{size:12})]}),J&&t.jsx("div",{style:_,children:he.map(e=>t.jsx("button",{style:M(h===e.id),onClick:()=>{H(e.id),j(!1)},children:e.label},e.id))})]}),t.jsxs("div",{ref:Z,style:{position:"relative"},onClick:e=>e.stopPropagation(),children:[t.jsxs("button",{type:"button",onClick:()=>{k(e=>!e),x(!1),j(!1)},style:q(K),children:[ge,t.jsx(le,{size:12})]}),K&&t.jsx("div",{style:_,children:V.map(e=>t.jsxs("button",{style:M(f===e.id),onClick:()=>{ce(e.id),e.id==="veo-3.1"&&h==="1:1"&&H("9:16"),k(!1)},children:[e.label,e.badge&&t.jsx("span",{style:{fontSize:10,marginLeft:6,padding:"1px 6px",borderRadius:20,background:"#EAF3DE",color:"#27500A"},children:e.badge})]},e.id))})]}),t.jsx("div",{style:{display:"inline-flex",height:28,alignItems:"center",borderRadius:999,border:"1px solid #E5E5E5",background:"#FFFFFF",overflow:"hidden"},onClick:e=>e.stopPropagation(),children:[5,10].map(e=>t.jsxs("button",{onClick:()=>pe(e),style:{appearance:"none",padding:"0 10px",height:28,border:"none",background:v===e?"#1A1A1A":"transparent",color:v===e?"#FFF":"#666",fontSize:12,fontWeight:v===e?500:400,cursor:"pointer",fontFamily:"inherit"},children:[e,"s"]},e))})]}),t.jsx("button",{className:"snew-main-action",onClick:$,disabled:!N,style:{width:32,height:32,borderRadius:"50%",border:"none",cursor:N?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",transition:"background .12s",flexShrink:0},children:t.jsx(ke,{size:14})})]})]})]}),t.jsx("div",{style:{width:"100%",margin:"0 auto"},children:t.jsx("div",{className:"motion-styles-grid",style:{display:"grid",gridTemplateColumns:"repeat(4, minmax(0, 1fr))",gap:20,alignItems:"start"},children:D.map(e=>t.jsx(Ee,{style:e,selected:m===e.id,onClick:()=>{Y(r=>r===e.id?null:e.id),y.trim()||z(e.prompt)}},e.id))})}),m&&t.jsx("div",{style:{position:"sticky",bottom:24,display:"flex",justifyContent:"center",marginTop:32,pointerEvents:"none"},children:t.jsxs("div",{style:{pointerEvents:"auto",display:"flex",alignItems:"center",gap:10,background:"#1A1A1A",borderRadius:999,padding:"10px 20px 10px 16px",boxShadow:"0 8px 24px rgba(0,0,0,0.22)"},children:[t.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:"#4ADE80",animation:"pulse 1.5s ease-in-out infinite"}}),t.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"#FFF"},children:[(ae=D.find(e=>e.id===m))==null?void 0:ae.title," selecionado"]}),t.jsx("button",{onClick:$,style:{padding:"6px 14px",borderRadius:999,background:"#FFF",border:"none",color:"#1A1A1A",fontSize:12,fontWeight:500,cursor:"pointer",fontFamily:"inherit"},children:"Gerar vÃdeo"}),t.jsx("button",{onClick:()=>Y(null),style:{width:22,height:22,borderRadius:"50%",border:"none",background:"rgba(255,255,255,0.12)",color:"#FFF",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0},children:t.jsx(se,{size:11})})]})})]})}),t.jsx(Se,{open:ue,onClose:()=>T(!1),onPick:e=>{W(e.image),L(e.name),I(""),T(!1)}}),t.jsx("style",{children:` 3 @keyframes fadeSlideUp { 4 from { opacity: 0; transform: translateY(6px); } 5 to { opacity: 1; transform: translateY(0); } 6 } 7 @keyframes pulse { 8 0%,100% { opacity: 1; } 9 50% { opacity: 0.4; } 10 } 11 @media (max-width: 1100px) { 12 .motion-styles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } 13 } 14 @media (max-width: 760px) { 15 .motion-styles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; } 16 } 17 @media (max-width: 520px) { 18 .motion-styles-grid { grid-template-columns: 1fr !important; } 19 } 20 `})]})}
20export{st as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.