PageSourceSearch

https://www.undressd.ai/_next/static/chunks/05cabp9t1mo0..js?dpl=dpl_EfeAZcvRv9SZ8kF6ff8psRHzTkZZ

js undressd.ai collected 2026-10-05 13:10:33 UTC 53,882 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,364668,e=>{"use strict";var t=e.i(228137);e.s(["LoaderCircle",()=>t.default])},448407,e=>{"use strict";let t=(0,e.i(306927).default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,t],448407)},585452,e=>{"use strict";var t=e.i(124023);e.s(["WandSparkles",()=>t.default])},563825,e=>{"use strict";var t=e.i(763726);e.s(["AlertTriangle",()=>t.default])},98435,e=>{"use strict";var t=e.i(176350),r=e.i(273576),a=e.i(563825),i=e.i(364668),n=e.i(175442),s=e.i(877555),o=e.i(647163);function l({job:e,result:r,modelIcon:d,showModelBadge:c=!1,onPreview:u,onRemove:m,aspectClassName:p="aspect-square"}){if(r)return(0,t.jsx)("div",{className:"animate-in fade-in duration-300 motion-reduce:animate-none",children:(0,t.jsx)(s.GenerationResultCard,{src:r.src,media:r.media,label:r.modelName||r.media,modelName:r.modelName,modelIcon:d,showModelBadge:c,asset:{id:r.id,model:r.modelName,createdAt:new Date(r.createdAt).toISOString()},onPreview:u,onDelete:m??(()=>void 0),aspectClassName:p})});let h="fail"===e.status,g=Math.max(0,Math.min(100,e.progress));return(0,t.jsxs)("article",{"aria-live":"polite",className:(0,o.cn)("group relative flex flex-col overflow-hidden rounded-lg border bg-card p-4 shadow-sm",p,h?"border-destructive/25":"border-border/70"),children:[c&&d?(0,t.jsxs)("span",{className:"pointer-events-none absolute left-2 top-2 z-10 hidden max-w-[calc(100%-3rem)] items-center gap-1.5 rounded-full border border-border bg-background/85 py-1 pl-1 pr-2.5 text-[11px] font-semibold text-foreground shadow-sm backdrop-blur sm:inline-flex",children:[(0,t.jsx)("img",{src:d,alt:"",className:"size-[18px] shrink-0 rounded-full bg-white p-[2px]"}),(0,t.jsx)("span",{className:"truncate",children:e.modelName})]}):null,m?(0,t.jsx)("button",{type:"button",onClick:m,className:"absolute right-2 top-2 inline-flex size-8 items-center justify-center rounded-full bg-background/80 text-foreground opacity-0 shadow-md backdrop-blur transition-opacity hover:bg-background focus-visible:opacity-100 group-hover:opacity-100","aria-label":`Remove ${e.modelName} job`,children:(0,t.jsx)(n.X,{className:"size-4","aria-hidden":"true"})}):null,(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 text-center",children:[h?(0,t.jsx)(a.AlertTriangle,{className:"size-7 text-destructive","aria-hidden":"true"}):(0,t.jsx)(i.LoaderCircle,{className:"size-7 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true"}),(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("span",{className:"text-sm text-foreground",children:h?"Generation failed":"waiting"===e.status?"Waiting to start...":"Generating..."}),(0,t.jsx)("p",{className:"line-clamp-3 text-xs leading-5 text-muted-foreground",children:h?e.error||"This job could not be completed.":"waiting"===e.status?"Preparing your request...":`${Math.round(g)}% complete`})]})]}),h||"running"!==e.status?null:(0,t.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-muted",role:"progressbar","aria-label":"Generation progress","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g),children:(0,t.jsx)("div",{className:"h-full rounded-full bg-primary transition-[width] duration-500 motion-reduce:transition-none",style:{width:`${g}%`}})})]})}e.s(["GenerationJobTile",0,l,"GenerationPendingTile",0,function({status:e="running",progress:a,expectedMs:i,error:n,onRemove:s,aspectClassName:o}){let d=void 0!==i,[c,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(0),[h,g]=(0,r.useState)(0),[f]=(0,r.useState)(()=>.75+.7*Math.random()),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{if("running"!==e){u(!1),p(0),g(0),x.current=null;return}let t=window.setTimeout(()=>{u(!0),p(10+Math.round(12*Math.random()))},300+400*Math.random());return()=>window.clearTimeout(t)},[e]),(0,r.useEffect)(()=>
1{if(!d||"running"!==e)return;null===x.current&&(x.current=Date.now());let t=()=>{let e=x.current??Date.now();g(Math.min(94,1+93*((Date.now()-e)/Math.max(1e3,i))))};t();let r=window.setInterval(t,250);return()=>window.clearInterval(r)},[d,i,e]),(0,r.useEffect)(()=>{if(d||!c||void 0!==a||"running"!==e)return;let t=window.setInterval(()=>{p(e=>{let t=((e<45?6:e<75?3:1.5)+2*Math.random())*f;return Math.min(93,e+t)})},700);return()=>window.clearInterval(t)},[d,c,a,e,f]);let b="running"!==e||d||c?e:"waiting",v=d?Math.max(a??0,h):c?a??m:0;return(0,t.jsx)(l,{job:{id:"generation",modelName:"Generation",status:b,progress:v,error:n},aspectClassName:o,onRemove:s})}])},892394,e=>{"use strict";let t="logoai.generation-results.v1",r="logoai.design-studio.results.v1",a="logoai.ai-editor.results.v1",i="logoai.ai-video.results.v1",n="logoai.dismissed-generation-results.v1";function s(e){return(function(){try{let e=Date.now(),t=JSON.parse(window.localStorage.getItem(n)??"[]"),r=Array.isArray(t)?t.filter(t=>"string"==typeof t?.src&&"number"==typeof t?.dismissedAt&&e-t.dismissedAt<2592e5):[];return window.localStorage.setItem(n,JSON.stringify(r)),r}catch{return[]}})().some(t=>t.src===e)}function o(e){try{let t=JSON.parse(window.localStorage.getItem(e)??"[]");return Array.isArray(t)?t:[]}catch{return[]}}e.s(["AI_STUDIO_RESULTS_STORAGE_KEY",0,r,"migrateLegacyGenerationResults",0,function(){try{if(null===window.localStorage.getItem(a)&&null===window.localStorage.getItem(i))return;let e=new Map;for(let t of[r,a,i])for(let r of o(t))r?.id&&r?.src&&e.set(`${r.id}:${r.src}`,r);let t=[...e.values()].sort((e,t)=>(Number(t.createdAt)||0)-(Number(e.createdAt)||0)).slice(0,100);window.localStorage.setItem(r,JSON.stringify(t)),window.localStorage.removeItem(a),window.localStorage.removeItem(i)}catch{}},"readGenerationResultUrls",0,function(e){return[...new Set(o(e).filter(e=>"string"==typeof e&&e.length>0&&!s(e)))].slice(0,100)},"readGenerationResults",0,function(e=t){let r=o(e),a=new Map;for(let e of r){if(!e?.id||!e?.src)continue;let t={id:String(e.id),media:"video"===e.media?"video":"image",src:String(e.src),modelName:String(e.modelName??"AI model"),prompt:String(e.prompt??""),ratio:String(e.ratio??"Auto"),references:Array.isArray(e.references)?e.references:[],createdAt:Number(e.createdAt)||0,taskId:e.taskId?String(e.taskId):void 0,runI
1d:e.runId?String(e.runId):void 0,sceneLabel:e.sceneLabel?String(e.sceneLabel):void 0};a.set(`${t.id}:${t.src}`,t)}return[...a.values()].filter(e=>!s(e.src)).sort((e,t)=>t.createdAt-e.createdAt).slice(0,100)},"writeGenerationResultUrls",0,function(e,t){window.localStorage.setItem(t,JSON.stringify([...new Set(e)].slice(0,100)))},"writeGenerationResults",0,function(e,r=t){window.localStorage.setItem(r,JSON.stringify([...e].sort((e,t)=>t.createdAt-e.createdAt).slice(0,100)))}])},272967,e=>{"use strict";let t="logoai.pending-generation-input.v1";e.s(["consumePendingGenerationInput",0,function(e){try{let r=window.sessionStorage.getItem(t);if(!r)return null;let a=JSON.parse(r);if(a.media!==e)return null;return window.sessionStorage.removeItem(t),a}catch{return window.sessionStorage.removeItem(t),null}},"savePendingGenerationInput",0,function(e){window.sessionStorage.setItem(t,JSON.stringify(e))}])},604702,e=>{"use strict";function t(e){return new Promise((t,r)=>{let a=URL.createObjectURL(e),i=new Image;i.onload=()=>{URL.revokeObjectURL(a),t(i)},i.onerror=()=>{URL.revokeObjectURL(a),r(Error("Unable to read the reference image."))},i.src=a})}function r(e,t){let r=Math.min(1,t/Math.max(e.naturalWidth,e.naturalHeight)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(e.naturalWidth*r)),a.height=Math.max(1,Math.round(e.naturalHeight*r));let i=a.getContext("2d");if(!i)throw Error("Unable to prepare the reference image.");return i.fillStyle="#ffffff",i.fillRect(0,0,a.width,a.height),i.drawImage(e,0,0,a.width,a.height),a}async function a(e){if(!e.type.startsWith("image/"))throw Error("Reference image must be PNG, JPG, WEBP, or GIF.");let a=r(await t(e),1280),i=await new Promise(e=>a.toBlob(e,"image/jpeg",.85));if(!i)throw Error("Unable to compress the reference image.");return i}async function i(e){if(!e.type.startsWith("image/"))throw Error("Reference image must be PNG, JPG, WEBP, or GIF.");return r(await t(e),1280).toDataURL("image/jpeg",.85)}e.s(["prepareReferenceDataUrl",0,i,"prepareReferenceImage",0,a,"uniqueReferenceFileName",0,function(e){let t=e.replace(/\.[^/.]+$/,"").replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,80)||"reference";return`${t}-${crypto.randomUUID()}.jpg`}])},408814,e=>{"use strict";let t=(0,e.i(306927).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],408814)},85257,675692,e=>{"use strict";let t=(0,e.i(306927).default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",0,t],85257);var r=e.i(273576);e.s(["useLeaveWarning",0,function(e,t="Your results are still generating. If you leave now they will be lost. Leave anyway?"){(0,r.useEffect)(()=>{if(!e)return;let r=e=>(e.preventDefault(),e.returnValue=t,t),a=e=>{let r;if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let a=e.target?.closest?.("a");if(!a)return;let i=a.getAttribute("href");if(!(!i||i.startsWith("#")||"_blank"===a.target||a.hasAttribute("download"))){try{r=new URL(i,window.location.href)}catch{return}r.origin!==window.location.origin||(r.pathname!==window.location.pathname||r.search!==window.location.search)&&(window.confirm(t)||(e.preventDefault(),e.stopPropagation()))}};return window.addEventListener("beforeunload",r),document.addEventListener("click",a,!0),()=>{window.removeEventListener("beforeunload",r),document.removeEventListener("click",a,!0)}},[e,t])}],675692)},583965,e=>{"use strict";var t=e.i(176350),r=e.i(273576),a=e.i(597971),i=e.i(563825),n=e.i(306927);let s=(0,n.default)("armchair",[["path",{d:"M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3",key:"irtipd"}],["path",{d:"M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z",key:"1qyhux"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]]);var o=e.i(333268),l=e.i(408814),d=e.i(448407),c=e.i(364668);let u=(0,n.default)("move-right",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]),m=(0,n.default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]),p=(0,n.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),h=(0,n.default)("scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]),g=(0,n.default)("shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);var f=e.i(809180),x=e.i(175442),b=e.i(947560),v=e.i(672136),w=e.i(752490),y=e.i(445892),j=e.i(647163);let N=[5,10],k="anylogo:undress-scene-extender",S=[{id:"seductive-pose",name:"Seductive Pose",icon:f.Sparkles,prompt:"She gathers her hair and ties it back, then slowly kneels down while keeping her face tilted upward at roughly a 45-degree angle toward the camera, maintaining steady eye contact and seductive smile."},{id:"turn-around",name:"Turn Around",icon:p,prompt:"She slowly turns around to reveal her back, glancing over her shoulder with a soft, teasing smile, natural and realistic motion."},{id:"come-closer",name:"Come Closer",icon:u,prompt:"She leans in toward the camera, closing the distance with a warm, inviting gaze and a subtle smile as the framing tightens."},{id:"slow-dance",name:"Slow Dance",icon:m,prompt:"She begins to sway and dance slowly to a rhythm, hi
1ps and shoulders moving gracefully with smooth, natural motion."},{id:"sit-and-pose",name:"Sit & Pose",icon:s,prompt:"She sits down elegantly and settles into a relaxed, confident pose, adjusting her posture with natural movement."},{id:"hair-and-gaze",name:"Hair & Gaze",icon:l.Eye,prompt:"She runs her fingers through her hair, tilts her head, and holds a lingering, captivating gaze straight at the camera."},{id:"glamour-close-up",name:"Close-up",icon:h,prompt:"The camera slowly pushes in for a glamorous close-up as she gives a soft, sultry expression and a gentle smile."},{id:"outfit-change",name:"Outfit Change",icon:g,prompt:"She transitions into a different outfit with a smooth reveal, showing off the new look with a confident turn."}],I=S[0];function C(e){return new Promise(t=>{let r=document.createElement("video"),a=!1,i=e=>{a||(a=!0,clearTimeout(n),t(e))},n=setTimeout(()=>i(0),8e3);r.preload="metadata",r.onloadedmetadata=()=>i(Number.isFinite(r.duration)?r.duration:0),r.onerror=()=>i(0),r.src=e})}async function E(e,t,r){let a=document.createElement("video");a.src=e,a.muted=!0,a.playsInline=!0,await new Promise((e,t)=>{a.onloadedmetadata=()=>e(),a.onerror=()=>t(Error("Could not load the clip for trimming."))}),a.currentTime=t,await new Promise(e=>{a.onseeked=()=>e()});let i=a.captureStream?.()??a.mozCaptureStream?.();if(!i)throw Error("This browser cannot process the video. Try Chrome.");let n="u"<typeof MediaRecorder?"":["video/mp4;codecs=avc1","video/mp4","video/webm;codecs=vp9","video/webm"].find(e=>MediaRecorder.isTypeSupported(e))??"",s=new MediaRecorder(i,n?{mimeType:n}:void 0),o=[];s.ondataavailable=e=>{e.data.size&&o.push(e.data)};let l=new Promise(e=>{s.onstop=()=>e(new Blob(o,{type:n||"video/webm"}))});return s.start(100),await a.play(),await new Promise(e=>{let t=()=>{if(a.currentTime>=r||a.ended)return e();requestAnimationFrame(t)};t()}),s.stop(),a.pause(),l}let M={trimming:"Preparing your clip",uploading:"Uploading your clip",queued:"In queue",rendering:"Generating"},U=["trimming","uploading","queued","rendering"],R=["Analyzing motion, lighting, and style…","Choreographing how the scene continues…","Painting new frames…","Enhancing detail and smoothing motion…","Adding the finishing touches…"];function z({stage:e,estimateSec:a,reportedProgress:i}){let[n,s]=(0,r.useState)(0),[o,l]=(0,r.useState)(0),[d,u]=(0,r.useState)(0),m="rendering"===e;(0,r.useEffect)(()=>{let e=setInterval(()=>l(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.useEffect)(()=>{if(!m)return;s(0),u(0);let e=setInterval(()=>s(e=>(e+1)%R.length),5e3),t=setInterval(()=>u(e=>e+.2),200);return()=>{clearInterval(e),clearInterval(t)}},[m]);let p=Math.round(100*Math.max(a>0?Math.min(.95,d/a):0,Math.min(.99,i))),h=U.indexOf(e);return(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 rounded-xl border border-border bg-card px-4 py-8 text-center",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm font-semibold text-foreground",children:[(0,t.jsx)(c.LoaderCircle,{className:"size-5 animate-spin text-primary","aria-hidden":"true"}),(0,t.jsxs)("span",{"aria-live":"polite",children:[M[e],"…"]})]}),m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:R[n]}),(0,t.jsxs)("div",{className:"w-full max-w-xs",children:[(0,t.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-muted",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":p,"aria-label":"Generating progress",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-primary transition-[width] duration-200 ease-linear",style:{width:`${p}%`}})}),(0,t.jsxs)("p",{className:"mt-1.5 text-xs font-medium tabular-nums text-muted-foreground",children:[p,"%"]})]})]}):(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:U.map((e,r)=>(0,t.jsx)("span",{className:(0,j.cn)("h-1.5 rounded-full transition-all",r<=h?"w-6 bg-primary":"w-3 bg-muted"),"aria-hidden":"true"},e))}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Keep this tab open · ",Math.floor(o/60),":",String(o%60).padStart(2,"0")," elapsed"]})]})}function T({node:e,index:a,active:i,busy:n,stage:s,estimateSec:l,reportedProgress:u,onChange:m,onGenerate:p,onRefine:h,onRemove:g,busyChain:b,allowExtend:v}){var w;let[y,N]=(0,r.useState)(!1),k="image"===e.media,S=function(e,t,r=!1){if(r)return Math.ceil((t?8.2:3.8)*e);let a=2+e;return Math.ceil(2.4*a)+(t?Math.ceil(5*a):0)}(e.outputSeconds,e.hd,k),I="source"===e.kind?v?"Image to video":"Your video":`Continuation ${a}`,C=k?`image-${a}.png`:"source"===e.kind?"original-video.mp4":`continuation-${a}.mp4`,E=i&&null!==s,M=(0,r.useCallback)(async()=>{N(!0);try{let t=await fetch(e.url);if(!t.ok)throw Error("download failed");let r=URL.createObjectURL(await t.blob()),a=document.createElement("a");a.href=r,a.download=C,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(r),4e3)}catch{window.open(e.url,"_blank","noopener")}finally{N(!1)}},[e.url,C]);return(0,t.jsxs)("article",{className:"overflow-hidden rounded-2xl border border-border bg-card shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border/70 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:["source"===e.kind?(0,t.jsx)(d.Film,{className:"size-4 text-primary","aria-hidden":"true"}):(0,t.jsx)(f.Sparkles,{className:"size-4 text-primary","aria-hidden":"true"}),I,e.duration>0?(0,t.jsx)("span",{className:"text-xs font-normal text-muted-foreground",children:(w=e.duration,`${w.toFixed(+(w%1!=0))}s`)}):null]}),(0,t.jsx)("button",{type:"button",onClick:g,disabled:b,"aria-label":"source"===e.kind?"Remove original video":`Remove c
1ontinuation ${a}`,className:"inline-flex size-7 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",children:(0,t.jsx)(x.X,{className:"size-4","aria-hidden":"true"})})]}),(0,t.jsxs)("div",{className:(0,j.cn)("grid gap-5 p-4",v&&"md:grid-cols-2"),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[k?(0,t.jsx)("img",{src:e.url||"/placeholder.svg",alt:I,className:"aspect-square w-full rounded-lg bg-muted object-contain"}):(0,t.jsx)("video",{src:e.url,controls:!0,playsInline:!0,preload:"metadata",crossOrigin:"anonymous",onLoadedMetadata:e=>h(e.currentTarget.duration),className:"aspect-square w-full rounded-lg bg-black object-contain"}),(0,t.jsxs)("button",{type:"button",onClick:M,disabled:y,className:"inline-flex min-h-9 items-center justify-center gap-2 self-start rounded-full border border-destructive bg-white px-4 text-xs font-semibold text-destructive transition-colors hover:bg-destructive/5 disabled:opacity-60",children:[y?(0,t.jsx)(c.LoaderCircle,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,t.jsx)(o.Download,{className:"size-3.5","aria-hidden":"true"}),y?"Preparing…":"Download"]})]}),v?E?(0,t.jsx)(z,{stage:s,estimateSec:l,reportedProgress:u}):i?(0,t.jsx)(A,{node:e,busy:n,cost:S,onChange:m,onGenerate:p}):e.used?(0,t.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Continued with"}),(0,t.jsx)("p",{className:"font-semibold text-foreground",children:e.used.sceneName}),(0,t.jsx)("p",{className:"text-pretty text-foreground",children:e.used.prompt}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.used.outputSeconds,"s · ",e.used.hd?"720P":"480P"]})]}):null:null]})]})}function A({node:e,busy:r,cost:a,onChange:i,onGenerate:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-bold text-foreground",children:"Choose what happens next"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Pick a scene, then customize the prompt if needed."})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:S.map(a=>{let n=a.icon,s=e.sceneId===a.id;return(0,t.jsxs)("button",{type:"button",disabled:r,"aria-pressed":s,onClick:()=>i({sceneId:a.id,prompt:a.prompt}),className:(0,j.cn)("flex flex-col items-center justify-center gap-1.5 rounded-xl border px-2 py-3 text-center transition-colors disabled:cursor-not-allowed disabled:opacity-60",s?"border-primary bg-primary/5 text-primary":"border-border text-foreground hover:border-primary/40 hover:bg-muted/50"),children:[(0,t.jsx)(n,{className:"size-5","aria-hidden":"true"}),(0,t.jsx)("span",{className:"text-xs font-medium leading-tight text-pretty",children:a.name})]},a.id)})}),(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-foreground",children:"Describe the continuation (optional)"}),(0,t.jsx)("textarea",{value:e.prompt,maxLength:500,onChange:e=>i({prompt:e.target.value}),placeholder:"e.g. she gives a playful smile and slowly leans closer to the camera…",rows:3,className:"min-h-20 w-full resize-none rounded-lg border border-border bg-background px-3 py-2 text-base leading-relaxed text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-primary/40"})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"rounded-xl border border-border p-3",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-foreground",children:"Duration"}),(0,t.jsx)("div",{className:"mt-2 flex gap-1.5",children:N.map(a=>{let n=e.outputSeconds===a;return(0,t.jsxs)("button",{type:"button",disabled:r,onClick:()=>i({outputSeconds:a}),className:(0,j.cn)("flex-1 rounded-lg px-2 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-60",n?"bg-primary text-primary-foreground":"bg-muted text-foreground hover:bg-muted/70"),children:[a," seconds"]},a)})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-sm font-semibold text-foreground",children:[(0,t.jsx)("span",{className:"rounded bg-primary/10 px-1 py-0.5 text-[10px] font-bold text-primary",children:"HD"}),"High Resolution"]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Sharper 720P output"})]}),(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e.hd,"aria-label":"720P high resolution",disabled:r,onClick:()=>i({hd:!e.hd}),className:(0,j.cn)("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-60",e.hd?"bg-primary":"bg-muted-foreground
1/30"),children:(0,t.jsx)("span",{className:(0,j.cn)("inline-block size-5 rounded-full bg-white shadow-sm transition-transform",e.hd?"translate-x-[22px]":"translate-x-0.5")})})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-border/70 pt-4",children:[(0,t.jsxs)("div",{className:"text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"block text-xs uppercase tracking-wide",children:"Estimated cost"}),(0,t.jsxs)("span",{className:"text-lg font-bold text-foreground",children:[a," credits"]}),(0,t.jsxs)("span",{className:"ml-1 text-xs",children:["(",e.outputSeconds,"s · ",e.hd?"720P":"Standard",")"]})]}),(0,t.jsxs)("button",{type:"button",onClick:n,disabled:r||!e.prompt.trim(),className:"inline-flex min-h-11 items-center gap-2 rounded-full bg-primary px-6 text-sm font-semibold text-primary-foreground transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",children:[(0,t.jsx)(f.Sparkles,{className:"size-4","aria-hidden":"true"}),"Generate"]})]})]})}e.s(["UndressSceneExtender",0,function({initialVideoUrl:e,seedMedia:n="video",storageNamespace:s="home",onRemoveSource:o,allowExtend:l=!0}){let{openSignIn:d}=(0,w.useAuthDialog)(),{openUpgrade:c}=(0,y.useUpgradeDialog)(),{data:u}=v.authClient.useSession(),m=!!u?.user,p=`${k}:${s}:${e}`,h=(0,r.useCallback)(()=>[{id:crypto.randomUUID(),kind:"source",media:n,url:e,duration:0,sceneId:I.id,prompt:I.prompt,outputSeconds:N[0],hd:!1}],[e,n]),[g,f]=(0,r.useState)(h),[x,j]=(0,r.useState)("idle"),[M,U]=(0,r.useState)(null),[R,z]=(0,r.useState)(0),[A,P]=(0,r.useState)(0),[L,D]=(0,r.useState)(null),[G,$]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{let t=localStorage.getItem(p);if(t){let r=JSON.parse(t);Array.isArray(r)&&r.length&&r[0]?.url===e?f(r):f(h())}}catch{}$(!0)},[e,h,p]),(0,r.useEffect)(()=>{if(G)try{let e=g.filter(e=>/^https?:/i.test(e.url));e.length?localStorage.setItem(p,JSON.stringify(e)):localStorage.removeItem(p)}catch{}},[g,G,p]);let O=g.length?g[g.length-1]:null,q=O&&!O.used,W=(0,r.useCallback)((e,t)=>{f(r=>r.map(r=>r.id===e?{...r,...t}:r))},[]),H=(0,r.useCallback)(e=>{f(t=>{let r=t.findIndex(t=>t.id===e);if(r<=0){try{localStorage.removeItem(p)}catch{}return o?.(),t}return t.slice(0,r).map((e,t,r)=>t===r.length-1?{...e,used:void 0}:e)})},[p,o]),F=(0,r.useCallback)((e,t)=>{t&&Number.isFinite(t)&&W(e,{duration:t})},[W]);async function V(e,t){if(t("trimming"),!function(){if("u"<typeof document||"u"<typeof MediaRecorder)return!1;let e=document.createElement("video");return"function"==typeof e.captureStream||"function"==typeof e.mozCaptureStream}()){if(!/^https:\/\//i.test(e.url))throw Error("This clip can’t be extended on this device yet. Try a desktop browser.");if((e.duration||await C(e.url))>15)throw Error("This clip is too long to extend on this device. Try a desktop browser.");return e.url}let r=await fetch(e.url);if(!r.ok)throw Error("Could not load the clip.");let i=URL.createObjectURL(await r.blob());try{let r=e.duration||await C(i),n=r>0?r:2,s=Math.max(0,n-2),o=await E(i,s,n);if(o.size>0x3700000)throw Error("The clip is too large to process.");t("uploading");let l=(o.type||"").split(";")[0].trim().toLowerCase()||"video/webm",d=l.includes("mp4")?"mp4":"webm";return(await (0,a.upload)(`video-extender/${crypto.randomUUID()}.${d}`,o,{access:"public",handleUploadUrl:"/api/video-extender/blob-upload",contentType:l})).url}finally{URL.revokeObjectURL(i)}}async function J(e,t,r){let a=Date.now(),i=a+48e4;for(;Date.now()<i;){await new Promise(e=>setTimeout(e,3e3));let i=await fetch(`/api/ai-video/task?taskId=${encodeURIComponent(e)}&record=video&source=video-extender&model=${encodeURIComponent("Seedance 2.0 Mini")}&actionId=${encodeURIComponent(t)}`,{cache:"no-store"}),n=await i.json().catch(()=>({}));if(!i.ok)throw Error(n.error||"Unable to check video status.");let s=String(n.state??n.status??"").toLowerCase();if(["fail","failed","failure","error"].includes(s))throw Error(n.error||"The generation failed.");if(["success","succeeded","completed","complete","done"].includes(s)){if(!n.url)throw Error("Finished without a video.");return n.url}let o=Number(n.progress);if(Number.isFinite(o)&&o>0){let e=o>1?o/100:o;P(t=>Math.max(t,Math.min(.99,e)))}r("queuing"!==s&&("generating"===s||o>0||Date.now()-a>15e3)?"rendering":"queued")}throw Error("Timed out waiting for the video.")}async function _(e){if("idle"!==x)return;if(D(null),!m)return void d();let t=e.prompt.trim();if(!t)return void D("Describe how the video should continue, or pick a scene.");let r=e.outputSeconds,a=e.hd,i=S.find(t=>
1t.id===e.sceneId)?.name??"Custom",n=crypto.randomUUID(),s="image"===e.media;try{let o,l=s?r:2+r;if(z((12+7*l)*1.6875),P(0),j("preparing"),s){if(!/^https?:/i.test(e.url))throw Error("The image is still uploading. Try again in a moment.");o=e.url}else U("trimming"),o=await V(e,U);j("generating"),U("queued");let u=await fetch("/api/video-extender/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s?{imageUrl:o}:{videoUrl:o,inputSeconds:2},outputSeconds:r,prompt:t,resolution:a?"720p":"480p",nsfwChecker:!1,actionId:n})}),m=await u.json().catch(()=>({}));if(401===u.status){d(),j("idle"),U(null);return}if(402===u.status){c(),"number"==typeof m.remaining&&(0,b.setCredits)(m.remaining),j("idle"),U(null);return}if(!u.ok||!m.taskId)throw Error(m.error||"Unable to start the generation.");"number"==typeof m.credits&&(0,b.setCredits)(m.credits);let p=await J(m.taskId,n,U);W(e.id,{used:{sceneName:i,prompt:t,outputSeconds:r,hd:a}}),f(e=>[...e,{id:crypto.randomUUID(),kind:"result",media:"video",url:p,duration:r,sceneId:I.id,prompt:I.prompt,outputSeconds:N[0],hd:!1}]),j("idle"),U(null)}catch(e){D(e instanceof Error?e.message:"Something went wrong."),j("idle"),U(null)}}let B=L?(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-3xl items-start gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:[(0,t.jsx)(i.AlertTriangle,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),(0,t.jsx)("span",{children:L})]}):null;return(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[B,g.map((e,r)=>(0,t.jsx)(T,{node:e,index:r,active:!0===q&&e.id===O.id,busy:"idle"!==x,stage:!0===q&&e.id===O.id?M:null,estimateSec:R,reportedProgress:A,onChange:t=>W(e.id,t),onGenerate:()=>_(e),onRefine:t=>F(e.id,t),onRemove:()=>H(e.id),busyChain:"idle"!==x,allowExtend:l},e.id))]})},"clearAllSceneChains",0,function(e="home"){let t=`${k}:${e}:`;try{let e=[];for(let r=0;r<localStorage.length;r++){let a=localStorage.key(r);a&&a.startsWith(t)&&e.push(a)}e.forEach(e=>localStorage.removeItem(e))}catch{}}],583965)},138330,e=>{"use strict";e.s(["CUSTOMIZE_IMAGE_FEATURES",0,["Write custom prompt","Turn off NSFW filter","High resolution output","Multiple reference images"],"CUSTOMIZE_VIDEO_FEATURES",0,["Write custom prompt","Turn off NSFW filter","1080P Video Generation","Longer Video Duration"],"VIDEO_UPGRADE_HIGHLIGHTS",0,["Write your own custom prompt","Turn off NSFW content filter","1080P high resolution video","Increase video length/duration","AI Video Extender (New)"]])},347723,e=>{"use strict";var t=e.i(176350),r=e.i(273576),a=e.i(555367),i=e.i(903955),n=e.i(996908),s=e.i(961161);function o({src:e}){let a=(0,r.useRef)(null),[i,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=a.current;if(!e)return;let t=new IntersectionObserver(([e])=>n(e.isIntersecting),{root:null,rootMargin:"200px",threshold:.01});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{let t=a.current;t&&(i?(t.src||(t.src=e),t.play().catch(()=>{})):t.pause())},[i,e]),(0,t.jsx)("video",{ref:a,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:e,className:"size-full object-cover transition-transform duration-500 group-hover:scale-105"})}e.s(["RelatedScenesCarousel",0,function({scenes:e}){let l=(0,r.useRef)(null),[d,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),p=(0,r.useCallback)(()=>{let e=l.current;if(!e)return;let{scrollLeft:t,scrollWidth:r,clientWidth:a}=e;c(t>4),m(t<r-a-4)},[]);(0,r.useEffect)(()=>(p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)),[p]);let h=(0,r.useCallback)(e=>{let t=l.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:"smooth"})},[]);return(0,t.jsxs)("section",{className:"border-y border-border bg-card/40 px-5 py-16 sm:px-8 sm:py-20",children:[(0,t.jsx)("div",{className:"mx-auto max-w-6xl",children:(0,t.jsxs)("div",{className:"flex items-end justify-between gap-4",children:[(0,t.jsxs)("div",{className:"max-w-2xl",children:[(0,t.jsx)("h2",{className:"text-balance font-display text-3xl font-bold tracking-tight text-foreground sm:text-4xl",children:"More AI Undress Scenes"}),(0,t.jsx)("p",{className:"mt-4 text-pretty text-lg leading-relaxed text-muted-foreground",children:"Explore more AI undress scenes to try next."})]}),(0,t.jsxs)("div",{className:"hidden shrink-0 gap-2 sm:flex",children:[(0,t.jsx)("button",{type:"button",onClick:()=>h(-1),disabled:!d,"aria-label":"Scroll left",className:"grid size-11 place-items-center rounded-full border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:(0,t.jsx)(n.ChevronLeft,{className:"size-5"})}),(0,t.jsx)("button",{type:"button",onClick:()=>h(1),disabled:!u,"aria-label":"Scroll right",className:"grid size-11 place-items-center rounded-full border border-border bg-background text-foreground shadow-sm transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:(0,t.jsx)(s.ChevronRight,{className:"size-5"})})]})]})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)("div",{ref:l,onScroll:p,className:"scrollbar-none flex snap-x gap-5 overflow-x-auto px-5 py-4 sm:px-8 lg:px-[max(2rem,calc((100vw-72rem)/2))]",children:e.map(e=>(0,t.jsxs)(a.default,{href:`/scene/${e.url}`,target:"_blank",rel:"noopener noreferrer",className:"group relative aspect-square w-64 shrink-0 snap-start overflow-hidden rounded-3xl border border-border bg-secondary shadow-sm transition-transform hover:-translate-y-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",children:[e.imageUrl&&(e.isVideo?(0,t.jsx)(o,{src:e.imageUrl}):(0,t.jsx)("img",{src:e.imageUrl||"/placeholder.svg",loading:"lazy",alt:"",className:"size-full object-cover transition-transform duration-500 group-hover:scale-105"}
1)),(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/25 to-transparent"}),(0,t.jsx)("div",{className:"absolute left-3 top-3",children:(0,t.jsx)("span",{className:"rounded-full bg-white/15 px-2 py-0.5 text-[11px] font-medium text-white backdrop-blur-sm",children:e.isVideo?"Video":"Image"})}),(0,t.jsx)("span",{className:"absolute right-3 top-3 grid size-8 place-items-center rounded-full bg-white/15 text-white backdrop-blur-sm transition-colors group-hover:bg-white group-hover:text-foreground",children:(0,t.jsx)(i.ArrowUpRight,{className:"size-4"})}),(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-0 p-5",children:[(0,t.jsx)("h3",{className:"line-clamp-1 font-display text-base font-bold tracking-tight text-white",children:e.title}),(0,t.jsx)("p",{className:"mt-1 line-clamp-1 text-sm leading-snug text-white/75",children:e.desc})]})]},e.url))})})]})}])},827995,e=>{"use strict";var t=e.i(176350);function r(e){try{let t=window.sessionStorage.getItem(e);return t&&window.sessionStorage.removeItem(e),t}catch{return null}}var a=e.i(273576),i=e.i(115211),n=e.i(461387),s=e.i(364668),o=e.i(809180),l=(e.i(903955),e.i(85257),e.i(320414),e.i(947560)),d=e.i(675692),c=e.i(672136),u=e.i(752490),m=e.i(445892),p=e.i(65387),h=e.i(98435),g=e.i(528072),f=e.i(583965),x=e.i(892394),b=e.i(647163),v=e.i(612612),w=e.i(272967),y=e.i(604702),j=e.i(138330);let N=(0,p.getVideoModel)("seedance-1-5-pro-no-audio"),k="logoai.undress-home.results.v1",S=(0,p.getVideoExpectedDurationMs)("seedance-1-5-pro-no-audio"),I=[{id:"lingerie",label:"Sexy Lingerie",hint:"Victoria's Secret style",prompt:"Change the outfit into elegant Victoria's Secret style lingerie as the subject turns, with natural, realistic motion while preserving the subject, face, lighting, and background."},{id:"evening-gown",label:"Evening Gown",hint:"Glamorous & floor-length",prompt:"Transform the outfit into a glamorous floor-length evening gown with elegant, flowing fabric as the subject turns, with natural, realistic motion while preserving the subject, face, lighting, and background."},{id:"swimwear",label:"Beach Swimwear",hint:"Sunny beach style",prompt:"Change the outfit into stylish beach swimwear as the subject turns, with natural, realistic motion while preserving the subject, face, lighting, and background."}],C=I[0].prompt,E="logoai:undress-ai-generator-pending",M=[{src:"https://mypkool5kw1ojfns.public.blob.vercel-storage.com/design-scenes/media/432c6ec6-aeb0-495f-9f82-0f987702784d.webp",label:"Before",type:"image"},{src:"https://mypkool5kw1ojfns.public.blob.vercel-storage.com/design-scenes/media/d9af96c1-7ad3-4a63-96b5-51d8c65ac303.mp4",label:"After",type:"video"}];function U({heading:e,description:i,onResultsChange:n}){let[w,z]=(0,a.useState)(null),[T,A]=(0,a.useState)(I[0].id),[P,L]=(0,a.useState)(C),[D,G]=(0,a.useState)(!1),[$,O]=(0,a.useState)(5),[q,W]=(0,a.useState)("480p"),[H,F]=(0,a.useState)(!1),[V,J]=(0,a.useState)("idle"),[_,B]=(0,a.useState)(!1),[K,Y]=(0,a.useState)([]),[Z,X]=(0,a.useState)(!1),[Q,ee]=(0,a.useState)(void 0),[et,er]=(0,a.useState)(null),[ea,ei]=(0,a.useState)(0),en=(0,v.useRouter)(),es=(0,a.useRef)(null);(0,a.useEffect)(()=>{n?.(K.length)},[K.length,n]),(0,a.useEffect)(()=>{Y((0,x.readGenerationResultUrls)(k)),X(!0)},[]),(0,a.useEffect)(()=>{Z&&(0,x.writeGenerationResultUrls)(K,k)},[K,Z]);let{openSignIn:eo}=(0,u.useAuthDialog)(),{openUpgrade:el}=(0,m.useUpgradeDialog)(),{data:ed}=c.authClient.useSession(),ec=!!ed?.user,{credits:eu}=(0,l.useCredits)(ec),em=(eu??0)<=0,ep=H&&!em,eh=function(e,t=!1){return(0,p.estimateVideoCredits)(N,e,1,t)??17}($,ep),eg="uploading"===V||"generating"===V;(0,d.useLeaveWarning)(eg),(0,a.useEffect)(()=>{if(M.length<2)return;let e=setInterval(()=>ei(e=>(e+1)%M.length),3200);return()=>clearInterval(e)},[]),(0,a.useEffect)(()=>()=>{es.current&&clearTimeout(es.current)},[]);let ef=(0,a.useCallback)(async e=>{if(er(null),e){if(!e.type.startsWith("image/"))return void er("Please upload an image file (PNG, JPG, or WEBP).");
1if(e.size>0xa00000)return void er("Image is too large. Max size is 10MB.");try{let t=await (0,y.prepareReferenceDataUrl)(e);z(t),B(!1),J("idle")}catch{er("Could not read that file. Please try another image.")}}},[]);(0,a.useEffect)(()=>{function e(e){if(eg)return;let t=e.clipboardData?.items;if(t){for(let r of t)if(r.type.startsWith("image/")){let t=r.getAsFile();t&&(ef(t),e.preventDefault());break}}}return window.addEventListener("paste",e),()=>window.removeEventListener("paste",e)},[eg,ef]);let ex=(0,a.useCallback)((e,t)=>{let r=0,a=async()=>{r+=1;try{let r=await fetch(`/api/ai-editor/task?taskId=${encodeURIComponent(e)}&record=video&source=undress-ai-generator${t?`&actionId=${encodeURIComponent(t)}`:""}`,{cache:"no-store"}),a=await r.json();if("number"==typeof a.progress&&a.progress>0&&ee(a.progress),("success"===a.state||"success"===a.status)&&a.url){Y(e=>[a.url,...e]),ee(void 0),J("done");return}if("fail"===a.state||"failed"===a.state||"fail"===a.status||"failed"===a.status){er(a.error||"Generation failed. Please try again."),ee(void 0),J("idle");return}}catch{}if(r>=120){er("This is taking longer than expected. Please try again."),ee(void 0),J("idle");return}es.current=setTimeout(a,3e3)};es.current=setTimeout(a,3e3)},[]),eb=(0,a.useCallback)(async(e,t,a,i,n,s)=>{er(null),ee(void 0),J("uploading");try{let o=await fetch("/api/ai-editor/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({base64Data:e,fileName:`undress-ai-generator-${Date.now()}.jpg`})}),d=await o.json().catch(()=>({}));if(!o.ok||!d.url)throw Error(d.error||"Unable to upload your photo.");J("generating");let c=await new Promise(t=>{let r=new Image;r.onload=()=>t(r.naturalWidth&&r.naturalHeight?r.naturalWidth/r.naturalHeight:null),r.onerror=()=>t(null),r.src=e}),u=await fetch("/api/ai-video/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:t.trim()||"Create a natural, realistic outfit transformation video with smooth turning motion while preserving the subject, lighting, and background.",modelIds:["seedance-1-5-pro-no-audio"],imageUrls:[d.url],...c?{imageAspect:c}:{},audio:i,duration:a,resolution:s,nsfwChecker:n,source:"undress-ai-generator"})}),m=await u.json().catch(()=>({})),p=m?.tasks?.[0],h=p?.taskId??m?.taskId,g=p?.error??m?.error;if(401===u.status){J("idle");try{sessionStorage.setItem(E,JSON.stringify({photo:e,prompt:t,duration:a,resolution:s,audio:i,nsfwChecker:n}))}catch{}eo({onSuccess:()=>{r(E)&&eb(e,t,a,i,n,s)}});return}if(402===u.status){el(),"number"==typeof m.remaining&&(0,l.setCredits)(m.remaining),J("idle");return}if(!u.ok||!h)throw Error(g||"Unable to start clothes remover.");"number"==typeof m.credits&&(0,l.setCredits)(m.credits),ex(h,"string"==typeof m.actionId?m.actionId:void 0)}catch(e){er(e instanceof Error?e.message:"Something went wrong."),J("idle")}},[eo,el,ex]);(0,a.useEffect)(()=>{if(!ec)return;let e=r(E);if(e)try{let t=JSON.parse(e);if(t.photo?.startsWith("data:image/")){let e=t.prompt||C,r="number"==typeof t.duration?t.duration:5,a="720p"===t.resolution?"720p":"480p",i=!0===t.audio;z(t.photo),L(e),A(I.find(t=>t.prompt===e)?.id??I[0].id),O(r),W(a),F(i),eb(t.photo,e,r,i,!1,a)}}catch{}},[ec,eb]);let ev=!!(w&&_)&&!eg;return(0,t.jsxs)("div",{className:"flex flex-col gap-12",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,t.jsx)("h1",{className:"text-4xl font-bold leading-[1.05] tracking-tight text-balance sm:text-5xl",children:e}),(0,t.jsx)("p",{className:"max-w-3xl text-lg leading-relaxed text-muted-foreground text-pretty",children:i})]}),(0,t.jsxs)("div",{className:"grid items-stretch overflow-hidden rounded-3xl border border-border min-[800px]:grid-cols-2",children:[(0,t.jsx)("figure",{className:"flex flex-col border-b border-border min-[800px]:border-b-0 min-[800px]:border-r",children:(0,t.jsxs)("div",{className:"relative w-full overflow-hidden bg-card",children:[M.map((e,r)=>"video"===e.type?(0,t.jsx)("video",{src:e.src,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,controls:r===ea,"aria-label":`Undress AI example — ${e.label}`,className:`w-full transition-opacity duration-700 ${r===ea?"relative opacity-100":"absolute inset-0 h-full opacity-0"}`},e.src):(0,t.jsx)("img",{src:e.src||"/placeholder.svg",alt:`Undress AI example — ${e.label}`,className:`w-full transition-opacity duration-700 ${r===ea?"relative opacity-100":"absolute inset-0 h-full opacity-0"}`},e.src)),(0,t.jsx)("span",{className:"absolute bottom-3 left-3 rounded-full bg-background/80 px-3 py-1 font-mono text-[11px] uppercase tracking-wider text-foreground backdrop-blur",children:M[ea].label}),M.length>1&&(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-3 flex items-center justify-center gap-2",children:M.map((e,r)=>(0,t.jsx)("button",{type:"button",onClick:()=>ei(r),"aria-label":`Show ${e.label} example`,className:`h-2 rounded-full transition-all ${r===ea?"w-5 bg-accent":"w-2 bg-foreground
1/25 hover:bg-foreground/40"}`},e.src))})]})}),(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-6 bg-card/40 p-8 sm:p-10",children:[(0,t.jsx)("div",{className:"w-full max-w-[200px]",children:(0,t.jsx)(R,{image:w,disabled:eg,onFile:ef,onClear:()=>{z(null),B(!1)},onReady:()=>B(!0)})}),(0,t.jsxs)("div",{className:"w-full max-w-sm",children:[(0,t.jsx)("p",{className:"mb-2.5 text-center font-mono text-xs uppercase tracking-wider text-muted-foreground",children:"Choose your outfit"}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",children:I.map(e=>{let r=e.id===T;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void(A((r=I.find(e=>e.id===t)??I[0]).id),L(r.prompt))},disabled:eg,"aria-pressed":r,className:(0,b.cn)("flex flex-col items-center gap-1 rounded-2xl border p-3 text-center transition-colors disabled:cursor-not-allowed disabled:opacity-50",r?"border-primary bg-primary/10":"border-border bg-card hover:border-foreground/40"),children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-foreground",children:e.label}),(0,t.jsx)("span",{className:"text-[11px] leading-tight text-muted-foreground",children:e.hint})]},e.id)})})]}),!1,(0,t.jsxs)("button",{type:"button",onClick:function(){if(w&&_&&!eg){if(!ec){try{sessionStorage.setItem(E,JSON.stringify({photo:w,prompt:P,duration:$,resolution:q,audio:ep,nsfwChecker:!1}))}catch{}eo({onSuccess:()=>{r(E)&&eb(w,P,$,ep,!1,q)}});return}$>5&&em?el({highlights:j.VIDEO_UPGRADE_HIGHLIGHTS}):eb(w,P,$,ep,!1,q)}},disabled:!ev,className:"inline-flex w-full max-w-sm items-center justify-center gap-2 rounded-full bg-primary px-6 py-3.5 text-sm font-semibold text-primary-foreground transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[eg?(0,t.jsx)(s.LoaderCircle,{className:"size-4 animate-spin","aria-hidden":"true"}):(0,t.jsx)(o.Sparkles,{className:"size-4","aria-hidden":"true"}),K.length>0?"Regenerate":"Generate",(0,t.jsxs)("span",{className:"rounded-full bg-primary-foreground/15 px-2 py-0.5 font-mono text-xs",children:[eh," CR"]})]}),et&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",role:"alert",children:et})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-8","aria-live":"polite",children:[K.length>0&&(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"My Generation"}),(0,t.jsx)(g.ClearResultsButton,{onConfirm:()=>{(0,f.clearAllSceneChains)(),Y([])},className:"inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline",children:"Clear All"})]}),eg&&(0,t.jsx)("div",{className:"grid grid-cols-2 items-start gap-4 sm:grid-cols-3",children:(0,t.jsx)(h.GenerationPendingTile,{status:"uploading"===V?"waiting":"running",expectedMs:S,progress:Q})}),K.length>0?K.map(e=>(0,t.jsx)(f.UndressSceneExtender,{initialVideoUrl:e,allowExtend:!0,onRemoveSource:()=>Y(t=>t.filter(t=>t!==e))},e)):eg?null:(0,t.jsxs)("div",{className:"flex min-h-[220px] flex-col items-center justify-center gap-2 rounded-2xl border border-border bg-card px-6 text-center text-muted-foreground",children:[(0,t.jsx)(o.Sparkles,{className:"size-6","aria-hidden":"true"}),(0,t.jsx)("p",{className:"text-sm",children:"Your result will appear here."})]})]})]})}function R({image:e,disabled:r,onFile:s,onClear:o,onReady:l}){let d=(0,a.useRef)(null),[c,u]=(0,a.useState)(!1);return e?(0,t.jsxs)("div",{className:"relative overflow-hidden rounded-2xl border border-border bg-card",children:[(0,t.jsx)("img",{src:e||"/placeholder.svg",alt:"Your uploaded photo",className:"aspect-square w-full object-cover",onLoad:l,onError:o}),(0,t.jsx)("span",{className:"absolute bottom-2 left-2 rounded-full bg-background/80 px-2.5 py-1 font-mono text-[10px] uppercase tracking-wider text-foreground backdrop-blur",children:"Your photo"}),!r&&(0,t.jsx)("button",{type:"button",onClick:o,className:"absolute right-2 top-2 inline-flex size-8 items-center justify-center rounded-full bg-background/80 text-foreground backdrop-blur transition-colors hover:bg-background","aria-label":"Remove photo",children:(0,t.jsx)(n.Trash2,{className:"size-4","aria-hidden":"true"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>d.current?.click(),onDragOver:e=>{e.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:function(e){e.preventDefault(),u(!1),r||s(e.dataTransfer.files?.[0])},disabled:r,className:`flex aspect-square w-full flex-col items-center justify-center gap-2 rounded-2xl border border-dashed p-4 text-center transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${c?"border-foreground bg-secondary":"border-border bg-card hover:border-foreground
1/40"}`,children:[(0,t.jsxs)("span",{className:"relative flex size-11 items-center justify-center rounded-full bg-accent/10 text-accent",children:[(0,t.jsx)("span",{className:"animate-upload-ping absolute inset-0 rounded-full bg-accent/30","aria-hidden":"true"}),(0,t.jsx)(i.Upload,{className:"animate-upload-bounce relative size-5","aria-hidden":"true"})]}),(0,t.jsx)("span",{className:"font-mono text-xs uppercase tracking-wider text-foreground",children:"Your photo"}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"Click, drag, or paste"})]}),(0,t.jsx)("input",{ref:d,type:"file",accept:"image/*",className:"sr-only",onChange:e=>s(e.target.files?.[0])})]})}var z=e.i(333268);function T({sets:e}){let[r,i]=(0,a.useState)(0),[n,s]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(n||e.length<2)return;let t=window.setInterval(()=>{i(t=>(t+1)%e.length)},5e3);return()=>window.clearInterval(t)},[n,e.length]),(0,t.jsxs)("div",{className:"mt-12",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,t.jsx)("div",{className:"relative",children:e.map((e,a)=>{let i=a===r;return(0,t.jsx)("div",{className:i?"flex flex-col gap-3 opacity-100 transition-opacity duration-700 ease-out":"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-700 ease-out","aria-hidden":!i,children:(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:e.frames.map(r=>(0,t.jsxs)("figure",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"relative overflow-hidden rounded-xl border border-border bg-card",children:"video"===r.type?(0,t.jsx)("video",{src:r.src,"aria-label":`${e.title} ${r.label} example`,className:"aspect-square w-full object-cover",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,preload:"metadata"}):(0,t.jsx)("img",{src:r.src||"/placeholder.svg",alt:`${e.title} ${r.label} example`,className:"aspect-square w-full object-cover",loading:"lazy"})}),(0,t.jsx)("figcaption",{className:`text-center font-mono text-xs uppercase tracking-wider ${r.accent?"text-accent":"text-muted-foreground"}`,children:r.label})]},r.src))})},e.href)})}),(0,t.jsx)("div",{className:"mt-6 flex items-center justify-center gap-2",children:e.map((e,a)=>(0,t.jsx)("button",{type:"button",onClick:()=>i(a),"aria-label":`Show ${e.title} example`,"aria-current":a===r,className:`h-2 rounded-full transition-all ${a===r?"w-6 bg-accent":"w-2 bg-border hover:bg-muted-foreground/50"}`},e.href))})]})}let A=[{icon:i.Upload,title:"Upload your photo",body:"Upload a clear image with the subject visible to start your outfit change."},{icon:o.Sparkles,title:"Choose your outfit",body:"Pick a look — glamorous evening gown, beach swimwear, or lingerie — to style your video."},{icon:z.Download,title:"Generate your video",body:"Generate your AI outfit change video and download it in seconds."}],P=[{title:"Sexy Lingerie",href:"/scene/sexy-lingerie-video-generator",frames:[{src:"https://nr4qkkp9raicfwjm.public.blob.vercel-storage.com/design-scenes/media/9070ceec-e604-4a8c-a5bd-ca3aacc9d9af.webp",label:"Before",type:"image"},{src:"https://nr4qkkp9raicfwjm.public.blob.vercel-storage.com/design-scenes/media/3aa7496a-df8a-4cd3-b441-7bee1fbf09cc.mp4",label:"After",type:"video",accent:!0}]},{title:"AI Bikini",href:"/scene/ai-bikini-generator",frames:[{src:"https://legacy.logoai.com/oss/ai-art/in-ai-bikini-generator.png?v=1782120983146",label:"Before",type:"image"},{src:"https://legacy.logoai.com/oss/ai-art/out-ai-bikini-generator.mp4?v=1782120983147",label:"After",type:"video",accent:!0}]}];function L(){return(0,t.jsx)("section",{"aria-labelledby":"undress-examples-heading",className:"px-5 py-20 sm:px-8",children:(0,t.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,t.jsx)("h2",{id:"undress-examples-heading",className:"mx-auto max-w-2xl text-center text-3xl font-bold tracking-tight text-balance sm:text-4xl",children:"Any Photo, AI Undress Transformation"}),(0,t.jsx)("p",{className:"mx-auto mt-4 max-w-xl text-center text-lg leading-relaxed text-muted-foreground text-pretty",children:"Upload any photo, customize your prompt, and generate realistic AI transformation videos in seconds."}),(0,t.jsx)(T,{sets:P})]})})}function D(){return(0,t.jsx)("section",{"aria-labelledby":"undress-how-title",className:"border-t border-border bg-card/40 px-5 py-20 sm:px-8",children:(0,t.jsxs)("div",{className:"mx-auto max-w-6xl",children:[(0,t.jsx)("h2",{id:"undress-how-title",className:"mx-auto max-w-2xl text-center text-3xl font-bold tracking-tight text-balance sm:text-4xl",children:"Create an outfit change video in 3 steps"}),(0,t.jsx)("ol",{className:"mt-14 grid gap-12 sm:grid-cols-3 sm:gap-8",children:A.map((e,r)=>(0,t.jsxs)("li",{className:"flex flex-col items-center text-center",children:[(0,t.jsx)("span",{className:"grid size-14 place-items-center rounded-2xl border border-border bg-background text-accent",children:(0,t.jsx)(e.icon,{className:"size-6","aria-hidden":"true"})}),(0,t.jsxs)("h3",{className:"mt-6 text-xl font-bold tracking-tight text-balance sm:text-2xl",children:[(0,t.jsxs)("span",{className:"text-accent",children:[r+1,"."]})," ",e.title]}),(0,t.jsx)("p",{className:"mt-2 max-w-[280px] text-base leading-relaxed text-muted-foreground text-pretty",children:e.body})]},e.title))})]})})}P.flatMap(e=>e.frames.map(({src:t,label:r})=>[`${e.title} ${r}`,t])),e.s(["UndressHome",0,function({heading:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("section",{className:"px-5 pb-20 pt-12 sm:px-8 sm:pt-16",children:(0,t.jsx)("div",{className:"mx-auto max-w-5xl",children:(0,t.jsx)(U,{heading:e,description:"Turn any photo into a realistic outfit-change video. Upload a photo, choose an outfit — evening gown, beach swimwear, or lingerie — and generate in seconds."})})}),(0,t.jsx)(L,{}),(0,t.jsx)(D,{})]})}],827995)}]);

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.