{"version":3,"file":"Video_grid_2.LSdJb8oG.mjs","names":["useRef","useState","Player","useCallback"],"sources":["https:/framerusercontent.com/modules/lvhfSOZis68JL30WpaSs/xA74VbJfegCrlvxkB5Yz/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\";const STATIC_VIDEO_POSTER_URL=\"https://framerusercontent.com/images/N2q87AovT6r7iPuYcpXQVy3AC3s.png?width=1108&height=621&kb=558\";// 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({vimeoURL,image,displayType,gridIndex=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);const mediaFormat=aspectRatio>100?\"vertical\":\"wide\";// 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\"&&!vimeoURL){// console.log(\n//     `[${instanceId.current}] No video URL provided, showing fallback immediately`\n// )\nsetHasError(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\"&&vimeoURL){// 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(),gridIndex// 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,vimeoURL,image,fallbackImage,gridIndex]);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=vimeoURL?extractVimeoId(vimeoURL):\"\";// 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&&displayType!==\"video\"){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&&displayType!==\"video\"){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&&displayType!==\"video\"){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&&displayType!==\"video\"){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\",{\"data-media-format\":mediaFormat,style:{display:\"flex\",flexDirection:\"column\",width:\"100%\",gap:\"0.5rem\",cursor:\"pointer\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",paddingTop:`${aspectRatio}%`,borderRadius:\"20px\",overflow:\"hidden\",cursor:\"pointer\",backgroundColor:displayType===\"video\"?\"#f5f5f5\":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:[displayType===\"video\"&&/*#__PURE__*/_jsx(\"img\",{src:STATIC_VIDEO_POSTER_URL,alt:\"Video poster\",style:{position:\"absolute\",top:\"-1px\",left:\"-1px\",width:\"calc(100% + 2px)\",height:\"calc(100% + 2px)\",objectFit:\"cover\",borderRadius:\"inherit\",zIndex:0}}),isLoading&&displayType!==\"video\"&&/*#__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&&displayType!==\"video\"&&/*#__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&&displayType!==\"video\"&&/*#__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)\",zIndex:1},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\"},vimeoURL:{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\"},gridIndex:{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__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video_grid_2.map"],"mappings":"2PAeuG,SAAwB,EAAkB,CAAC,WAAS,QAAM,cAAY,YAAU,EAAE,iBAAe,CACxM,IAAM,EAAWA,EAAO,eAAe,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE,EAAE,GAAG,EAAQ,EAAYA,EAAO,IAAI,EAAO,CAAC,EAAY,GAAgBC,EAAS,KAAK,EAC9J,CAAC,EAAU,GAAcA,EAAS,EAAI,EAAO,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAO,CAAC,EAAS,GAAaA,EAAS,EAAK,EAAO,CAAC,EAAW,GAAeA,EAAS,CAAC,EAAQ,EAAUD,EAAO,IAAI,EAAQ,EAAUA,EAAO,IAAI,EAAQ,EAASA,EAAO,IAAI,EAAQ,EAAiBA,EAAO,IAAI,EAAQ,EAAWA,EAAO,EAAI,EAAQ,EAAiBA,EAAO,IAAI,EAAQ,EAAeA,EAAO,CAAC,EAAQ,EAAgBA,EAAO,IAAI,EAAQ,EAAuBA,EAAO,CAAC,EAAQ,EAAqBA,EAAO,EAAK,EAAQ,EAAY,EAAY,IAAI,WAAW,OAC/iB,MAAc,C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