{"version":3,"file":"Test.ht-eDXUt.mjs","names":["React.useContext","React.useMemo","React.Fragment","useRef","React.useId","useState","useContext"],"sources":["https:/framerusercontent.com/modules/r9XiFVxp1ou6W60iq6pp/3GdQNZ9zzVDerWJRO2JT/pioACjrzq.js","https:/framerusercontent.com/modules/7SaBZI4vwFzpaAciUcF2/kw5bzCuSqLpRGWwIXTG4/Test.js"],"sourcesContent":["// Generated by Framer (8b16de8)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ComponentViewportProvider,ControlType,cx,getFonts,SmartComponentScopedContainer,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";import HomepageDither from\"https://framerusercontent.com/modules/RoYETDBGdbLFtoVNZaP3/YUqLXypm18y70qVdyHdh/NewHomepageDither.js\";const HomepageDitherFonts=getFonts(HomepageDither);const cycleOrder=[\"dUjPV608h\",\"BMsGuPhVp\"];const serializationHash=\"framer-JTbys\";const variantClassNames={BMsGuPhVp:\"framer-v-1e4bxzo\",dUjPV608h:\"framer-v-1s7lay4\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const humanReadableVariantMap={Hidden:\"BMsGuPhVp\",Loaded:\"dUjPV608h\"};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props,variant:humanReadableVariantMap[props.variant]??props.variant??\"dUjPV608h\"};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"dUjPV608h\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);const isDisplayed=()=>{if(baseVariant===\"BMsGuPhVp\")return false;return true;};return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-1s7lay4\",className,classNames),\"data-framer-name\":\"Loaded\",layoutDependency:layoutDependency,layoutId:\"dUjPV608h\",ref:refBinding,style:{...style},...addPropertyOverrides({BMsGuPhVp:{\"data-framer-name\":\"Hidden\"}},baseVariant,gestureVariant),children:isDisplayed()&&/*#__PURE__*/_jsx(ComponentViewportProvider,{children:/*#__PURE__*/_jsx(SmartComponentScopedContainer,{className:\"framer-1t82d5w-container\",isAuthoredByUser:true,layoutDependency:layoutDependency,layoutId:\"LWi3vVWf0-container\",nodeId:\"LWi3vVWf0\",rendersWithMotion:true,scopeId:\"pioACjrzq\",children:/*#__PURE__*/_jsx(HomepageDither,{colorBack:\"rgb(58, 25, 77)\",colorFront:\"rgb(107, 47, 142)\",height:\"100%\",id:\"LWi3vVWf0\",layoutId:\"LWi3vVWf0\",style:{height:\"100%\",width:\"100%\"},width:\"100%\"})})})})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-JTbys.framer-1meeowk, .framer-JTbys .framer-1meeowk { display: block; }\",\".framer-JTbys.framer-1s7lay4 { align-content: center; align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: 1440px; justify-content: center; overflow: var(--overflow-clip-fallback, clip); padding: 0px; position: relative; width: 3504px; }\",\".framer-JTbys .framer-1t82d5w-container { flex: none; height: 100%; position: relative; width: 100%; z-index: 1; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 1440\n * @framerIntrinsicWidth 3504\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"BMsGuPhVp\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramerpioACjrzq=withCSS(Component,css,\"framer-JTbys\");export default FramerpioACjrzq;FramerpioACjrzq.displayName=\"HideDitherForPerf\";FramerpioACjrzq.defaultProps={height:1440,width:3504};addPropertyControls(FramerpioACjrzq,{variant:{options:[\"dUjPV608h\",\"BMsGuPhVp\"],optionTitles:[\"Loaded\",\"Hidden\"],title:\"Variant\",type:ControlType.Enum}});addFonts(FramerpioACjrzq,[{explicitInter:true,fonts:[]},...HomepageDitherFonts],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerpioACjrzq\",\"slots\":[],\"annotations\":{\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"BMsGuPhVp\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerContractVersion\":\"1\",\"framerColorSyntax\":\"true\",\"framerDisplayContentsDiv\":\"false\",\"framerImmutableVariables\":\"true\",\"framerComponentViewportWidth\":\"true\",\"framerAutoSizeImages\":\"true\",\"framerIntrinsicHeight\":\"1440\",\"framerIntrinsicWidth\":\"3504\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./pioACjrzq.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useState,useEffect,useContext,createContext}from\"react\";const WORKER_URL=\"https://juicebox.luca-cbc.workers.dev\";// Shared context so all 4 components use a single fetch\nconst PostsContext=/*#__PURE__*/createContext([]);function formatDate(dateString){return new Date(dateString).toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"});}// Wrap your entire section/frame in Framer with this override\n// so all post components share the same data\nexport function withPostsProvider(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[posts,setPosts]=useState([]);useEffect(()=>{fetch(WORKER_URL).then(r=>r.json()).then(setPosts);},[]);return /*#__PURE__*/_jsx(PostsContext.Provider,{value:posts,children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}function withPost(index){return function(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const posts=useContext(PostsContext);const post=posts[index];if(!post)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});const newProps={...props,title:post.title,timeToRead:`${post.readTime} MIN`,date:formatDate(post.publishedDate),// Preserve all existing image props, only override src\nimage:{...props.image??{},src:post.cover},link:post.url};return /*#__PURE__*/_jsx(Component,{ref:ref,...newProps});});};}export function withPost1(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const posts=useContext(PostsContext);const post=posts[0];console.log(posts);//fallback\nif(!post)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});return /*#__PURE__*/_jsx(Component,{ref:ref,...props,title:post.title,timeToRead:`${post.readTime} MIN`,date:formatDate(post.publishedAt),link:post.url,image:{...props.image??{},src:post.cover,srcSet:post.cover}});});}export function withPost2(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const posts=useContext(PostsContext);const post=posts[1];if(!post)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});return /*#__PURE__*/_jsx(Component,{ref:ref,...props,title:post.title,timeToRead:`${post.readTime} MIN`,date:formatDate(post.publishedAt),link:post.url,image:{...props.image??{},src:post.cover,srcSet:post.cover}});});}export function withPost3(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const posts=useContext(PostsContext);const post=posts[2];if(!post)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});return /*#__PURE__*/_jsx(Component,{ref:ref,...props,title:post.title,timeToRead:`${post.readTime} MIN`,date:formatDate(post.publishedAt),link:post.url,image:{...props.image??{},src:post.cover,srcSet:post.cover}});});}export function withPost4(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const posts=useContext(PostsContext);const post=posts[3];if(!post)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});return /*#__PURE__*/_jsx(Component,{ref:ref,...props,title:post.title,timeToRead:`${post.readTime} MIN`,date:formatDate(post.publishedAt),link:post.url,image:{...props.image??{},src:post.cover,srcSet:post.cover}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withPost1\":{\"type\":\"reactHoc\",\"name\":\"withPost1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPost3\":{\"type\":\"reactHoc\",\"name\":\"withPost3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPost2\":{\"type\":\"reactHoc\",\"name\":\"withPost2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPost4\":{\"type\":\"reactHoc\",\"name\":\"withPost4\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPostsProvider\":{\"type\":\"reactHoc\",\"name\":\"withPostsProvider\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Test.map"],"mappings":"4ZACyrB,SAAS,EAAqB,EAAU,GAAG,EAAS,CAAC,IAAM,EAAc,EAAE,CAAsF,OAArF,GAAU,QAAQ,GAAS,GAAS,OAAO,OAAO,EAAc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