{"version":3,"file":"Examples.Dh2M-_ot.mjs","names":["useState","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","c","_e","createStore","init_store_js__1_0","centerContent","init_Utils","init_utils_js__0_9","withRouteRedirect","routes","setRoutes","update","selectedPackageType","destination","route","Component","props","init_Examples"],"sources":["https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/4CCYDpWSCVlPfkSfh2UF/2XYUFZEteu5AAjz8Y2zI/Examples.js"],"sourcesContent":["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{useEffect,useState}from\"react\";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/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return props=>{return /*#__PURE__*/ _jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/ _jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/ _jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}export function withRouteRedirect(Component){return props=>{// load sheet\nconst[routes,setRoutes]=useState();useEffect(()=>{async function update(){const response=await fetch(\"https://sheet.spacet.me/1k98vD7qa59KUElVfOBinrywBHXkhohwDz9Xl5R890-Q/Sheet1.json\");let routes=await response.json();await setRoutes(routes.values);}update();},[]);// on form submitted\nwindow.addEventListener(\"message\",e=>{var ref;if((ref=e.data)===null||ref===void 0?void 0:ref.eventName){var ref1;if(((ref1=e.data)===null||ref1===void 0?void 0:ref1.eventName)===\"onFormSubmitted\"){var ref2;const selectedPackageType=(ref2=e.data.data.submissionValues)===null||ref2===void 0?void 0:ref2.package_type;const destination=routes.find(route=>selectedPackageType===route[1])[2];console.log(\"destination\",destination);window.location.href=destination;}}});return /*#__PURE__*/ _jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withRouteRedirect\":{\"type\":\"reactHoc\",\"name\":\"withRouteRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"A,mOAAa,EAAgB,CACzB,QAAS,OACT,eAAgB,SAChB,WAAY,QAChB,EAWI,CADA,GAAGW,CACO,C,+CEdgiB,SAAgBG,EAAkB,EAAU,CAAC,MAAO,IAAO,CACzmB,GAAK,CAACC,EAAOC,GAAWhB,EAAS,EACgb,OAD9aK,MAAc,CAAC,eAAeY,GAAQ,CAAgH,IAAIF,EAAO,MAAM,MAA3G,MAAM,kFAAkF,EAAA,CAA4B,KAAK,EAAE,MAAMC,EAAUD,EAAO,MAAM,CAAE,CAACE,EAAO,CAAE,EAAE,CAAC,CAAC,EACvQf,EAAO,iBAAiB,UAAU,GAAG,CAAS,GAAQ,EAAE,MAAsC,WAA8B,EAAE,MAAwC,YAAa,kBAAkB,CAAU,IAAMgB,EAA0B,EAAE,KAAK,KAAK,kBAAoD,aAAmBC,EAAYJ,EAAO,KAAK,GAAOG,IAAsBE,EAAM,EAAE,CAAC,CAAC,GAAG,QAAQ,IAAI,cAAcD,CAAW,EAAE,EAAO,SAAS,KAAKA,CAAY,CAAE,CAAC,EAAuB,gBAAKE,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE,C,kDAFpfb,EAAY,CAAC,WAAW,SAAS,CAAC,C"}