{"version":3,"file":"Loading.C05Qftjx.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/6exOUoZeQK7MASU8oZnX/obdc2zE7W5bf6QDsgELU/Loading.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType,motion}from\"framer\";export function SplashScreen({children,imageUrl,imageFill,videoURL}){const[loading,setLoading]=useState(true);const[shouldAnimateOut,setShouldAnimateOut]=useState(false);const[progress,setProgress]=useState(0);// Simulate progress loading\nuseEffect(()=>{if(!loading)return;let frame;const step=()=>{setProgress(prev=>{if(prev<95)return prev+Math.random()*2// simulate load\n;return prev;});frame=requestAnimationFrame(step);};frame=requestAnimationFrame(step);return()=>cancelAnimationFrame(frame);},[loading]);useEffect(()=>{const hasVisited=sessionStorage.getItem(\"hasVisited\");if(hasVisited){setLoading(false);return;}const minDelay=new Promise(resolve=>setTimeout(resolve,1500));const pageLoad=new Promise(resolve=>{if(document.readyState===\"complete\")resolve(true);else window.addEventListener(\"load\",()=>resolve(true),{once:true});});Promise.all([minDelay,pageLoad]).then(()=>{setProgress(100);setShouldAnimateOut(true);setTimeout(()=>{setLoading(false);sessionStorage.setItem(\"hasVisited\",\"true\");},1e3);});},[]);if(loading){return /*#__PURE__*/_jsxs(motion.div,{initial:{backgroundColor:\"#ffffff\",y:0},animate:shouldAnimateOut?{backgroundColor:\"#000000\",y:\"-100%\"}:{y:0},transition:{duration:1,ease:\"easeInOut\"},style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",color:\"#fff\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"24px\",zIndex:9999,overflow:\"hidden\"},children:[videoURL?/*#__PURE__*/_jsx(\"video\",{src:videoURL,autoPlay:true,loop:true,muted:true,playsInline:true,style:{width:\"100%\",height:\"100%\",objectFit:imageFill,position:\"absolute\",top:0,left:0}}):imageUrl?/*#__PURE__*/_jsx(\"img\",{src:imageUrl,alt:\"Loading\",style:{width:\"100%\",height:\"100%\",objectFit:imageFill,position:\"absolute\",top:0,left:0}}):\"Loading...\",/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:24,left:\"50%\",transform:\"translateX(-50%)\",fontSize:16,fontWeight:\"500\",color:\"white\",background:\"rgba(0, 0, 0, 0.4)\",padding:\"4px 12px\",borderRadius:8},children:[Math.min(progress,100).toFixed(0),\"%\"]})]});}return children;}addPropertyControls(SplashScreen,{imageUrl:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\"},imageFill:{type:ControlType.Enum,title:\"Image Fill\",options:[\"cover\",\"contain\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\",\"None\",\"Scale Down\"],defaultValue:\"cover\"},videoURL:{type:ControlType.String,title:\"Video URL\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"SplashScreen\":{\"type\":\"reactComponent\",\"name\":\"SplashScreen\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Loading.map"],"mappings":"wWAA0J,SAAgB,EAAa,CAAC,WAAS,WAAS,YAAU,YAAU,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAK,CAAM,CAAC,EAAiB,GAAqBA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,EAAE,CAEqxC,OADhoD,MAAc,CAAC,GAAG,CAAC,EAAQ,OAAO,IAAI,EAAY,MAAS,CAAC,EAAY,GAAU,EAAK,GAAU,EAAK,KAAK,QAAQ,CAAC,EAC5G,EAAO,CAAC,EAAM,sBAAsB,EAAK,EAAqC,MAAlC,GAAM,sBAAsB,EAAK,KAAW,qBAAqB,EAAM,EAAG,CAAC,EAAQ,CAAC,CAAC,MAAc,CAAuD,GAArC,eAAe,QAAQ,aAAa,CAAe,CAAC,EAAW,GAAM,CAAC,OAAQ,IAAM,EAAS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