{"version":3,"file":"Video_grid_2.n2WRFJAE.mjs","names":["useRef","useState","Player","useCallback"],"sources":["https:/framerusercontent.com/modules/lvhfSOZis68JL30WpaSs/20MbtajGwrQ2tw2UDXmd/Video_grid_2.js"],"sourcesContent":["\"use client\";import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef,useCallback}from\"react\";import Player from\"@vimeo/player\";// Global queue system for sequential loading\n// This ensures only one video loads at a time\nconst loadingQueue={isLoading:false,queue:[],currentlyLoading:null,// Add a video to the loading queue\nenqueue:function(loadFn,priority=0){const id=Math.random().toString(36).substring(2,11);this.queue.push({id,loadFn,priority});// Sort queue by priority (lower number = higher priority)\nthis.queue.sort((a,b)=>a.priority-b.priority);this.processQueue();return id;},// Process the next item in the queue if nothing is currently loading\nprocessQueue:function(){if(this.isLoading||this.queue.length===0)return;this.isLoading=true;const next=this.queue.shift();this.currentlyLoading=next.id;// console.log(\n//     `[Queue] Starting to load item ${next.id}, ${this.queue.length} items remaining in queue`\n// )\n// Execute the loading function\nnext.loadFn().then(()=>{// console.log(`[Queue] Successfully loaded item ${next.id}`)\nthis.isLoading=false;this.currentlyLoading=null;// Process the next item\nsetTimeout(()=>this.processQueue(),300)// Small delay between videos\n;}).catch(error=>{console.error(`[Queue] Error loading item ${next.id}:`,error);this.isLoading=false;this.currentlyLoading=null;// Process the next item even if there was an error\nsetTimeout(()=>this.processQueue(),300);});},// Remove an item from the queue\ndequeue:function(id){this.queue=this.queue.filter(item=>item.id!==id);// If we're removing the currently loading item, mark as not loading\nif(this.currentlyLoading===id){this.isLoading=false;this.currentlyLoading=null;this.processQueue();}}};export default function VimeoEmbedForGrid({videoUrl,image,displayType,index=0,fallbackImage}){// Use a unique ID for each component instance to ensure they don't interfere with each other\nconst instanceId=useRef(`vimeo-embed-${Math.random().toString(36).substring(2,11)}`);const queueItemId=useRef(null);const[aspectRatio,setAspectRatio]=useState(56.25)// 16:9 default\n;const[isLoading,setIsLoading]=useState(true);const[isPlaying,setIsPlaying]=useState(false);const[hasError,setHasError]=useState(false);const[retryCount,setRetryCount]=useState(0);const iframeRef=useRef(null);const playerRef=useRef(null);const imageRef=useRef(null);const fallbackImageRef=useRef(null);const mountedRef=useRef(true);const safetyTimeoutRef=useRef(null);const playAttemptRef=useRef(0);const playIntervalRef=useRef(null);const lastPlayAttemptTimeRef=useRef(0);const playbackConfirmedRef=useRef(false);// Immediately check if we should show fallback based on inputs\nuseEffect(()=>{// Reset state on input change\nsetIsLoading(true);setIsPlaying(false);setHasError(false);setRetryCount(0);// Immediate check for missing primary content\nif(displayType===\"video\"&&!videoUrl){// console.log(\n//     `[${instanceId.current}] No video URL provided, showing fallback immediately`\n// )\nif(fallbackImage){loadFallbackImage();}else{setHasError(true);setIsLoading(false);}return;}else if(displayType===\"image\"&&!image){// console.log(\n//     `[${instanceId.current}] No image provided, showing fallback immediately`\n// )\nif(fallbackImage){loadFallbackImage();}else{setHasError(true);setIsLoading(false);}return;}// If we have valid content, queue it for loading\nif(displayType===\"video\"&&videoUrl){// Remove any existing queue item\nif(queueItemId.current){loadingQueue.dequeue(queueItemId.current);}// Add to loading queue with priority based on index\nqueueItemId.current=loadingQueue.enqueue(()=>loadVideo(),index// Use index as priority (lower index = higher priority)\n);}else if(displayType===\"image\"&&image){// Images don't need to be queued, load immediately\nloadImage();}// Cleanup function\nreturn()=>{if(queueItemId.current){loadingQueue.dequeue(queueItemId.current);queueItemId.current=null;}};},[displayType,videoUrl,image,fallbackImage,index]);const extractVimeoId=url=>{if(!url)return\"\";const match=url.match(/vimeo\\.com\\/(\\d+)(?:\\/([\\w\\d]+))?/);if(match){const videoId=match[1];const hash=match[2]?`?h=${match[2]}`:\"\";return`${videoId}${hash}`;}return\"\";};const formattedId=videoUrl?extractVimeoId(videoUrl):\"\";// Get video URL with optimized parameters but without quality parameter\nconst getVideoUrl=id=>{if(!id)return\"\";const[videoId,hash]=id.split(\"?\");// Enable autoplay in the URL parameters\nconst params=[\"controls=0\",\"loop=1\",\"muted=1\",\"autoplay=1\",\"transparent=1\",\"background=1\"].join(\"&\");return`https://player.vimeo.com/video/${videoId}${hash?`?${hash}&${params}`:`?${params}`}`;};// Function to load fallback image and set its aspect ratio\nconst loadFallbackImage=()=>{if(!fallbackImage)return;setHasError(true);setIsLoading(true);// console.log(`[${instanceId.current}] Loading fallback image`)\nconst img=new Image;const handleLoad=()=>{if(mountedRef.current){const ratio=(img.height/img.width*100).toFixed(2);// console.log(\n//     `[${instanceId.current}] Fallback image loaded, aspect ratio: ${ratio}%`\n// )\nsetAspectRatio(Number(ratio));setIsLoading(false);}};const handleError=()=>{if(mountedRef.current){console.error(`[${instanceId.current}] Failed to load fallback image`);setAspectRatio(56.25)// Default to 16:9 if even the fallback fails\n;setIsLoading(false);}};img.addEventListener(\"load\",handleLoad);img.addEventListener(\"error\",handleError);img.src=fallbackImage;// Return cleanup function\nreturn()=>{img.removeEventListener(\"load\",handleLoad);img.removeEventListener(\"error\",handleError);};};// Improved loadImage function with proper timeout handling\nconst loadImage=()=>{if(!image||!mountedRef.current)return Promise.resolve();return new Promise((resolve,reject)=>{setIsLoading(true);const img=new Image;// Create a timeout ID that we can clear\nlet timeoutId=null;const handleLoad=()=>{if(mountedRef.current){// Clear the timeout when image loads successfully\nif(timeoutId){clearTimeout(timeoutId);}const ratio=(img.height/img.width*100).toFixed(2);// console.log(\n//     `[${instanceId.current}] Image loaded, aspect ratio: ${ratio}%`\n// )\nsetAspectRatio(Number(ratio));setIsLoading(false);resolve();}};const handleError=()=>{if(mountedRef.current){// Clear the timeout on error too\nif(timeoutId){clearTimeout(timeoutId);}console.error(`[${instanceId.current}] Failed to load image, trying fallback`);if(fallbackImage){loadFallbackImage();}else{// Set default 16:9 aspect ratio on error\nsetAspectRatio(56.25);setHasError(true);setIsLoading(false);}reject(new Error(\"Failed to load image\"));}};img.addEventListener(\"load\",handleLoad);img.addEventListener(\"error\",handleError);img.src=image;// Safety timeout - properly tracked for cleanup\ntimeoutId=setTimeout(()=>{if(mountedRef.current&&isLoading){// console.log(\n//     `[${instanceId.current}] Image load timeout, trying fallback`\n// )\nimg.removeEventListener(\"load\",handleLoad);img.removeEventListener(\"error\",handleError);if(fallbackImage){loadFallbackImage();}else{setHasError(true);setIsLoading(false);}reject(new Error(\"Image load timeout\"));}},1e4);});};// Function to load a video with improved retry logic\nconst loadVideo=()=>{if(!formattedId||!mountedRef.current||!iframeRef.current){return Promise.reject(new Error(\"Invalid video configuration\"));}return new Promise(async(resolve,reject)=>{// console.log(`[${instanceId.current}] Starting video load process`)\nsetIsLoading(true);setIsPlaying(false);playAttemptRef.current=0;lastPlayAttemptTimeRef.current=0;playbackConfirmedRef.current=false;// Cleanup any existing player\ncleanupPlayer();// Set a safety timeout\nsafetyTimeoutRef.current=setTimeout(()=>{if(mountedRef.current&&isLoading){// console.log(\n//     `[${instanceId.current}] Safety timeout triggered - forcing loading complete`\n// )\n// If we're still loading after the timeout, retry or show fallback\nif(retryCount<2){// console.log(\n//     `[${instanceId.current}] Retrying video load (attempt ${retryCount + 1})`\n// )\nsetRetryCount(prev=>prev+1);cleanupPlayer();// Re-queue with higher priority\nif(queueItemId.current){loadingQueue.dequeue(queueItemId.current);}// Use exponential backoff for retry delay\nconst retryDelay=Math.min(1e3*Math.pow(2,retryCount),5e3);setTimeout(()=>{if(mountedRef.current){queueItemId.current=loadingQueue.enqueue(()=>loadVideo(),-1e3// Very high priority for retries\n);}},retryDelay);reject(new Error(\"Video load timeout, retrying\"));}else{// console.log(\n//     `[${instanceId.current}] Max retries reached, showing fallback`\n// )\nif(fallbackImage){loadFallbackImage();}else{setIsLoading(false);}resolve()// Resolve anyway to continue the queue\n;}}},15e3)// Longer timeout for video loading\n;try{// console.log(`[${instanceId.current}] Initializing video player`)\n// Create new player instance\nplayerRef.current=new Player(iframeRef.current);// Set up event listeners\nplayerRef.current.on(\"play\",()=>{if(mountedRef.current){// console.log(\n//     `[${instanceId.current}] Play event received`\n// )\nsetIsPlaying(true);setIsLoading(false);}});playerRef.current.on(\"pause\",()=>{if(mountedRef.current&&playbackConfirmedRef.current){// console.log(\n//     `[${instanceId.current}] Paused after confirmed playback`\n// )\nsetIsPlaying(false);}});playerRef.current.on(\"loaded\",()=>{if(mountedRef.current){// console.log(\n//     `[${instanceId.current}] Loaded event received`\n// )\n}});// Add error event handler\nplayerRef.current.on(\"error\",error=>{if(mountedRef.current){console.error(`[${instanceId.current}] Video error:`,error);// If we're already at max retries, show fallback\nif(retryCount>=2){// console.log(\n//     `[${instanceId.current}] Max retries reached after error, showing fallback`\n// )\nif(fallbackImage){loadFallbackImage();}else{setHasError(true);setIsLoading(false);}}// Otherwise, retry will be handled by the caller\n}});// Add progress event to confirm continuous playback\nplayerRef.current.on(\"progress\",data=>{if(mountedRef.current&&data.percent>.01){// Video is definitely playing if we're getting progress events\nif(!playbackConfirmedRef.current){// console.log(\n//     `[${instanceId.current}] Playback confirmed via progress event`\n// )\nplaybackConfirmedRef.current=true;setIsPlaying(true);setIsLoading(false);// Clear the safety timeout once playback is confirmed\nif(safetyTimeoutRef.current){clearTimeout(safetyTimeoutRef.current);safetyTimeoutRef.current=null;}// Clear the play interval once playing is confirmed\nif(playIntervalRef.current){clearInterval(playIntervalRef.current);playIntervalRef.current=null;}}}});await playerRef.current.ready();if(!mountedRef.current){reject(new Error(\"Component unmounted during initialization\"));return;}// console.log(`[${instanceId.current}] Player is ready`)\n// Set initial player settings\nawait playerRef.current.setLoop(true);await playerRef.current.setVolume(0);// Get video dimensions\nconst[width,height]=await Promise.all([playerRef.current.getVideoWidth(),playerRef.current.getVideoHeight()]);if(!mountedRef.current){reject(new Error(\"Component unmounted during initialization\"));return;}if(width&&height){// console.log(\n//     `[${instanceId.current}] Video dimensions: ${width}x${height}`\n// )\nconst ratio=(height/width*100).toFixed(2);setAspectRatio(Number(ratio));}// Start playing with a slight delay to ensure player is fully ready\nsetTimeout(attemptPlay,500);// Set up an interval to try playing if not confirmed yet\nplayIntervalRef.current=setInterval(()=>{if(!playbackConfirmedRef.current&&mountedRef.current&&playerRef.current){attemptPlay();}else if(playbackConfirmedRef.current&&playIntervalRef.current){clearInterval(playIntervalRef.current);playIntervalRef.current=null;}},3e3)// Try every 3 seconds\n;// If we don't get a progress event within 10 seconds, resolve anyway\n// to prevent blocking the queue\nsetTimeout(()=>{if(!playbackConfirmedRef.current&&mountedRef.current){// console.log(\n//     `[${instanceId.current}] No progress event received, but continuing queue`\n// )\nresolve();}},1e4);// Resolve the promise once initialization is complete\nresolve();}catch(error){console.error(`[${instanceId.current}] Error initializing video:`,error);// Retry logic for initialization errors\nif(retryCount<2){// console.log(\n//     `[${instanceId.current}] Retrying initialization (attempt ${retryCount + 1})`\n// )\nsetRetryCount(prev=>prev+1);cleanupPlayer();// Re-queue with higher priority\nif(queueItemId.current){loadingQueue.dequeue(queueItemId.current);}// Use exponential backoff for retry delay\nconst retryDelay=Math.min(1e3*Math.pow(2,retryCount),5e3);setTimeout(()=>{if(mountedRef.current){queueItemId.current=loadingQueue.enqueue(()=>loadVideo(),-1e3// Very high priority for retries\n);}},retryDelay);reject(new Error(\"Initialization error, retrying\"));}else{// console.log(\n//     `[${instanceId.current}] Max retries reached, showing fallback`\n// )\nif(fallbackImage){loadFallbackImage();}else{// Set default 16:9 aspect ratio on error\nsetAspectRatio(56.25);setHasError(true);setIsLoading(false);}resolve()// Resolve anyway to continue the queue\n;}}});};// Simplified attemptPlay function with better error handling\nconst attemptPlay=async()=>{if(!playerRef.current||!mountedRef.current||hasError)return;// Don't attempt to play too frequently\nconst now=Date.now();if(now-lastPlayAttemptTimeRef.current<2e3){return;// Don't try more than once per 2 seconds\n}lastPlayAttemptTimeRef.current=now;playAttemptRef.current++;// console.log(\n//     `[${instanceId.current}] Play attempt ${playAttemptRef.current}`\n// )\ntry{await playerRef.current.play();// console.log(`[${instanceId.current}] Play command sent`)\n}catch(error){console.error(`[${instanceId.current}] Error playing video:`,error);// If we've tried too many times, give up and show fallback\nif(playAttemptRef.current>=3){// console.log(\n//     `[${instanceId.current}] Giving up after ${playAttemptRef.current} attempts`\n// )\nif(playIntervalRef.current){clearInterval(playIntervalRef.current);playIntervalRef.current=null;}if(fallbackImage){loadFallbackImage();}else{setIsLoading(false)// Show the first frame at least\n;}}}};// Improved cleanup function to ensure we properly dispose of all resources\nconst cleanupPlayer=useCallback(()=>{if(playerRef.current){try{// Remove all event listeners\nplayerRef.current.off(\"play\");playerRef.current.off(\"pause\");playerRef.current.off(\"loaded\");playerRef.current.off(\"progress\");playerRef.current.off(\"ended\");playerRef.current.off(\"error\");playerRef.current.unload();playerRef.current.destroy();}catch(error){console.error(`[${instanceId.current}] Error cleaning up player:`,error);}playerRef.current=null;}if(safetyTimeoutRef.current){clearTimeout(safetyTimeoutRef.current);safetyTimeoutRef.current=null;}if(playIntervalRef.current){clearInterval(playIntervalRef.current);playIntervalRef.current=null;}},[]);// Function to handle visibility changes (for performance optimization)\nconst handleVisibilityChange=useCallback(()=>{if(!playerRef.current||!mountedRef.current||hasError)return;if(document.visibilityState===\"hidden\"){// Page is hidden, pause video\nplayerRef.current.pause().catch(err=>{console.error(`[${instanceId.current}] Error pausing video:`,err);});}else if(document.visibilityState===\"visible\"&&isPlaying){// Page is visible again, resume if it was playing\nplayerRef.current.play().catch(err=>{console.error(`[${instanceId.current}] Error resuming video:`,err);});}},[isPlaying,hasError]);// Set up visibility change listener\nuseEffect(()=>{document.addEventListener(\"visibilitychange\",handleVisibilityChange);return()=>{document.removeEventListener(\"visibilitychange\",handleVisibilityChange);};},[handleVisibilityChange]);// Cleanup on unmount\nuseEffect(()=>{return()=>{mountedRef.current=false;cleanupPlayer();if(queueItemId.current){loadingQueue.dequeue(queueItemId.current);queueItemId.current=null;}};},[cleanupPlayer]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",width:\"300px\",gap:\"0.5rem\",cursor:\"pointer\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",paddingTop:`${aspectRatio}%`,borderRadius:\"20px\",overflow:\"hidden\",cursor:\"pointer\",backgroundColor:isLoading?\"#000\":\"#f5f5f5\",transform:\"translateZ(0)\",transition:\"background-color 0.3s ease\"},onClick:()=>{// Manual play on click only if we have a valid video player and no error\nif(playerRef.current&&!isPlaying&&!hasError){attemptPlay();}},children:[isLoading&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#fff\",zIndex:2},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"30px\",height:\"30px\",borderRadius:\"50%\",border:\"3px solid rgba(255,255,255,0.3)\",borderTopColor:\"#fff\"},className:\"spinner\"}),/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`\n                  .spinner {\n                    animation: spin 1s linear infinite;\n                  }\n                  @keyframes spin {\n                    to { transform: rotate(360deg); }\n                  }\n                `}})]}),!isLoading&&!isPlaying&&displayType===\"video\"&&!hasError&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"rgba(0,0,0,0.3)\",zIndex:2,cursor:\"pointer\"},onClick:e=>{e.stopPropagation();attemptPlay();},children:/*#__PURE__*/_jsx(\"div\",{style:{width:0,height:0,borderTop:\"15px solid transparent\",borderBottom:\"15px solid transparent\",borderLeft:\"25px solid white\",marginLeft:\"5px\"}})}),hasError&&fallbackImage&&/*#__PURE__*/_jsx(\"img\",{ref:fallbackImageRef,src:fallbackImage||\"/placeholder.svg\",alt:\"Fallback content\",style:{position:\"absolute\",top:\"-1px\",left:\"-1px\",width:\"calc(100% + 2px)\",height:\"calc(100% + 2px)\",objectFit:\"cover\",borderRadius:\"inherit\",opacity:isLoading?0:1,transition:\"opacity 0.3s ease\"},onLoad:()=>setIsLoading(false)}),hasError&&!fallbackImage&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#fff\",backgroundColor:\"rgba(0,0,0,0.7)\",padding:\"1rem\",textAlign:\"center\",fontSize:\"14px\"},children:displayType===\"video\"?\"Video failed to load\":\"Image failed to load\"}),!hasError&&(displayType===\"video\"?formattedId?/*#__PURE__*/_jsx(\"iframe\",{ref:iframeRef,src:getVideoUrl(formattedId),frameBorder:\"0\",allow:\"autoplay; fullscreen; picture-in-picture\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",borderRadius:\"inherit\",pointerEvents:\"none\",opacity:isLoading?0:1,transition:\"opacity 0.3s ease\",transform:\"scale(1.01)\"},title:\"Vimeo Video\"}):null:image?/*#__PURE__*/_jsx(\"img\",{ref:imageRef,src:image||\"/placeholder.svg\",alt:\"Media content\",style:{position:\"absolute\",top:\"-1px\",left:\"-1px\",width:\"calc(100% + 2px)\",height:\"calc(100% + 2px)\",objectFit:\"cover\",borderRadius:\"inherit\",opacity:isLoading?0:1,transition:\"opacity 0.3s ease\"},onLoad:()=>setIsLoading(false)}):null)]})});}// Add Framer controls\naddPropertyControls(VimeoEmbedForGrid,{displayType:{type:ControlType.Enum,title:\"Display Type\",options:[\"video\",\"image\"],defaultValue:\"video\"},videoUrl:{type:ControlType.String,title:\"Vimeo URL\",defaultValue:\"https://vimeo.com/1023893382/2c3803037a\",hidden:props=>props.displayType!==\"video\"},image:{type:ControlType.Image,title:\"Image\",hidden:props=>props.displayType!==\"image\"},fallbackImage:{type:ControlType.Image,title:\"Fallback Image\",description:\"Shown if video/image fails to load\"},index:{type:ControlType.Number,title:\"Grid Index\",defaultValue:0,min:0,step:1,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VimeoEmbedForGrid\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{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