PageSourceSearch

https://vidmakerpro-production.up.railway.app/assets/ExploreVideos-EZUxnfki.js

js vidmakerpro-production.up.railway.app collected 2026-10-03 12:15:09 UTC 45,955 bytes, 16 lines download raw bytes

1import{a as ht,r as n,j as e}from"./vendor-BGWpkYAZ.js";import{c as He,u as xt,e as ft,A as he,z as k,b as gt,f as vt,g as yt,H as bt,X as xe,S as ze}from"./main-B8YPl3-Y.js";import{g as Be,i as qe,P as wt}from"./publicVideoCategories-VwiRAj52.js";import{g as jt}from"./urlViralRecreation-pDg8jJm4.js";import{c as kt,g as Ct,a as Nt,b as St}from"./sceneVisualPlan-Dm_ytHwT.js";import{P as We}from"./PlanBadge-BvUDKBQ_.js";import{B as Et}from"./VideoCreationWelcome-_WxyT_Ln.js";import{L as fe}from"./loader-2-F2_FnWdD.js";import{C as $e}from"./compass-B9EHaNvo.js";import{S as Tt}from"./search-Dv8wv422.js";import{P as ge}from"./pen-line-D9T90g89.js";import{M as ve}from"./message-circle-CTm5nl6H.js";import{C as ye}from"./crown-COM2Hu4j.js";import{U as le}from"./user-B0UtYWU-.js";import{L as Ge}from"./lock-BP262uQ7.js";import{W as Ye}from"./wand-2-DxtIudyL.js";import{I as Xe}from"./instagram-CMHLgs1j.js";import{E as Je}from"./external-link-CH7TovG5.js";import{P as Vt}from"./play-D1dSaVxV.js";import"./credit-pricing-CmZ-tFRy.js";import"./aiWriteScenePlanner-C_uxu5Yp.js";import"./videoEngineCapabilities-CWtfSBbF.js";import"./conversionAnalytics-Cn9RkSMf.js";import"./sparkles-Q1_rbhX6.js";import"./link-2-0FyVk1Cq.js";import"./clapperboard-BAMHZT9t.js";import"./arrow-right-ss2jTSrv.js";import"./clock-C-iBAnDW.js";/**
2 * @license lucide-react v0.344.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Ke=He("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
7 * @license lucide-react v0.344.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const It=He("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),_e=96,Lt=2e4,Pt=12e3,Rt=n.memo(function({video:l,isVisible:z,onSelect:Y,onUseConfig:X,onShare:J,onSocialShare:V,canUseConfig:f,getDisplayCategory:I,getDisplayStyle:C,shareMenuOpen:K,language:L,t:P}){const w=f(l),A=w.reason==="signin",M=!w.canUse&&w.reason!=="signin";return e.jsxs("div",{className:"relative group rounded-xl sm:rounded-2xl overflow-hidden shadow-lg bg-gray-800/50 hover:ring-2 hover:ring-violet-500/30 cursor-pointer will-change-auto",onClick:()=>Y(l),style:{contain:"layout style paint",contentVisibility:"auto",containIntrinsicSize:"0 500px"},children:[l.featured&&e.jsxs("div",{className:"absolute top-2 left-2 z-20 bg-gradient-to-r from-yellow-500 to-orange-500 text-white text-xs font-bold px-2 py-1 rounded-full flex items-center gap-1",children:[e.jsx(ye,{className:"w-3 h-3"}),L==="es"?"Destacado":"Featured"]}),M&&e.jsxs("div",{className:"absolute top-2 right-2 z-20 bg-gradient-to-r from-orange-500 to-red-500 text-white text-xs font-bold px-2 py-1 rounded-full flex items-center gap-1",children:[e.jsx(ye,{className:"w-3 h-3"}),w.requiredPlan||"PRO+"]}),e.jsxs("div",{className:"relative aspect-[9/16] overflow-hidden","data-video-id":l.id,children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/20 via-transparent to-black/60 z-10"}),e.jsx("div",{className:`absolute inset-0 bg-gray-800 z-5 transition-opacity duration-300 ${z?"opacity-0 pointer-events-none":"opacity-100"}`,children:e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx(fe,{className:"w-8 h-8 text-violet-500 animate-spin"})})}),e.jsx("video",{className:"w-full h-full object-cover bg-gray-800",preload:"none","data-src":l.url,muted:!0,playsInline:!0,loop:!0,controlsList:"nodownload nofullscreen noremoteplayback",disablePictureInPicture:!0,onContextMenu:u=>u.preventDefault()}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 z-20",children:e.jsx("div",{className:"w-12 h-12 sm:w-14 sm:h-14 bg-violet-600/90 rounded-full flex items-center justify-center transform transition-all duration-300 group-hover:scale-110",children:e.jsx(Vt,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white ml-0.5",fill:"currentColor"})})})]}),e.jsxs("div",{className:"p-3 sm:p-4 space-y-2 sm:space-y-3",children:[e.jsx("h3",{className:"font-semibold text-white text-sm line-clamp-2",children:l.title}),e.jsxs("div",{className:"space-y-1 text-xs text-gray-400",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(le,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:l.userName||P.unknownCreator}),l.userSubscriptionType&&e.jsx(We,{plan:l.userSubscriptionType,size:"xs",variant:"subtle"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsx("div",{className:"bg-violet-900/30 text-violet-300 px-2 py-1 rounded text-xs font-medium",children:I(l.category)}),l.style&&l.style!=="default"&&l.style!=="none"&&e.jsxs("div",{className:"px-2 py-1 rounded text-xs font-medium flex items-center gap-1 bg-green-900/30 text-green-300",children:[e.jsx(ge,{className:"w-3 h-3"}),C(l.style)]}),l.voice&&e.jsx("div",{className:`px-2 py-1 rounded text-xs font-medium ${l.voice.startsWith("es-")?"bg-orange-900/30 text-orange-300":"bg-sky-900/30 text-sky-300"}`,children:l.voice.startsWith("es-")?"ES":"EN"})]})]}),e.jsxs("div",{className:"flex gap-1 pt-2",children:[e.jsx("button",{onClick:u=>X(l,u),className:`flex-1 max-w-[70%] flex items-center justify-center gap-1 px-2 py-1.5 rounded-lg transition-all duration-200 text-xs font-medium ${A?"bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 text-white hover:scale-105 cursor-pointer":M?"bg-gray-600 text-gray-400 cursor-not-allowed opacity-60":"bg-violet-600 hover:bg-violet-500 text-white hover:scale-105 cursor-pointer"}`,title:A?L==="es"?"Inicia sesión para usar esta configuración":"Sign in to use this config":M?w.message||P.upgradeToAccess:P.useThisConfig,children:A?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-3 h-3"}),e.jsx("span",{className:"hidden sm:inline text-xs",children:L==="es"?"Iniciar sesión":"Sign in"})]}):M?e.jsxs(e.Fragment,{children:[e.jsx(Ge,{className:"w-3 h-3"}),e.jsx("span",{className:"hidden sm:inline text-xs",children:w.requiredPlan||"PRO+"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{className:"w-3 h-3"}),e.jsx("span",{className:"hidden sm:inline text-xs",children:P.copyConfig})]})}),e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:u=>J(l.id,u),className:"flex items-center justify-center p-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200 text-gray-300",title:P.shareVideo,children:e.jsx(ze,{className:"w-3.5 h-3.5"})}),K===l.id&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-[55] bg-transparent",onClick:()=>J("",new Event("click"))}),e.jsx("div",{className:"absolute bottom-full right-0 mb-2 w-48 bg-gray-800 border border-gray-600 rounded-lg shadow-xl z-[60] max-h-[50vh] overflow-y-auto",children:e.jsxs("div",{className:"p-2 space-y-1",children:[e.jsxs("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),V(l,"whatsapp",u)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(ve,{className:"w-4 h-4 text-green-500"}),"WhatsApp"]}),e.jsxs("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),V(l,"twitter",u)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(xe,{className:"w-4 h-4 text-white"}),"X"]}),e.jsxs("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),V(l,"tiktok",u)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"
11currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})}),"TikTok"]}),e.jsxs("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),V(l,"facebook",u)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(Ke,{className:"w-4 h-4 text-blue-600"}),"Facebook"]}),e.jsxs("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),V(l,"instagram",u)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(Xe,{className:"w-4 h-4 text-pink-500"}),"Instagram"]}),e.jsxs("button",{onClick:u=>{u.preventDefault(),u.stopPropagation(),V(l,"native",u)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(Je,{className:"w-4 h-4 text-gray-400"}),L==="es"?"Copiar enlace":"Copy link"]})]})})]})]})]})]})]})},(i,l)=>i.video.id===l.video.id&&i.isVisible===l.isVisible&&i.shareMenuOpen===l.shareMenuOpen&&i.language===l.language);function ls({language:i="en"}){const{user:l,authToken:z}=xt(),Y=ht(),{signIn:X}=ft(),J=n.useCallback(t=>Be(t,i),[i]),V=n.useCallback(t=>{if(!t)return"";const a={none:{es:"Sin estilo",en:"No style"},realistic:{es:"Realista",en:"Realistic"},"story-style":{es:"Historia",en:"Story"},"scary-style":{es:"Terror",en:"Scary"},"tung-tung-sahur":{es:"Tung Tung Sahur",en:"Tung Tung Sahur"},surreal:{es:"Surreal",en:"Surreal"},"weirdcore-3d":{es:"Weirdcore 3D",en:"Weirdcore 3D"},"vintage-80s":{es:"Vintage 80s",en:"Vintage 80s"},"dramatic-style":{es:"Dramático",en:"Dramatic"},"flat-comic-cartoon":{es:"Flat Comic",en:"Flat Comic"},"mystery-style":{es:"Misterio",en:"Mystery"},"pixar-style":{es:"Pixar",en:"Pixar"},"cat-story":{es:"Cat Story",en:"Cat Story"},"italian-brainrot":{es:"Italian Brainrot",en:"Italian Brainrot"},claymation:{es:"Claymation Story",en:"Claymation Story"},"modern-cartoon":{es:"Cartoon Moderno",en:"Modern Cartoon"},"chibi-style":{es:"Chibi",en:"Chibi Style"},"caricature-3d":{es:"Caricature 3D",en:"Caricature 3D"},"body-science":{es:"Ciencia del Cuerpo",en:"Body Science"},"skeleton-shorts":{es:"Skeleton Human",en:"Skeleton Human"},"holographic-psychology":{es:"Psicología Holográfica",en:"Holographic Psychology"},"street-cartoon":{es:"Street Cartoon",en:"Street Cartoon"},"gta-vi":{es:"GTA VI",en:"GTA VI"},"spongebob-story":{es:"SpongeBob Story",en:"SpongeBob Story"}}[t];return a?i==="es"?a.es:a.en:t.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")},[i]),[f,I]=n.useState([]),[C,K]=n.useState(!0),[L,P]=n.useState(!1),[w,A]=n.useState(!1),[M,u]=n.useState(null),[x,D]=n.useState(null),[R,Ze]=n.useState(""),[be,Qe]=n.useState(""),[$,et]=n.useState("recent"),[v,tt]=n.useState("all"),[N,st]=n.useState("all"),[S,rt]=n.useState("all"),[Z,at]=n.useState(!1),[we,ce]=n.useState(new Set),ot=n.useMemo(()=>{const t=new Set;return v!=="all"&&!qe(v)&&t.add(v),f.forEach(r=>{r.category&&!qe(r.category)&&t.add(r.category)}),[{value:"all",label:i==="es"?"Todas":"All"},...wt.map(r=>({value:r.value,label:r[i]})),...Array.from(t).sort((r,a)=>r.localeCompare(a)).map(r=>({value:r,label:Be(r,i)}))]},[i,v,f]),[Q,U]=n.useState(null),[ee,E]=n.useState(!1),[nt,je]=n.useState(new Set),[ke,te]=n.useState(1),[W,it]=n.useState(!0),F=n.useRef(null),Ce=n.useRef(null),se=n.useRef(new Map),Ne=n.useRef([]),Se=n.useRef(new Map),Ee=n.useRef(new Set),de=n.useRef(0),re=n.useRef(!1),ue=n.useRef(!1),Te=n.useRef(0),Ve=n.useRef(0),_=n.useRef(new Set),Ie=n.useRef(0),Le=n.useRef(0),Pe=12,Re=100,Ae=120,Me=1e4,lt=n.useCallback(()=>{const t=Date.now(),r=_.current.size;if(r<Ae||t-Le.current<Me)return;Le.current=t;const a=Array.from(document.querySelectorAll("[data-video-id]")),s=window.scrollY,o=s+window.innerHeight,c=s>Ie.current?"down":"up",d=a.map(h=>{const y=h.getAttribute("data-video-id");if(!y||!_.current.has(y))return null;const T=h.getBoundingClientRect(),q=T.top+s,Oe=q+T.height;let me=0,pe="above";return Oe<s?(me=s-Oe,pe="above"):q>o&&(me=q-o,pe="below"),{videoId:y,container:h,distance:me,position:pe}}).filter(h=>h!==null&&h.distance>0).sort((h,y)=>c==="down"&&h.position!==y.position?h.position==="above"?-1:1:c==="up"&&h.position!==y.position?h.position==="below"?-1:1:y.distance-h.distance),b=Math.min(12,r-Re),g=d.slice(0,b);
11g.length!==0&&g.forEach(({videoId:h,container:y})=>{const T=y.querySelector("video");T&&T.src&&(T.pause(),T.removeAttribute("src"),T.load(),se.current.delete(h),_.current.delete(h))})},[Re,Ae,Me]);n.useEffect(()=>{const t=()=>{Ie.current=window.scrollY};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),n.useEffect(()=>(F.current&&F.current.disconnect(),F.current=new IntersectionObserver(t=>{const r=[];t.forEach(a=>{const s=a.target.getAttribute("data-video-id");if(s)if(r.push({videoId:s,isVisible:a.isIntersecting}),a.isIntersecting){const o=a.target.querySelector("video");if(o&&!o.src){const c=o.getAttribute("data-src");c&&(o.src=c,o.load(),se.current.set(s,o),_.current.add(s),lt(),_.current.size)}}else{const o=se.current.get(s);o&&!o.paused&&o.pause()}}),r.length>0&&je(a=>{const s=new Set(a);let o=!1;return r.forEach(({videoId:c,isVisible:d})=>{d&&!s.has(c)?(s.add(c),o=!0):!d&&s.has(c)&&(s.delete(c),o=!0)}),o?s:a})},{rootMargin:"800px",threshold:0}),()=>{F.current&&F.current.disconnect()}),[]),n.useEffect(()=>{const t=setTimeout(()=>{Qe(R),te(1)},500);return()=>clearTimeout(t)},[R]),n.useEffect(()=>{te(1)},[$,v,N,S,Z]),n.useEffect(()=>{if(x&&!window.location.pathname.startsWith("/explore")){window.history.pushState({modal:!0},"");const t=()=>{D(null)};return window.addEventListener("popstate",t),()=>{window.removeEventListener("popstate",t)}}},[x]);const ae=n.useCallback((t,r="replace")=>{const a=new URL(window.location.href);a.pathname="/explore",t?a.searchParams.set("video",t):a.searchParams.delete("video");const s=`${a.pathname}${a.search}${a.hash}`,o={exploreVideoId:t};r==="push"?window.history.pushState(o,"",s):window.history.replaceState(o,"",s)},[]),ct=n.useCallback(t=>{U(null),E(!1),D(t),ae(t.id,"push")},[ae]),De=n.useCallback(()=>{E(!1),D(null),ae(null,"replace")},[ae]);n.useEffect(()=>{Ne.current=f},[f]),n.useEffect(()=>{const t=()=>{const r=new URLSearchParams(window.location.search).get("video");if(!r){E(!1),D(null);return}const a=Ne.current.find(s=>s.id===r);a&&(U(null),E(!1),D(a))};return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)},[]);const dt=(t,r)=>{r.preventDefault(),r.stopPropagation(),U(Q===t?null:t)},ut=t=>{t.preventDefault(),t.stopPropagation(),E(!ee)};n.useEffect(()=>{const t=()=>{(Q||ee)&&(U(null),E(!1))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[Q,ee]);const m=i==="es"?{title:"Explorar Videos",subtitle:"Descubre videos creados por la comunidad",searchPlaceholder:"Buscar por título, categoría o palabras clave...",sortBy:"Ordenar por:",recent:"Recientes",popular:"Populares",featured:"Destacados",all:"Todas",noVideos:"No hay videos disponibles",noVideosSub:"Sé el primero en hacer público un video",loading:"Cargando videos...",createdBy:"Creado por",unknownCreator:"Usuario",likes:"likes",category:"Categoría",useThisConfig:"Usar esta configuración",copyConfig:"Usar",likeVideo:"Me gusta",shareVideo:"Compartir",signInToLike:"Inicia sesión para dar me gusta",configCopied:"Configuración copiada! Redirigiendo al modo manual...",videoLiked:"Te gustó este video",videoUnliked:"Ya no te gusta este video",errorLiking:"Error al dar me gusta",errorLoading:"Error al cargar videos",videoShared:"Enlace del video copiado",errorSharing:"Error al compartir video",upgradeRequired:"Mejora requerida",dynamicModeNotAvailable:"Videos dinámicos requieren plan Pro o superior",upgradeToAccess:"Mejora tu plan para acceder a esta configuración",dynamic:"dinámico",animated:"animado",showCompatibleOnly:"Solo compatibles conmigo",compatibleFilter:"Filtro de compatibilidad",categoryFilter:"Categoría:"}:{title:"Explore Videos",subtitle:"Discover videos created by the community",searchPlaceholder:"Search by title, category or keywords...",sortBy:"Sort by:",recent:"Recent",popular:"Popular",featured:"Featured",all:"All",categoryFilter:"Category:",noVideos:"No videos available",noVideosSub:"Be the first to make a video public",loading:"Loading videos...",createdBy:"Created by",unknownCreator:"User",likes:"likes",category:"Category",useThisConfig:"Use this config",copyConfig:"Use",likeVideo:"Like",shareVideo:"Share",signInToLike:"Sign in to like videos",configCopied:"Configuration copied! Redirecting to manual mode...",videoLiked:"You liked this video",videoUnliked:"You unliked this video",errorLiking:"Error liking video",errorLoading:"Error loading videos",videoShared:"Video link copied",errorSharing:"Error sharing video",upgradeRequired:"Upgrade Required",upgradeToAccess:"Upgrade your plan to access this configuration",dynamic:"dynamic",animated:"animated",showCompatibleOnly:"Only compatible with me",compatibleFilter:"Compatibility filter"},Ue=n.useCallback(t=>"animated",[]),mt=n.useCallback(t=>{if(!t)return 0;const r=t.split(`
12`).map(o=>o.trim()),a=r.filter(o=>o.startsWith("[")&&o.endsWith("]"));if(a.length>0)return a.length;const s=t.split(/\n\s*\n/).filter(o=>o.trim().length>0);return s.length>1?s.length:r.filter(o=>o.length>0).length},[]),G=n.useCallback(t=>{const r=t.approvedAt||t.featuredAt||t.madePublicAt||t.createdAt,a=r?new Date(r).getTime():0;return Number.isFinite(a)?a:0},[]),O=n.useCallback(t=>l?{canUse:!0}:{canUse:!1,reason:"signin"},[l]),oe=n.useCallback(async(t=!1)=>
12{if(ue.current||!t&&!re.current)return;let r;const a=t?0:de.current;try{ue.current=!0,t?(K(!0),te(1),I([]),u(null),A(!1),de.current=0,re.current=!1):P(!0);const s=new URLSearchParams({search:be,sortBy:$,language:i,limit:_e.toString(),offset:a.toString(),includeConfig:"false"});v&&v!=="all"&&s.set("category",v),N&&N!=="all"&&s.set("style",N),S&&S!=="all"&&s.set("contentLanguage",S);const o=new AbortController;r=window.setTimeout(()=>o.abort(),Lt);const c=await fetch(`${he.BASE_URL}/api/public-videos?${s}`,{signal:o.signal});if(!c.ok)throw new Error("Failed to fetch videos");const d=await c.json();if(d.success&&Array.isArray(d.videos)){const p=d.videos;I(h=>{if(t)return p;const y=new Set(h.map(q=>q.id)),T=p.filter(q=>!y.has(q.id));return[...h,...T]});const b=Number.isFinite(Number(d.nextOffset))?Number(d.nextOffset):a+p.length,g=!!d.hasMore;de.current=b,re.current=g,A(g),u(Number.isFinite(Number(d.total))?Number(d.total):null)}else t&&(I([]),u(0)),re.current=!1,A(!1)}catch(s){const o=s instanceof DOMException&&s.name==="AbortError";k.error(o?i==="es"?"Explore tardó demasiado en cargar. Intenta de nuevo.":"Explore took too long to load. Please try again.":i==="es"?"Error al cargar videos":"Error loading videos"),t&&(I([]),u(0))}finally{r&&window.clearTimeout(r),ue.current=!1,K(!1),P(!1)}},[be,$,i,v,N,S]),ne=n.useCallback(async t=>{const r=Se.current.get(t);if(r)return r;const a=new AbortController,s=window.setTimeout(()=>a.abort(),Pt);try{const o=await fetch(`${he.BASE_URL}/api/public-video/${encodeURIComponent(t)}`,{signal:a.signal});if(!o.ok)throw new Error(`Failed to fetch video detail: ${o.status}`);const c=await o.json();if(!c.success||!c.video)throw new Error("Invalid video detail response");const d={...c.video,scenes:c.video.scenes||"",narratorText:c.video.narratorText||"",referenceImages:Array.isArray(c.video.referenceImages)?c.video.referenceImages:[],sceneReferences:c.video.sceneReferences||null,sceneReferenceLabels:c.video.sceneReferenceLabels||null,sceneFinalImages:c.video.sceneFinalImages||null,sceneActions:Array.isArray(c.video.sceneActions)?c.video.sceneActions:[],sceneVisualPlans:kt(c.video),configHydrated:!0};return Se.current.set(t,d),I(p=>p.map(b=>b.id===t?{...b,...d,configHydrated:!0}:b)),d}finally{window.clearTimeout(s)}},[]);n.useCallback(async(t,r)=>{if(r.stopPropagation(),!l||!z){k.error(m.signInToLike);return}try{const a=we.has(t),s=a?"DELETE":"POST",o=await fetch(`${he.BASE_URL}/api/videos/${t}/like`,{method:s,headers:{"Content-Type":"application/json",Authorization:`Bearer ${z}`}});if(!o.ok)throw new Error(`Failed to like video: ${o.status} ${o.statusText}`);const c=await o.json();I(d=>d.map(p=>p.id===t?{...p,likes:c.likes,likedByMe:c.likedByMe===!0}:p)),ce(d=>{const p=new Set(d);return a?p.delete(t):p.add(t),p}),k.success(a?m.videoUnliked:m.videoLiked)}catch{k.error(m.errorLiking)}},[l,z,we,m.signInToLike,m.videoLiked,m.videoUnliked,m.errorLiking]);const Fe=n.useCallback(async(t,r)=>{r.stopPropagation();const a=O(t);if(!a.canUse){if(a.reason==="signin"){X();return}k.error(a.message||m.upgradeToAccess);return}try{const s=await ne(t.id),o=O(s);if(!o.canUse){k.error(o.message||m.upgradeToAccess);return}const c=Ue(s.imageModel||""),d=s.nativeAudioEnabled===!0||s.audioInstructions&&Array.isArray(s.audioInstructions)&&s.audioInstructions.length>0||s.type==="native-audio"||!1,p={sceneDescription:s.scenes||"",narratorText:d?"":s.narratorText||"",selectedModel:s.imageModel||"gpt-image-2.5-flare",selectedVoice:s.voice||"default",selectedStyle:s.style||"realistic",scriptMode:c,fromExplore:!0,sourceVideoId:s.id,sourceVideoTitle:s.title,scriptLanguage:s.language||i,videoEngine:s.videoEngine||null,trendsId:s.trendsId||null,generationSource:s.generationSource||null,...jt(s),enableBackgroundMusic:s.generationSource==="url-a-viral"||!!s.backgroundMusic,characterType:s.characterType||null,customTopic:s.customTopic||null,customStoryTopic:s.customStoryTopic||null,storyType:s.storyType||null,targetDurationSeconds:s.targetDurationSeconds||null,transitionPrompts:s.transitionPrompts||[],foodStoryCast:s.foodStoryCast||null,customCast:s.customCast||null,customCastBlueprint:s.customCastBlueprint||null,characterBible:s.characterBible||null,musicOnlyMode:s.musicOnlyMode||!1,backgroundMusic:s.backgroundMusic||null,
12nativeAudioEnabled:d,audioInstructions:s.audioInstructions||[],referenceImages:s.referenceImages||[],sceneReferences:s.sceneReferences||null,sceneReferenceLabels:s.sceneReferenceLabels||null,sceneActions:s.sceneActions||[],sceneFinalImages:s.sceneFinalImages||null,sceneVisualPlans:St(s),sceneDurationsPlan:Nt(s),sceneVideoEngines:Ct(s)};if(!gt()){k.error(i==="es"?"Tu video actual todavía se está generando. Espera a que termine antes de abrir otro storyboard.":"Your current video is still rendering. Wait for it to finish before opening another storyboard.");return}localStorage.setItem("exploreVideoConfig",JSON.stringify(p)),Y("/dashboard/manual")}catch{k.error(i==="es"?"Error al copiar configuración":"Error copying configuration")}},[Y,Ue,O,ne,m.upgradeToAccess,X,i]),B=n.useCallback(async(t,r,a)=>{a.preventDefault(),a.stopPropagation();const s=vt(t.id,l?yt(l==null?void 0:l.email):null),o=i==="es"?`¡Mira este increíble video creado con IA! 🎬 "${t.title}" - Creado en VidMakerPro`:`Check out this amazing AI-generated video! 🎬 "${t.title}" - Created with VidMakerPro`,c={title:t.title,text:o,url:s};switch(r){case"whatsapp":const d=`https://api.whatsapp.com/send?text=${encodeURIComponent(o+" "+s)}`;window.open(d,"_blank");break;case"twitter":const p=`https://x.com/intent/tweet?text=${encodeURIComponent(o)}&url=${encodeURIComponent(s)}&hashtags=AIVideo,VideoCreator,Faceless,VidMakerPro`;window.open(p,"_blank");break;case"tiktok":await navigator.clipboard.writeText(`${o}
13
14🔗 ${s}`),k.success(i==="es"?"Texto copiado para TikTok":"Text copied for TikTok");break;case"facebook":const b=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(s)}&quote=${encodeURIComponent(o)}`;window.open(b,"_blank");break;case"instagram":await navigator.clipboard.writeText(`${o}
15
16🔗 ${s}`),k.success(i==="es"?"Texto copiado para Instagram":"Text copied for Instagram");break;case"native":if(navigator.share)try{await navigator.share(c)}catch{}else await navigator.clipboard.writeText(s),k.success(i==="es"?"Enlace copiado":"Link copied");break;default:await navigator.clipboard.writeText(s),k.success(i==="es"?"Enlace copiado":"Link copied")}U(null),E(!1),typeof window.gtag<"u"&&window.gtag("event","share",{content_type:"video",content_id:t.id,method:r})},[i,l]);n.useEffect(()=>{const t=Ce.current;if(!t||!W)return;let r=!1;const a=new IntersectionObserver(s=>{if(s[0].isIntersecting&&W&&!C&&!L&&!r){r=!0;const c=()=>{Te.current<Ve.current?te(d=>d+1):oe(!1),setTimeout(()=>{r=!1},300)};"requestIdleCallback"in window?requestIdleCallback(()=>c(),{timeout:500}):setTimeout(c,100)}},{rootMargin:"400px",threshold:0});return a.observe(t),()=>{a.disconnect()}},[W,C,L,oe]),n.useEffect(()=>{oe(!0)},[oe]),n.useEffect(()=>{const t=new URLSearchParams(window.location.search).get("video");if(!t||(x==null?void 0:x.id)===t)return;const r=f.find(a=>a.id===t);if(r){U(null),E(!1),D(r);return}!C&&!Ee.current.has(t)&&(Ee.current.add(t),ne(t).then(a=>{U(null),E(!1),D(a)}).catch(a=>{}))},[f,x==null?void 0:x.id,C,ne]),n.useEffect(()=>{if(!l){ce(new Set);return}if(f.length>0){const t=new Set(f.filter(r=>r.likedByMe===!0).map(r=>r.id));ce(t)}},[l==null?void 0:l.uid,l==null?void 0:l.email,f]);const H=n.useMemo(()=>f.filter(t=>{var r,a,s;if(v&&v!=="all"&&t.category!==v)return!1;if(R){const o=R.toLowerCase();if(!(((r=t.title)==null?void 0:r.toLowerCase().includes(o))||((a=t.description)==null?void 0:a.toLowerCase().includes(o))||((s=t.category)==null?void 0:s.toLowerCase().includes(o))))return!1}if(N&&N!=="all"&&t.style!==N)return!1;if(S&&S!=="all"){let o=t.language||null;if(!o&&t.voice&&(o=t.voice.startsWith("es-")?"es":t.voice.startsWith("en-")?"en":null),!o&&t.title){const c=t.title.toLowerCase();o=/\b(el|la|los|las|del|una|unos|como|por|qué|más|para|está|pero|muy|ese|esa|con|sin|entre|desde|hasta|sobre|tras|cómo|donde|cuando|porque|mientras|aunque|también|puede|tiene|hace|cada|este|esta|estos|estas|aquí|allí|después|antes|siempre|nunca|nada|todo|todos|todas|otro|otra|otros|otras|nuevo|nueva|vida|mundo|casa|historia|secreto|descubre|increíble|impactante|nadie|alguien)\b/.test(c)?"es":"en"}if(o!==S)return!1}return!(Z&&l&&!O(t).canUse)}).sort((t,r)=>{switch($){case"all":return 0;case"popular":return r.likes-t.likes;
16case"recent":return G(r)-G(t);case"featured":default:return t.featured&&!r.featured?-1:!t.featured&&r.featured?1:G(r)-G(t)||r.likes-t.likes}}),[f,v,N,S,R,Z,$,l,O,G]),j=n.useMemo(()=>{const t=ke*Pe;return H.slice(0,t)},[H,ke,Pe]);if(n.useEffect(()=>{Te.current=j.length,Ve.current=H.length},[j.length,H.length]),n.useEffect(()=>{const t=j.length<H.length||w;it(t)},[j.length,H.length,w]),n.useEffect(()=>{if(j.length===0||!F.current)return;const t=setTimeout(()=>{const r=document.querySelectorAll("[data-video-id]"),a=F.current;a&&r.forEach(s=>{try{a.observe(s)}catch{}})},100);return()=>clearTimeout(t)},[j.length]),n.useEffect(()=>{if(j.length===0)return;const t=()=>{const o=document.querySelectorAll("[data-video-id]"),c=[];o.forEach(d=>{const p=d.getBoundingClientRect();if(p.top<window.innerHeight+800&&p.bottom>-800&&p.left<window.innerWidth&&p.right>0){const g=d.getAttribute("data-video-id"),h=d.querySelector("video");if(g&&c.push(g),h&&!h.src){const y=h.getAttribute("data-src");y&&(h.src=y,h.load(),g&&(se.current.set(g,h),_.current.add(g)))}}}),c.length>0&&je(d=>{const p=new Set(d);let b=!1;return c.forEach(g=>{p.has(g)||(p.add(g),b=!0)}),b?p:d})};t();const r=setTimeout(t,100),a=setTimeout(t,300),s=setTimeout(t,600);return()=>{clearTimeout(r),clearTimeout(a),clearTimeout(s)}},[j.length]),C)return e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsxs("div",{className:"text-center",children:[e.jsx(fe,{className:"w-8 h-8 animate-spin text-violet-500 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-400",children:m.loading})]})});const ie=M??f.length,pt=M===null&&(w||f.length>=_e)?"+":"";return e.jsxs(e.Fragment,{children:[e.jsxs(bt,{children:[e.jsx("title",{children:i==="es"?"Galería de Videos IA Faceless | Ejemplos Reales VidMakerPro 2026":"AI Faceless Video Gallery | Real Examples VidMakerPro 2026"}),e.jsx("meta",{name:"robots",content:"index, follow"}),e.jsx("meta",{name:"description",content:i==="es"?"Explora videos faceless creados con IA por usuarios reales. Descubre estilos visuales, voces y configuraciones exitosas. Inspírate y crea tu propio contenido viral.":"Explore faceless videos created with AI by real users. Discover visual styles, voices and successful configurations. Get inspired and create your own viral content."}),e.jsx("link",{rel:"canonical",href:"https://www.vidmakerpro.com/explore"}),e.jsx("meta",{property:"og:title",content:i==="es"?"Galería de Videos IA Faceless | VidMakerPro":"AI Faceless Video Gallery | VidMakerPro"}),e.jsx("meta",{property:"og:description",content:i==="es"?"Descubre videos faceless creados por usuarios reales con VidMakerPro":"Discover faceless videos created by real users with VidMakerPro"}),e.jsx("meta",{property:"og:url",content:"https://www.vidmakerpro.com/explore"})]}),e.jsx("div",{className:"w-full px-2 sm:px-4 pt-1 pb-8 md:-mt-6",children:e.jsxs("div",{className:"max-w-8xl mx-auto",children:[e.jsxs("div",{className:"mb-6 sm:mb-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(Et,{language:i,inline:!0}),e.jsx("div",{className:"p-2 sm:p-2.5 bg-violet-600/20 rounded-xl",children:e.jsx($e,{className:"w-5 h-5 sm:w-7 sm:h-7 text-violet-400"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-white",children:m.title}),e.jsxs("p",{className:"text-gray-400 text-sm sm:text-base",children:[m.subtitle,ie>0&&e.jsxs("span",{className:"text-violet-400 font-medium ml-2",children:[ie.toLocaleString(),pt," ","videos"]})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-gray-900/80 via-gray-800/80 to-gray-900/80 rounded-xl border border-gray-700/50 backdrop-blur-lg shadow-2xl",children:[e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 lg:items-center lg:justify-between",children:[e.jsxs("div",{className:"relative flex-1 lg:max-w-xl",children:[e.jsxs("div",{className:"relative group",children:[e.jsx(Tt,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400 group-focus-within:text-violet-400 transition-colors duration-200"}),e.jsx("input",{type:"text",placeholder:m.searchPlaceholder,value:R,onChange:t=>{const r=t.target.value;r.length<=100&&Ze(r)},maxLength:100,className:"w-full pl-10 pr-4 py-2.5 bg-gray-800/60 border border-gray-600/50 rounded-lg text-white placeholder-gray-400 focus:border-violet-500/70 focus:bg-gray-800/80 focus:outline-none focus:ring-2 focus:ring-violet-500/20 transition-all duration-200 text-sm font-medium shadow-inner"}),e.jsx("div",{className:"absolute inset-0 rounded-lg bg-gradient-to-r from-violet-500/5 to-purple-500/5 opacity-0 group-focus-within:opacity-100 transition-opacity duration-200 pointer-events-none"})]}),R.length>80&&e.jsxs("p",{className:"mt-1 text-xs text-gray-400",children:[100-R.length," ",i==="es"?"caracteres restantes":"characters remaining"]})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:flex sm:flex-wrap sm:items-center gap-2 sm:gap-3 lg:gap-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ge,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-gray-300 whitespace-nowrap",children:m.categoryFilter})]}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:v,onCh
16ange:t=>tt(t.target.value),className:"appearance-none w-full sm:w-auto px-3 sm:px-4 py-2 sm:py-2.5 bg-gray-700/80 border border-gray-600/50 rounded-lg text-white focus:border-violet-500/70 focus:outline-none focus:ring-2 focus:ring-violet-500/20 text-xs sm:text-sm font-medium sm:min-w-[140px] cursor-pointer hover:bg-gray-700 transition-all duration-200 pr-8",children:ot.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),e.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none",children:e.jsx("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ge,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-gray-300 whitespace-nowrap",children:i==="es"?"Estilo":"Style"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:N,onChange:t=>st(t.target.value),className:"appearance-none w-full sm:w-auto px-3 sm:px-4 py-2 sm:py-2.5 bg-gray-700/80 border border-gray-600/50 rounded-lg text-white focus:border-violet-500/70 focus:outline-none focus:ring-2 focus:ring-violet-500/20 text-xs sm:text-sm font-medium sm:min-w-[140px] cursor-pointer hover:bg-gray-700 transition-all duration-200 pr-8",children:[e.jsx("option",{value:"all",children:i==="es"?"Todos":"All"}),e.jsx("option",{value:"realistic",children:i==="es"?"Realista":"Realistic"}),e.jsx("option",{value:"gta-vi",children:"GTA VI"}),e.jsx("option",{value:"pixar-style",children:"Pixar"}),e.jsx("option",{value:"skeleton-shorts",children:"Skeleton"}),e.jsx("option",{value:"food-story",children:"Food Story"}),e.jsx("option",{value:"street-cartoon",children:"Street Cartoon"}),e.jsx("option",{value:"dramatic-style",children:i==="es"?"Dramático":"Dramatic"}),e.jsx("option",{value:"scary-style",children:i==="es"?"Terror":"Scary"}),e.jsx("option",{value:"spongebob-story",children:"SpongeBob"}),e.jsx("option",{value:"chibi-style",children:"Chibi"}),e.jsx("option",{value:"claymation",children:"Claymation Story"}),e.jsx("option",{value:"cat-story",children:"Cat Story"}),e.jsx("option",{value:"italian-brainrot",children:"Italian Brainrot"}),e.jsx("option",{value:"weirdcore-3d",children:"Weirdcore 3D"}),e.jsx("option",{value:"body-science",children:"Body Science"}),e.jsx("option",{value:"vintage-80s",children:"Vintage 80s"}),e.jsx("option",{value:"surreal",children:"Surreal"}),e.jsx("option",{value:"mystery-style",children:i==="es"?"Misterio":"Mystery"})]}),e.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none",children:e.jsx("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ve,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-gray-300 whitespace-nowrap",children:i==="es"?"Idioma":"Language"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:S,onChange:t=>rt(t.target.value),className:"appearance-none w-full sm:w-auto px-3 sm:px-4 py-2 sm:py-2.5 bg-gray-700/80 border border-gray-600/50 rounded-lg text-white focus:border-violet-500/70 focus:outline-none focus:ring-2 focus:ring-violet-500/20 text-xs sm:text-sm font-medium sm:min-w-[120px] cursor-pointer hover:bg-gray-700 transition-all duration-200 pr-8",children:[e.jsx("option",{value:"all",children:i==="es"?"Todos":"All"}),e.jsx("option",{value:"en",children:i==="es"?"Inglés":"English"}),e.jsx("option",{value:"es",children:i==="es"?"Español":"Spanish"})]}),e.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none",children:e.jsx("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(It,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-gray-300 whitespace-nowrap",children:m.sortBy})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:$,onChange:t=>et(t.target.value),className:"appearance-none w-full sm:w-auto px-3 sm:px-4 py-2 sm:py-2.5 bg-gray-700/80 border border-gray-600/50 rounded-lg text-white focus:border-violet-500/70 focus:outline-none focus:ring-2 focus:ring-violet-500/20 text-xs sm:text-sm font-medium sm:min-w-[120px] cursor-pointer hover:bg-gray-700 transition-all duration-200 pr-8",children:[e.jsx("option",{value:"all",children:m.all}),e.jsx("option",{value:"featured",children:m.featured}),e.jsx("option",{value:"popular",children:m.popular}),e.jsx("option",{value:"recent",children:m.recent})]}),e.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none",children:e.jsx("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),l&&e.jsx("div",{className:"relative col-span-2 sm:col-span-1",children:e.jsxs("div",{className:"flex items-center justify-center sm:justify-start gap-2 bg-gradient-to-r from-violet-900/30 to-purple-900/30 px-3 sm:px-4 py-2 sm:py-2.5 rounded-lg border border-violet-500/30 backdrop-blur-sm hover:from-violet-900/40 hover:to-purple-900/40 transition-all duration-200",children:[e.jsx("input",{type:"checkbox",id:"compatibleOnly",checked:Z,onChange:t=>at(t.target.checked),className:"w-4 h-4 rounded border-2 border-violet-400/50 bg-gray-800/80 text-violet-600 focus:ring-violet-500/30 focus:ring-2 focus:ring-offset-0 transition-all duration-200 cursor-pointer"}),e.jsxs("label",{htmlFor:"compatibleOnly",className:"text-sm font-medium text-violet-100 cursor-pointer whitespace-nowrap flex items-center gap-2 select-none",title:m.compatibleFilter,children:[e.jsx(ye,{className:"w-4 h-4 text-violet-400"}),e.jsx("span",{className:"hidden sm:inline",children:m.showCompatibleOnly}),e.jsx("span",{className:"sm:hidden",children:"Compatible"})]})]})})]})]})}),e.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-violet-500/30 to-transparent"})]})]}),j.length===0&&!C&&!w&&!L?e.jsxs("div",{className:"text-center py-12",children:[e.jsx($e,{className:"w-16 h-16 text-gray-600 mx-auto mb-4"}),e.jsx("h2",{className:"text-xl font-semibold text-gray-300 mb-2",children:m.noVideos}),e.jsx("p",{className:"text-gray-400",children:m.noVideosSub})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 ga
16p-3 sm:gap-4 md:gap-6",style:{contain:"layout style"},children:j.map(t=>e.jsx(Rt,{video:t,isVisible:nt.has(t.id),onSelect:ct,onUseConfig:Fe,onShare:dt,onSocialShare:B,canUseConfig:O,getSceneCount:mt,getDisplayCategory:J,getDisplayStyle:V,shareMenuOpen:Q,language:i,t:m},t.id))}),!C&&W&&(j.length>0||w)&&e.jsx("div",{ref:Ce,className:"flex items-center justify-center py-8 mt-4",children:e.jsxs("div",{className:"flex items-center gap-3 text-gray-400",children:[e.jsx(fe,{className:"w-5 h-5 animate-spin text-violet-500"}),e.jsx("span",{className:"text-sm",children:i==="es"?"Cargando más videos...":"Loading more videos..."})]})}),!C&&!W&&j.length>0&&e.jsx("div",{className:"text-center py-8 mt-4",children:e.jsx("p",{className:"text-gray-400 text-sm",children:i==="es"?`¡Has visto todos los ${ie} videos disponibles!`:`You've seen all ${ie} available videos!`})}),x&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-2 sm:p-4 bg-black/95 backdrop-blur-lg overflow-hidden",onClick:De,children:e.jsxs("div",{className:"relative w-full max-h-[98vh] sm:h-auto sm:max-w-md md:max-w-lg lg:max-w-xl xl:max-w-2xl bg-gray-900/90 sm:rounded-2xl overflow-hidden shadow-2xl border border-violet-500/20 backdrop-blur-xl flex flex-col",onClick:t=>t.stopPropagation(),children:[e.jsx("button",{onClick:De,className:"absolute top-2 right-2 sm:top-3 sm:right-3 z-20 p-2 rounded-full bg-black/70 text-white/90 hover:text-white hover:bg-black/80 transition-all duration-200",children:e.jsx(xe,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),e.jsx("div",{className:"relative flex-1 min-h-0 flex items-center justify-center bg-black overflow-hidden",children:e.jsx("video",{className:"w-full h-full sm:h-auto max-h-[65vh] sm:max-h-[70vh] object-contain",src:x.url,controls:!0,autoPlay:!0,preload:"metadata",controlsList:"nodownload nofullscreen noremoteplayback",disablePictureInPicture:!0,onContextMenu:t=>t.preventDefault(),style:{minHeight:"200px",maxHeight:"calc(100vh - 200px)"}})}),e.jsxs("div",{className:"p-3 sm:p-4 pb-4 sm:pb-4 space-y-2 sm:space-y-3 flex-shrink-0 bg-gray-900/95 backdrop-blur-sm border-t border-gray-700/30",style:{paddingBottom:"max(16px, env(safe-area-inset-bottom))"},children:[e.jsx("h2",{className:"text-base sm:text-lg font-semibold text-white line-clamp-2",children:x.title}),x.description&&e.jsx("p",{className:"text-gray-300 text-xs sm:text-sm line-clamp-2",children:x.description}),e.jsx("div",{className:"flex items-center justify-between text-xs sm:text-sm text-gray-400",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(le,{className:"w-3 h-3 sm:w-4 sm:h-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:x.userName||m.unknownCreator}),x.userSubscriptionType&&e.jsx(We,{plan:x.userSubscriptionType,size:"sm",variant:"solid"})]})}),e.jsxs("div",{className:"flex gap-2 pt-2 sm:pt-2",children:[(()=>{const t=O(x),r=t.reason==="signin",a=!t.canUse&&t.reason!=="signin";return e.jsx("button",{onClick:s=>Fe(x,s),className:`flex-1 max-w-[70%] flex items-center justify-center gap-1 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-2 rounded-lg transition-all duration-200 text-xs sm:text-sm font-medium min-h-[44px] sm:min-h-[40px] ${r?"bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 text-white cursor-pointer":a?"bg-gray-600 text-gray-400 cursor-not-allowed opacity-60":"bg-violet-600 hover:bg-violet-500 text-white cursor-pointer"}`,title:r?i==="es"?"Inicia sesión para usar esta configuración":"Sign in to use this config":a?t.message||m.upgradeToAccess:m.useThisConfig,children:r?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 sm:w-4 sm:h-4"}),e.jsx("span",{children:i==="es"?"Iniciar sesión":"Sign in"})]}):a?e.jsxs(e.Fragment,{children:[e.jsx(Ge,{className:"w-4 h-4 sm:w-4 sm:h-4"}),e.jsx("span",{children:i==="es"?`Requiere ${t.requiredPlan||"PRO+"}`:`Requires ${t.requiredPlan||"PRO+"}`})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{className:"w-4 h-4 sm:w-4 sm:h-4"}),e.jsx("span",{children:m.useThisConfig})]})})})(),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:t=>ut(t),className:"flex items-center justify-center gap-1 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-all duration-200 text-xs sm:text-sm font-medium min-h-[44px] sm:min-h-[40px] text-gray-300",title:m.shareVideo,children:[e.jsx(ze,{className:"w-4 h-4 sm:w-4 sm:h-4"}),e.jsx("span",{className:"hidden sm:inline",children:i==="es"?"Compartir":"Share"})]}),ee&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-[55] bg-transparent",onClick:()=>E(!1)}),e.jsx("div",{className:"absolute bottom-full right-0 mb-2 w-48 bg-gray-800 border border-gray-600 rounded-lg shadow-xl z-[60] max-h-[50vh] overflow-y-auto",children:e.jsxs("div",{className:"p-2 space-y-1",children:[e.jsxs("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),B(x,"whatsapp",t)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(ve,{className:"w-4 h-4 text-green-500"}),"WhatsApp"]}),e.jsxs("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),B(x,"twitter",t)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(xe,{className:"w-4 h-4 text-white"}),"X"]}),e.jsxs("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),B(x,"tiktok",t)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"
16currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})}),"TikTok"]}),e.jsxs("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),B(x,"facebook",t)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(Ke,{className:"w-4 h-4 text-blue-600"}),"Facebook"]}),e.jsxs("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),B(x,"instagram",t)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(Xe,{className:"w-4 h-4 text-pink-500"}),"Instagram"]}),e.jsxs("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),B(x,"native",t)},className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-300 hover:bg-gray-700 rounded-lg transition-colors",children:[e.jsx(Je,{className:"w-4 h-4 text-gray-400"}),i==="es"?"Copiar enlace":"Copy link"]})]})})]})]})]})]})]})})]})})]})}export{ls as ExploreVideos};

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.