{"version":3,"file":"LogoPreloader.C1NXYnZ0.mjs","names":["useState","useState"],"sources":["https:/framerusercontent.com/modules/WUlYyy6WXWBEq9OHnfEJ/EeB9rvB0dT97R2znjC3g/Theme_switch.js","https:/framerusercontent.com/modules/dZS2n6DCTdBdWJwkth40/OxerceJwEPsPw4mGW6v2/LogoPreloader.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function withThemeVariant(Component){return props=>{const[theme,setTheme]=useState(\"light\");useEffect(()=>{// Function to determine current theme\nconst getCurrentTheme=()=>{// Check for toggle-theme attribute (from your theme toggle)\nconst htmlTheme=document.documentElement.getAttribute(\"toggle-theme\");if(htmlTheme===\"dark\"||htmlTheme===\"light\"){return htmlTheme;}// Check localStorage\nconst savedTheme=localStorage.getItem(\"theme\");if(savedTheme===\"dark\"||savedTheme===\"light\"){return savedTheme;}// Fall back to system preference\nconst mediaQuery=window.matchMedia(\"(prefers-color-scheme: dark)\");return mediaQuery.matches?\"dark\":\"light\";};// Set initial theme\nsetTheme(getCurrentTheme());// Listen for theme changes\nconst handleThemeChange=()=>{setTheme(getCurrentTheme());};// Listen for custom theme change event\nwindow.addEventListener(\"themeChange\",handleThemeChange);// Listen for attribute changes on html element\nconst observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.attributeName===\"toggle-theme\"){handleThemeChange();}});});observer.observe(document.documentElement,{attributes:true,attributeFilter:[\"toggle-theme\"]});// Listen for system theme changes\nconst mediaQuery=window.matchMedia(\"(prefers-color-scheme: dark)\");const handleMediaChange=()=>{// Only respond to system changes if no manual theme is set\nconst htmlTheme=document.documentElement.getAttribute(\"toggle-theme\");const savedTheme=localStorage.getItem(\"theme\");if(!htmlTheme&&!savedTheme){handleThemeChange();}};mediaQuery.addEventListener(\"change\",handleMediaChange);// Cleanup\nreturn()=>{window.removeEventListener(\"themeChange\",handleThemeChange);observer.disconnect();mediaQuery.removeEventListener(\"change\",handleMediaChange);};},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:theme===\"light\"?\"Variant 2\":\"Variant 1\"});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withThemeVariant\":{\"type\":\"reactHoc\",\"name\":\"withThemeVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Theme_switch.map","// Pre-loader with centered logo, animates logo up and out, then fades background and removes itself\n// Only shows on first visit per session\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer,RenderTarget}from\"framer\";/**\n * LogoPreloader\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */function LogoPreloader(props){const{logo={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo\"},backgroundColor,duration,logoSize,videoFile=\"\",backgroundImage={src:\"\",alt:\"\"},logoInEasing,logoOutEasing,backgroundFadeEasing,showOnce=true,storageType=\"session\",style}=props;const[phase,setPhase]=useState(\"init\")// init, loading, logoOut, done\n;const[shouldRender,setShouldRender]=useState(true);const[hasSeenPreloader,setHasSeenPreloader]=useState(false);const isStatic=useIsStaticRenderer();// Check if we're in the canvas editor\nconst isCanvas=RenderTarget.current()===RenderTarget.canvas;// Check if preloader has been shown before\nuseEffect(()=>{if(isStatic||!showOnce)return;try{const storage=storageType===\"local\"?localStorage:sessionStorage;const preloaderKey=\"framer_preloader_shown\";const shown=storage.getItem(preloaderKey);if(shown===\"true\"){setHasSeenPreloader(true);setShouldRender(false);}else{// Mark as shown\nstorage.setItem(preloaderKey,\"true\");}}catch(e){// If storage is not available, show the preloader anyway\nconsole.warn(\"Storage not available:\",e);}},[isStatic,showOnce,storageType]);useEffect(()=>{if(isStatic||hasSeenPreloader)return;// Animate logo in from bottom\nconst t0=setTimeout(()=>{startTransition(()=>setPhase(\"loading\"));},50);const t1=setTimeout(()=>{startTransition(()=>setPhase(\"logoOut\"));},duration*1e3+50);const t2=setTimeout(()=>{startTransition(()=>setPhase(\"done\"));},duration*1e3+750);// Remove from DOM as soon as fade starts\nconst t3=setTimeout(()=>{startTransition(()=>setShouldRender(false));},duration*1e3+800// Remove shortly after logoOut phase starts\n);return()=>{clearTimeout(t0);clearTimeout(t1);clearTimeout(t2);clearTimeout(t3);};},[duration,isStatic,hasSeenPreloader]);// Don't render at all once animation is complete or if already seen\nif(!shouldRender||hasSeenPreloader)return null;// Animation states\nlet logoTranslateY=0;let logoOpacity=1;if(phase===\"init\"){logoTranslateY=80;logoOpacity=0;}else if(phase===\"loading\"){logoTranslateY=0;logoOpacity=1;}else if(phase===\"logoOut\"){logoTranslateY=-80;logoOpacity=0;}const bgOpacity=phase===\"logoOut\"||phase===\"done\"?0:1;const transition=\"all 0.7s cubic-bezier(.7,.2,.2,1)\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"fixed\",top:0,left:0,width:\"100%\",height:\"100%\",background:videoFile||backgroundImage.src||isCanvas?undefined:backgroundColor,backgroundImage:!videoFile&&backgroundImage.src?`url(${backgroundImage.src})`:undefined,backgroundSize:\"cover\",backgroundPosition:\"center\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:`opacity 0.7s cubic-bezier(.7,.2,.2,1)`,opacity:bgOpacity,pointerEvents:phase===\"logoOut\"||phase===\"done\"?\"none\":\"all\",zIndex:9999,overflow:\"hidden\"},\"aria-label\":\"Loading\",role:\"status\",children:[videoFile&&/*#__PURE__*/_jsx(\"video\",{src:videoFile,autoPlay:true,muted:true,loop:true,playsInline:true,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",zIndex:0,pointerEvents:\"none\",opacity:bgOpacity,transition:`opacity 0.7s cubic-bezier(.7,.2,.2,1)`},\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"img\",{src:logo.src,alt:logo.alt||\"Logo\",style:{width:logoSize,height:logoSize,objectFit:\"contain\",transition,transform:`translateY(${logoTranslateY}px)`,opacity:logoOpacity,willChange:\"transform, opacity\",userSelect:\"none\",zIndex:1},draggable:false})]});}addPropertyControls(LogoPreloader,{logo:{type:ControlType.ResponsiveImage,title:\"Logo\"},videoFile:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],title:\"Video Background\"},backgroundImage:{type:ControlType.ResponsiveImage,title:\"Background Image\",hidden:({videoFile})=>!!videoFile},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\",hidden:({videoFile,backgroundImage})=>!!videoFile||!!backgroundImage?.src},duration:{type:ControlType.Number,title:\"Duration (s)\",defaultValue:2,min:.5,max:10,step:.1},logoSize:{type:ControlType.Number,title:\"Logo Size\",defaultValue:80,min:24,max:400,unit:\"px\"},showOnce:{type:ControlType.Boolean,title:\"Show Only Once\",defaultValue:true,description:\"Only show preloader on first visit\"},storageType:{type:ControlType.Enum,title:\"Storage Type\",defaultValue:\"session\",options:[\"session\",\"local\"],optionTitles:[\"Session (per browser tab)\",\"Local (persistent)\"],description:\"Session: resets when tab closes. Local: persists across visits\",hidden:({showOnce})=>!showOnce},logoInEasing:{type:ControlType.Enum,title:\"Logo In Easing\",defaultValue:\"cubic-bezier(.7,.2,.2,1)\",options:[\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\",\"cubic-bezier(.7,.2,.2,1)\",\"cubic-bezier(.25,.46,.45,.94)\",\"cubic-bezier(.55,.085,.68,.53)\",\"cubic-bezier(.25,.1,.25,1)\",\"cubic-bezier(.175,.885,.32,1.275)\",\"custom\"],optionTitles:[\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Smooth\",\"Ease Out Quad\",\"Ease In Cubic\",\"Ease Out Quart\",\"Back Out\",\"Custom\"]},logoInEasingCustom:{type:ControlType.String,title:\"Custom Logo In Easing\",defaultValue:\"cubic-bezier(.7,.2,.2,1)\",placeholder:\"cubic-bezier(x1,y1,x2,y2)\",hidden:({logoInEasing})=>logoInEasing!==\"custom\"},logoOutEasing:{type:ControlType.Enum,title:\"Logo Out Easing\",defaultValue:\"cubic-bezier(.7,.2,.2,1)\",options:[\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\",\"cubic-bezier(.7,.2,.2,1)\",\"cubic-bezier(.25,.46,.45,.94)\",\"cubic-bezier(.55,.085,.68,.53)\",\"cubic-bezier(.25,.1,.25,1)\",\"cubic-bezier(.175,.885,.32,1.275)\",\"custom\"],optionTitles:[\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Smooth\",\"Ease Out Quad\",\"Ease In Cubic\",\"Ease Out Quart\",\"Back Out\",\"Custom\"]},logoOutEasingCustom:{type:ControlType.String,title:\"Custom Logo Out Easing\",defaultValue:\"cubic-bezier(.7,.2,.2,1)\",placeholder:\"cubic-bezier(x1,y1,x2,y2)\",hidden:({logoOutEasing})=>logoOutEasing!==\"custom\"},backgroundFadeEasing:{type:ControlType.Enum,title:\"Background Fade Easing\",defaultValue:\"cubic-bezier(.7,.2,.2,1)\",options:[\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\",\"cubic-bezier(.7,.2,.2,1)\",\"cubic-bezier(.25,.46,.45,.94)\",\"cubic-bezier(.55,.085,.68,.53)\",\"cubic-bezier(.25,.1,.25,1)\",\"cubic-bezier(.175,.885,.32,1.275)\",\"custom\"],optionTitles:[\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Smooth\",\"Ease Out Quad\",\"Ease In Cubic\",\"Ease Out Quart\",\"Back Out\",\"Custom\"]},backgroundFadeEasingCustom:{type:ControlType.String,title:\"Custom Background Fade Easing\",defaultValue:\"cubic-bezier(.7,.2,.2,1)\",placeholder:\"cubic-bezier(x1,y1,x2,y2)\",hidden:({backgroundFadeEasing})=>backgroundFadeEasing!==\"custom\"}});export default LogoPreloader;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LogoPreloader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LogoPreloader.map"],"mappings":"4NAAiF,SAAgB,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,OAAO,EAWlB,OAXoB,MAAc,CAClM,IAAM,MAAoB,CAC1B,IAAM,EAAU,SAAS,gBAAgB,aAAa,cAAc,EAAE,GAAG,IAAY,QAAQ,IAAY,QAAS,OAAO,EACzH,IAAM,EAAW,aAAa,QAAQ,OAAO,EACsB,OADjB,IAAa,QAAQ,IAAa,QAAgB,EACnF,EAAO,WAAW,8BAAgD,CAAC,CAAC,QAAQ,OAAO,OAAQ,EAC5G,EAAS,EAAgB,CAAC,EAC1B,IAAM,MAAsB,CAAC,EAAS,EAAgB,CAAC,CAAE,EACzD,EAAO,iBAAiB,cAAc,CAAiB,EACvD,IAAM,EAAS,IAAI,iBAAiB,GAAW,CAAC,EAAU,QAAQ,GAAU,CAAI,EAAS,gBAAgB,gBAAgB,EAAkB,CAAG,CAAC,CAAE,CAAC,EAAE,EAAS,QAAQ,SAAS,gBAAgB,CAAC,WAAW,GAAK,gBAAgB,CAAC,cAAc,CAAC,CAAC,EAChP,IAAM,EAAW,EAAO,WAAW,8BAA8B,EAAQ,MAAsB,CAC/F,IAAM,EAAU,SAAS,gBAAgB,aAAa,cAAc,EAAQ,EAAW,aAAa,QAAQ,OAAO,EAAK,CAAC,GAAW,CAAC,GAAY,EAAkB,CAAG,EACtK,OADwK,EAAW,iBAAiB,SAAS,CAAiB,MACpN,CAAC,EAAO,oBAAoB,cAAc,CAAiB,EAAE,EAAS,WAAW,EAAE,EAAW,oBAAoB,SAAS,CAAiB,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,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