PageSourceSearch

https://invitation-web.com/assets/DemoPlayerModal-CUOEIJWU.js

js invitation-web.com collected 2026-10-07 06:29:50 UTC 13,548 bytes, 1 lines download raw bytes

1import{j as e,r as t,a}from"./react-vendor-CiWvozff.js";import{R as s,ah as i,u as n,i as r}from"./index-BNLV_yk1.js";import{A as o,m as l}from"./animation-vendor-CQShIHH6.js";import{S as d,ar as c,_ as h,X as u,aY as m,c as b}from"./icons-vendor-BN5R48s7.js";import"./data-i18n-V-oYJZvx.js";import"./ui-vendor-DuRgyo6V.js";const p=i("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:t,variant:a,...i}){return e.jsx("div",{className:s(p({variant:a}),t),...i})}function x({demo:a,onComplete:s}){const{currentLanguage:i}=n(),[o,l]=t.useState(!1),[d,c]=t.useState(!1),h=t.useRef(!1),u=()=>{h.current||(h.current=!0,l(!0),setTimeout(()=>{c(!0),s?.()},1100))};if(t.useEffect(()=>{const e=setTimeout(u,700);return()=>clearTimeout(e)},[]),d)return null;const m=a.data?.hero?.backgroundImage||a.preview_image,b=r(a.name,i);return e.jsxs("div",{onClick:u,className:"absolute inset-0 z-40 flex items-center justify-center cursor-pointer select-none overflow-hidden",style:{background:"rgba(10,5,2,0.82)",backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",animation:o?"demoEnvOut 0.45s 0.65s ease-out forwards":"none"},children:[e.jsx("style",{children:"\n        @keyframes demoEnvFloat { 0%,100%{transform:translateY(0) rotate(-0.5deg)} 50%{transform:translateY(-12px) rotate(0.5deg)} }\n        @keyframes demoEnvOpen  { 0%{transform:rotateX(0)} 100%{transform:rotateX(-170deg)} }\n        @keyframes demoEnvLetterUp { 0%{transform:translateY(0);opacity:0} 20%{opacity:1} 100%{transform:translateY(-55px);opacity:1} }\n        @keyframes demoEnvOut   { 0%{opacity:1} 100%{opacity:0;pointer-events:none} }\n        @keyframes demoEnvShimmer { 0%,100%{opacity:0.4} 50%{opacity:0.9} }\n        .denv-float { animation: demoEnvFloat 3s ease-in-out infinite; }\n        .denv-open .denv-flap { animation: demoEnvOpen 0.65s 0.05s cubic-bezier(.4,0,.2,1) forwards; }\n        .denv-open .denv-letter { animation: demoEnvLetterUp 0.6s 0.3s ease-out forwards; }\n      "}),e.jsx("div",{className:o?"denv-open":"denv-float",style:{perspective:600},children:e.jsxs("div",{style:{position:"relative",width:200,height:140},children:[e.jsxs("svg",{width:"200",height:"140",viewBox:"0 0 200 140",style:{position:"absolute",inset:0},children:[e.jsx("rect",{x:"2",y:"30",width:"196",height:"108",rx:"6",fill:"#2a1f10",stroke:"#c9a96e",strokeWidth:"1.5"}),e.jsx("polygon",{points:"2,30 100,95 198,30",fill:"#1e1508",stroke:"#c9a96e",strokeWidth:"1"}),e.jsx("polygon",{points:"2,138 60,85 2,30",fill:"#241a0b",stroke:"#c9a96e",strokeWidth:"0.8"}),e.jsx("polygon",{points:"198,138 140,85 198,30",fill:"#241a0b",stroke:"#c9a96e",strokeWidth:"0.8"}),e.jsx("polygon",{points:"2,138 100,75 198,138",fill:"#2e2210",stroke:"#c9a96e",strokeWidth:"1"})]}),e.jsx("div",{className:"denv-flap",style:{position:"absolute",top:0,left:2,width:196,height:68,transformOrigin:"top center",transformStyle:"preserve-3d"},children:e.jsx("svg",{width:"196",height:"68",viewBox:"0 0 196 68",style:{display:"block"},children:e.jsx("polygon",{points:"0,0 196,0 98,65",fill:"#372810",stroke:"#c9a96e",strokeWidth:"1.5"})})}),e.jsxs("div",{className:"denv-letter",style:{position:"absolute",left:"50%",top:18,transform:"translateX(-50%) translateY(0)",width:100,height:70,borderRadius:4,overflow:"hidden",boxShadow:"0 4px 20px rgba(0,0,0,0.6)",opacity:0},children:[m?e.jsx("img",{src:m,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg,#3a2a10,#1a0f05)"}}),e.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%)",display:"flex",alignItems:"flex-end",padding:"6px 5px"},children:e.jsx("span",{style:{color:"#fff",fontSize:8,fontFamily:"Georgia,serif",lineHeight:1.2,textShadow:"0 1px 4px rgba(0,0,0,0.8)"},children:"object"==typeof b?b.es||b.en||"":b})})]}),e.jsx("div",{style:{position:"absolute",bottom:12,left:"50%",transform:"translateX(-50%)",width:28,height:28,borderRadius:"50%",background:"radial-gradient(circle at 35% 35%, #f5d98a, #b8860b)",boxShadow:"0 2px 8px rgba(184,134,11,0.5)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#2a1a00"},children:"✦"})]})}),!o&&e.jsx("div",{style:{position:"absolute",bottom:"22%",left:"50%",transform:"translateX(-50%)",display:"flex",gap:5},children:[0,1,2].map(t=>e.jsx("div",{style:{width:5,height:5,borderRadius:"50%",background:"rgba(255,220,150,0.5)",animation:`demoEnvShimmer 1.8s ${.3*t}s ease-in-out infinite`}},t))})]})}
1const g={wedding:"Boda",boda:"Boda",quinceanera:"XV Años","quinceañera":"XV Años",birthday:"Cumpleaños",baby_shower:"Baby Shower",graduation:"Graduación",graduacion:"Graduación"},w={wedding:"Wedding",boda:"Wedding",quinceanera:"Quinceañera","quinceañera":"Quinceañera",birthday:"Birthday",baby_shower:"Baby Shower",graduation:"Graduation",graduacion:"Graduation"};function y({isOpen:s,demos:i=[],initialIndex:p=0,onClose:y,onUseTemplate:v=null}){const[j,k]=t.useState(p),[N,S]=t.useState(null),[E,C]=t.useState(!1),[z,T]=t.useState(!0),[X,F]=t.useState(!1),[L,R]=t.useState(!1),{currentLanguage:W}=n(),Y=t.useRef(0),A=t.useRef(0),B=t.useRef(null);t.useEffect(()=>{s&&(k(p),T(!0),R(!0))},[s,p]),t.useEffect(()=>{if(!s)return;const e=window.scrollY;return document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,e)}},[s]),t.useEffect(()=>{if(!s)return;const e=e=>{"Escape"===e.key?y():"ArrowRight"!==e.key||E?"ArrowLeft"!==e.key||E||V(j,"prev"):V(j,"next")};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s,j,E]),t.useEffect(()=>{B.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[j]);const V=(e,t)=>{if(E||!i.length)return;let a,s;"next"===t?(a=(e+1)%i.length,s="left"):"prev"===t?(a=(e-1+i.length)%i.length,s="right"):(a=t,s=t>e?"left":"right"),a!==e&&(S(s),C(!0),T(!0),R(!0),setTimeout(()=>{k(a),S(null),C(!1)},280))},q=i[j]??null,O=t.useMemo(()=>q?.id?`${window.location.origin}${"en"===W?"/en/":"/"}?v=${Date.now()}#website/demo_${q.id}`:"",[q?.id,W]);if(!s||!i.length||!q)return null;const $=q,I=r($.name,W),M=e.jsx(o,{children:s&&e.jsxs(e.Fragment,{children:[e.jsx(l.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-[9998] bg-black/90 backdrop-blur-sm",onClick:y},"bd"),e.jsxs(l.div,{initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.97},transition:{duration:.22,ease:"easeOut"},className:"fixed inset-0 z-[9999] flex flex-col bg-slate-950",onClick:e=>e.stopPropagation(),onTouchStart:e=>{1===e.touches.length&&(Y.current=e.touches[0].clientX,A.current=e.touches[0].clientY)},onTouchEnd:e=>{if(1!==e.changedTouches.length)return;const t=e.changedTouches[0].clientX-Y.current,a=e.changedTouches[0].clientY-A.current;Math.abs(t)>60&&Math.abs(t)>1.5*Math.abs(a)&&V(j,t<0?"next":"prev")},children:[e.jsxs("div",{className:"absolute top-0 left-0 right-0 z-20 flex items-center gap-2 px-4 h-14 bg-black/60 backdrop-blur-md",children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-white font-semibold text-sm truncate",children:I.split(" - ")[0]}),e.jsx(f,{className:"hidden sm:inline-flex shrink-0 bg-white/10 text-white/70 border-white/20 text-xs",children:("en"===W?w:g)[$.category]??$.category})]}),e.jsxs("span",{className:"text-white/40 text-sm shrink-0",children:[j+1," ","en"===W?"of":"de"," ",i.length]}),v&&e.jsxs("button",{onClick:()=>{v(i[j]),y()},className:"flex items-center gap-1.5 shrink-0 px-3 py-1.5 rounded-full bg-pink-500 hover:bg-pink-600 text-white text-xs font-semibold transition-all active:scale-95",children:[e.jsx(d,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"en"===W?"Use this template":"Usar esta plantilla"})]}),e.jsx("button",{onClick:()=>F(e=>!e),className:"hidden md:flex items-center gap-1.5 shrink-0 px-3 py-1.5 rounded-full bg-white/10 hover:bg-white/20 border border-white/20 text-white text-xs font-medium transition-all active:scale-95",title:X?"en"===W?"View on desktop":"Ver en desktop":"en"===W?"View on mobile":"Ver en móvil",children:X?e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Desktop"})]}):e.jsxs(e.Fragment,{children:[e.jsx(h,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"en"===W?"Mobile":"Móvil"})]})}),e.jsx("button",{onClick:y,className:"p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors shrink-0","aria-label":"en"===W?"Close":"Cerrar",children:e.jsx(u,{className:"w-5 h-5 text-white"})})]}),e.jsxs("div",{className:"flex-1 relative overflow-hidden pt-14 pb-16 md:pb-20",children:[e.jsx("button",{onClick:()=>V(j,"prev"),disabled:E,className:"hidden md:flex absolute left-3 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/10 border border-white/20 backdrop-blur-sm items-center justify-center hover:bg-white/25 transition-all disabled:opacity-30","aria-label":"en"===W?"Previous":"Anterior",children:e.jsx(m,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"w-full h-full transition-transform duration-[280ms] ease-out",style:{transform:"left"===N?"translateX(-6%)":"right"===N?"translateX(6%)":"translateX(0)"},children:[z&&e.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center bg-slate-950 gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-white/15 border-t-white animate-spin"}),e.jsx("p",{className:"text-white/40 text-sm",children:I.split(" - ")[0]})]}),X?e.jsx("div",{className:"w-full h-full flex items-center justify-center p-4",children:e.jsxs("div",{className:"relative rounded-[2.8rem] shadow-2xl ring-1 ring-white/10",style:{width:408,height:"min(862px, 100%)",padding:9,background:"linear-gradient(145deg, #1a1a26 0%, #0a0a12 100%)"},children:[e.jsx("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 rounded-full bg-black z-20 shadow-inner",style:{width:110,height:20}}),e.jsx("div",{className:"relative rounded-[2.3rem] overflow-hidden bg-white w-full h-full",children:e.jsx("iframe",{src:O,title:I,allow:"autoplay",className:"w-full h-full border-0",style:{width:390},onLoad:()=>setTimeout(()=>T(!1),150)},`${$.id}-mobile`)})]})}):e.jsx("iframe",{src:O,title:I,allow:"autoplay",className:"w-full h-full border-0",onLoad:()=>setTimeout(()=>T(!1),150)},$.id)]}),L&&e.jsx(x,{demo:$,onComplete:()=>R(!1)}),E&&e.jsx("div",{className:"absolute inset-0 z-30"}),e.jsx("button",{onClick:()=>V(j,"next"),disabled:E,className:"hidden md:flex absolute right-3 top-1/2 -translate-y-1/2 z-20 w-11 h-11 rounded-full bg-white/10 border border-white/20 backdrop-blur-sm items-center justify-center hover:bg-white/25 transition-all disabled:opacity-30","aria-label":"en"===W?"Next":"Siguiente",children:e.jsx(b,{className:"w-5 h-5 text-white"})})]}),e.jsxs("div",{className:"md:hidden absolute bottom-0 left-0 right-0 h-16 bg-black/80 backdrop-blur-md flex items-center justify-between px-4 z-20",children:[e.jsxs("button",{onClick:()=>V(j,"prev"),disabled:E,className:"flex items-center gap-1.5 bg-white/10 border border-white/20 rounded-full px-4 py-2 text-white text-sm disabled:opacity-30 active:bg-white/20 transition-colors","aria-label":"en"===W?"Previous":"Anterior",children:[e.jsx(m,{className:"w-4 h-4"}),"en"===W?"Prev":"Ant"]}),e.jsxs("span",{className:"text-white/50 text-sm font-medium",children:[j+1," ","en"===W?"of":"de"," ",i.length]}),e.jsxs("button",{onClick:()=>V(j,"next"),disabled:E,className:"flex items-center gap-1.5 bg-white/10 border border-white/20 rounded-full px-4 py-2 text-white text-sm disabled:opacity-30 active:bg-white/20 transition-colors","aria-label":"en"===W?"Next":"Siguiente",children:["en"===W?"Next":"Sig",e.jsx(b,{className:"w-4 h-4"})]})]}),e.jsx("div",{className:"hidden md:flex absolute bottom-0 left-0 right-0 h-20 bg-black/70 backdrop-blur-md items-center px-6 overflow-x-auto gap-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:i.map((t,a)=>{const s=function(e,t=72,a=96){if(!e||!e.includes("images.unsplash.com"))return e;let s=e.replace(/[?&]w=\d+/,e=>e.replace(/\d+/,t)).replace(/[?&]h=\d+/,e=>e.replace(/\d+/,a));return s.includes("q=")?s.replace(/[?&]q=\d+/,e=>e.replace(/\d+/,"60")):s+"&q=60"}(t.data?.hero?.backgroundImage||t.preview_image),i=a===j;return e.jsx("button",{ref:i?B:null,onClick:()=>V(j,a),title:t.name,className:"shrink-0 h-12 w-9 rounded overflow-hidden ring-2 transition-all duration-200 "+(i?"ring-white scale-110 opacity-100":"ring-transparent opacity-40 hover:opacity-70 hover:scale-105"),children:s?e.jsx("img",{src:s,alt:r(t.name,W),className:"w-full h-full object-cover",loading:"lazy"}):e.jsx("div",{className:"w-full h-full bg-slate-700"})},t.id)})})]},"shell")]})});return a.createPortal(M,document.body)}export{y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.