{"version":3,"file":"Examples.CC8XFuO9.mjs","names":[],"sources":["https:/framerusercontent.com/modules/d2YdEIGgLdLocGuN0O9k/9usPTUyxlRJooLnnVgpj/Examples.js"],"sourcesContent":["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 const useIpwhois=ip=>{const[val,setval]=useState(null);useEffect(()=>{const fetchData=async()=>{const BASE_URL=\"https://ipwhois.pro/?key=MjdM2iBKJn5AXnCH\";try{const result=await fetch(BASE_URL);const data=await result.json();setval(data);}catch(e){console.log(e);}};void fetchData();},[ip]);return val;};/**\n * @summary Redirects non-US users to Typeform based on country_code value.\n */export function withLinkRedirect(Component){const queryString=window?.location.search;const params=queryString?`&${queryString.substring(1)}`:\"\";return props=>{const data=useIpwhois();return /*#__PURE__*/_jsx(Component,{...props,link:data?.success===true&&data?.country_code!==\"US\"?\"https://levels.link/waitlist-international?utm_campaign=homepage\":`https://app.levels.com/join?quiz=true${params}`});};}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()});}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withLinkRedirect\":{\"type\":\"reactHoc\",\"name\":\"withLinkRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIpwhois\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"sTAGG,SAAgB,EAAiB,EAAU,CAAC,IAAM,EAAY,GAAQ,SAAS,OAAa,EAAO,GAAa,GAAG,EAAY,UAAU,EAAE,GAAG,GAAG,MAAO,CAAA,GAAO,CAAC,IAAM,EAAK,GAAY,CAAC,MAAoB,GAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAM,WAAU,GAAM,GAAM,eAAe,KAAK,oEAAoE,uCAAuC,GAAS,EAAC,AAAE,CAAE,kBAFtV,IADhE,GAA2C,IAAsC,IAAqE,IAAqE,CACrN,EAAS,EAAY,CAAC,WAAW,SAAU,EAAC,CAAc,EAAW,GAAI,CAAC,GAAK,CAAC,EAAI,EAAO,CAAC,EAAS,KAAK,CAA6O,MAA5O,GAAU,IAAI,CAAC,IAAM,EAAU,SAAS,CAAC,IAAM,EAAS,4CAA4C,GAAG,CAAC,IAAM,EAAO,KAAM,OAAM,EAAS,CAAO,EAAK,KAAM,GAAO,MAAM,CAAC,EAAO,EAAK,AAAE,OAAM,EAAE,CAAC,QAAQ,IAAI,EAAE,AAAE,CAAC,EAAM,GAAW,AAAE,EAAC,CAAC,CAAG,EAAC,CAAQ,CAAK"}