{"version":3,"file":"Examples.DIZQptaZ.mjs","names":["useState","useEffect","forwardRef","useRef","useState","useCallback","startTransition","useEffect","useMemo","_jsx","__esmMin","init_ssg_sandbox_shims","te","ne","window","_e","de","pe","J","init_jsx_runtime","init_npm_react_18_3_1","ce","useObserveData","init_framer_ChujFWHC","Data","useIsStaticRenderer","useInView","init_framer_motion_1EwlFBEG","createStore","state1","dataStore","setDataStore","newState","storeState","storeSetters","setStoreState","setter","useStore","state","setState","init_createStore","init_store_js__1_0","centerContent","init_Utils","init_utils_js__0_9","clamp01","value","withScrollLineFill","Component","props","forwardedRef","elementRef","frameRef","isStatic","inView","progress","setProgress","setRefs","node","updateProgress","rect","height","next","scheduleUpdate","target","onScroll","onResize","resizeObserver","fillStop","lineBackground","TIMELINE_FILL_COLOR","TIMELINE_UNFILLED_COLOR","init_Examples"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/5DC9Q2HVdaEW1My8gwDH/NXcMC3QRrbN1uuaC5jfL/Examples.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useRef,useState}from\"react\";import{useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});const TORN_SURFACE_CLIP_PATH=`polygon(\n    0% 14px, 3% 11px, 6% 14px, 9% 12px, 12% 14px, 15% 11px, 18% 14px, 21% 12px, 24% 14px, 27% 11px,\n    30% 14px, 33% 12px, 36% 14px, 39% 11px, 42% 14px, 45% 12px, 48% 14px, 51% 11px, 54% 14px, 57% 12px,\n    60% 14px, 63% 11px, 66% 14px, 69% 12px, 72% 14px, 75% 11px, 78% 14px, 81% 12px, 84% 14px, 87% 11px,\n    90% 14px, 93% 12px, 96% 14px, 100% 13px,\n    calc(100% - 12px) 3%, calc(100% - 14px) 7%, calc(100% - 11px) 11%, calc(100% - 13px) 15%, calc(100% - 12px) 20%,\n    calc(100% - 14px) 25%, calc(100% - 11px) 30%, calc(100% - 13px) 35%, calc(100% - 12px) 40%, calc(100% - 14px) 45%,\n    calc(100% - 11px) 50%, calc(100% - 13px) 55%, calc(100% - 12px) 60%, calc(100% - 14px) 65%, calc(100% - 11px) 70%,\n    calc(100% - 13px) 75%, calc(100% - 12px) 80%, calc(100% - 14px) 85%, calc(100% - 11px) 90%, calc(100% - 13px) 95%,\n    calc(100% - 12px) 98%,\n    97% calc(100% - 12px), 94% calc(100% - 14px), 91% calc(100% - 11px), 88% calc(100% - 13px), 85% calc(100% - 12px),\n    82% calc(100% - 14px), 79% calc(100% - 11px), 76% calc(100% - 13px), 73% calc(100% - 12px), 70% calc(100% - 14px),\n    67% calc(100% - 11px), 64% calc(100% - 13px), 61% calc(100% - 12px), 58% calc(100% - 14px), 55% calc(100% - 11px),\n    52% calc(100% - 13px), 49% calc(100% - 12px), 46% calc(100% - 14px), 43% calc(100% - 11px), 40% calc(100% - 13px),\n    37% calc(100% - 12px), 34% calc(100% - 14px), 31% calc(100% - 11px), 28% calc(100% - 13px), 25% calc(100% - 12px),\n    22% calc(100% - 14px), 19% calc(100% - 11px), 16% calc(100% - 13px), 13% calc(100% - 12px), 10% calc(100% - 14px),\n    7% calc(100% - 11px), 4% calc(100% - 13px), 1% calc(100% - 12px),\n    12px 97%, 14px 94%, 11px 91%, 13px 88%, 12px 85%, 14px 82%, 11px 79%, 13px 76%, 12px 73%, 14px 70%,\n    11px 67%, 13px 64%, 12px 61%, 14px 58%, 11px 55%, 13px 52%, 12px 49%, 14px 46%, 11px 43%, 13px 40%,\n    12px 37%, 14px 34%, 11px 31%, 13px 28%, 12px 25%, 14px 22%, 11px 19%, 13px 16%, 12px 13%, 14px 10%,\n    11px 7%, 13px 4%\n)`;const TORN_SURFACE_SHADOW=\"drop-shadow(0 1px 1px rgba(46, 34, 20, 0.08)) drop-shadow(0 10px 24px rgba(46, 34, 20, 0.14))\";function hasVisibleComputedSurface(element){if(typeof window===\"undefined\")return false;const computed=window.getComputedStyle(element);const backgroundImage=computed.backgroundImage?.trim().toLowerCase();if(backgroundImage&&backgroundImage!==\"none\")return true;const color=computed.backgroundColor?.trim().toLowerCase();if(!color||color===\"transparent\")return false;const rgba=color.match(/^rgba?\\((.+)\\)$/);if(!rgba)return true;const parts=rgba[1].split(\",\").map(part=>part.trim());const alpha=parts.length>=4?Number(parts[3]):1;return Number.isFinite(alpha)?alpha>0:true;}export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function withTornPaperSurface(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const elementRef=useRef(null);const[isActive,setIsActive]=useState(false);const setRefs=useCallback(node=>{elementRef.current=node;if(typeof forwardedRef===\"function\"){forwardedRef(node);}else if(forwardedRef&&typeof forwardedRef===\"object\"){forwardedRef.current=node;}},[forwardedRef]);useEffect(()=>{if(typeof window===\"undefined\"||!elementRef.current)return;const target=elementRef.current;const update=()=>{const next=hasVisibleComputedSurface(target);startTransition(()=>{setIsActive(next);});};update();if(typeof MutationObserver===\"undefined\")return;const observer=new MutationObserver(update);observer.observe(target,{attributes:true,attributeFilter:[\"style\",\"class\"]});return()=>observer.disconnect();},[props.style,props.className]);if(!isActive){return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});}const mergedFilter=props.style?.filter?`${props.style.filter} ${TORN_SURFACE_SHADOW}`:TORN_SURFACE_SHADOW;return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,style:{...props.style,clipPath:TORN_SURFACE_CLIP_PATH,WebkitClipPath:TORN_SURFACE_CLIP_PATH,filter:mergedFilter}});});}function clamp01(value){return Math.max(0,Math.min(1,value));}const TIMELINE_FILL_COLOR=\"#7FB3A3\";const TIMELINE_UNFILLED_COLOR=\"rgba(127, 179, 163, 0.3)\";export function withScrollLineFill(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const elementRef=useRef(null);const frameRef=useRef(null);const isStatic=useIsStaticRenderer();const inView=useInView(elementRef,{margin:\"200px 0px 200px 0px\"});const[progress,setProgress]=useState(0);const setRefs=useCallback(node=>{elementRef.current=node;if(typeof forwardedRef===\"function\"){forwardedRef(node);}else if(forwardedRef&&typeof forwardedRef===\"object\"){forwardedRef.current=node;}},[forwardedRef]);const updateProgress=useCallback(()=>{if(typeof window===\"undefined\"||!elementRef.current)return;const rect=elementRef.current.getBoundingClientRect();const height=rect.height||1;const next=clamp01((window.innerHeight*.55-rect.top)/height);startTransition(()=>{setProgress(next);});},[]);const scheduleUpdate=useCallback(()=>{if(typeof window===\"undefined\")return;if(frameRef.current!==null)return;frameRef.current=window.requestAnimationFrame(()=>{frameRef.current=null;if(!isStatic&&inView){updateProgress();}});},[inView,isStatic,updateProgress]);useEffect(()=>{if(isStatic)return;if(typeof window===\"undefined\"||!elementRef.current)return;const target=elementRef.current;updateProgress();const onScroll=()=>scheduleUpdate();const onResize=()=>scheduleUpdate();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onResize);let resizeObserver=null;if(typeof ResizeObserver!==\"undefined\"){resizeObserver=new ResizeObserver(()=>{scheduleUpdate();});resizeObserver.observe(target);}return()=>{window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onResize);if(frameRef.current!==null){window.cancelAnimationFrame(frameRef.current);frameRef.current=null;}resizeObserver?.disconnect();};},[inView,isStatic,scheduleUpdate,updateProgress]);const effectiveProgress=isStatic?0:progress;const fillStop=`${effectiveProgress*100}%`;const lineBackground=useMemo(()=>`linear-gradient(to bottom, ${TIMELINE_FILL_COLOR} 0%, ${TIMELINE_FILL_COLOR} ${fillStop}, ${TIMELINE_UNFILLED_COLOR} ${fillStop}, ${TIMELINE_UNFILLED_COLOR} 100%)`,[fillStop]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,style:{...props.style,background:lineBackground}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withTornPaperSurface\":{\"type\":\"reactHoc\",\"name\":\"withTornPaperSurface\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollLineFill\":{\"type\":\"reactHoc\",\"name\":\"withScrollLineFill\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"A,4RAA8E,SAAgB4B,EAAYC,EAAO,CACjH,IAAMC,EAAUN,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGK,CAAM,CAAC,CAAC,CAAC,EACjDE,EAAaC,GAAU,CAC1B,OAAOA,GAAW,aAAYA,EAASA,EAASF,EAAU,KAAK,GAAGA,EAAU,MAAM,OAAO,OAAO,CAAC,GAAGA,EAAU,MAAM,GAAGE,CAAQ,CAAC,CAAE,EACjIC,EAAW,OAAOJ,GAAS,SAAS,OAAO,OAAO,CAAC,GAAGA,CAAM,CAAC,EAAEA,EAC7DK,kBAAa,IAAI,IACjBC,EAAcH,GAAU,CAC3B,OAAOA,GAAW,aAAYA,EAASA,EAASC,CAAU,GAAGA,EAAW,OAAOD,GAAW,SAAS,OAAO,OAAO,CAAC,GAAGC,EAAW,GAAGD,CAAQ,CAAC,EAAEA,EACjJE,EAAa,QAAQE,GAAQA,EAAOH,CAAU,CAAC,CAAE,EACjD,SAASI,GAAU,CACnB,GAAK,CAACC,EAAMC,GAAUvC,EAASiC,CAAU,EAKzC,OAHAhC,OACAiC,EAAa,IAAIK,CAAQ,MAAYL,EAAa,OAAOK,CAAQ,GAAI,CAAC,CAAC,EACpEjB,EAAe,IAAI,IAAMA,EAAe,EAAQ,CAACQ,EAAU,MAAMC,CAAY,GAC1E,CAACO,EAAMH,CAAa,CAAG,CAAC,OAAOE,CAAS,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