{"version":3,"file":"LinkWithURLParams.DcWv4YAp.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/pK0KPDPdSSjzMrccsi4x/CIHsHHKqeMy0cVElECcz/LinkWithURLParams.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/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}function getCookie(name){const value=`; ${document.cookie}`;const parts=value.split(`; ${name}=`);if(parts.length===2)return parts.pop().split(\";\").shift();}export function withLinkToTally(Component){return props=>{const[search,setSearch]=useState(\"\");const[fbc,setFbc]=useState(\"\");const[fbp,setFbp]=useState(\"\");useEffect(()=>{setFbc(getCookie(\"_fbc\"));setFbp(getCookie(\"_fbp\"));setSearch(window.location.search||\"\");},[]);return /*#__PURE__*/_jsx(Component,{...props,link:`${props.link}?${search.replace(/^\\?/,\"\")}${fbc?`&fbc=${fbc}`:\"\"}${fbp?`&fbp=${fbp}`:\"\"}`});};}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\":{\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLinkToTally\":{\"type\":\"reactHoc\",\"name\":\"withLinkToTally\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LinkWithURLParams.map"],"mappings":"6OACsM,SAAS,EAAU,EAAK,CAAoC,IAAM,EAA7B,KAAK,SAAS,SAA2B,MAAM,KAAK,EAAK,GAAG,CAAC,GAAG,EAAM,SAAS,EAAE,OAAO,EAAM,KAAK,CAAC,MAAM,IAAI,CAAC,OAAO,CAAE,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,GAAG,CAAM,CAAC,EAAI,GAAQA,EAAS,GAAG,CAAM,CAAC,EAAI,GAAQA,EAAS,GAAG,CAAgH,OAA/G,MAAc,CAAC,EAAO,EAAU,OAAO,CAAC,CAAC,EAAO,EAAU,OAAO,CAAC,CAAC,EAAU,EAAO,SAAS,QAAQ,GAAG,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAG,EAAM,KAAK,GAAG,EAAO,QAAQ,MAAM,GAAG,GAAG,EAAI,QAAQ,IAAM,KAAK,EAAI,QAAQ,IAAM,KAAK,CAAC,uBADjtB,IAAsC,IAAqE,IAAqE,CAC5M,EAAY,CAAC,WAAW,UAAU,CAAC"}