{"version":3,"file":"Simulacao_tracking_code.vj-eAwoS.mjs","names":[],"sources":["https:/framerusercontent.com/modules/WMhbLroLPoGpwAjHVSZR/zs9YG24Iozmhow7axrWZ/Simulacao_tracking_code.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";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\";const useStore=createStore({background:\"#0099FF\"});// Função para gerar a URL com parâmetros UTM\nconst generateUrlWithUTM=(baseUrl,utmParams)=>{const url=new URL(baseUrl);Object.keys(utmParams).forEach(key=>url.searchParams.append(key,utmParams[key]));return url.toString();};// Função para capturar os parâmetros UTM da URL atual\nconst getUTMParamsFromUrl=()=>{const params=new URLSearchParams(window.location.search);const utmParams={};params.forEach((value,key)=>{if(key.startsWith(\"utm_\")){utmParams[key]=value;}});return utmParams;};export function withRedirect(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const baseUrl=\"https://sualuz.com.br/simulacao\";const utmParams=getUTMParamsFromUrl();const urlWithUTM=generateUrlWithUTM(baseUrl,utmParams);window.location.href=urlWithUTM;}});};}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\":{\"withRedirect\":{\"type\":\"reactHoc\",\"name\":\"withRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Simulacao_tracking_code.map"],"mappings":"0QAE+M,SAAgB,EAAa,EAAU,CAAC,MAAO,CAAA,GAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,IAAI,CAAC,IAAM,EAAQ,kCAAwC,EAAU,GAAqB,CAAO,EAAW,EAAmB,EAAQ,EAAU,CAAC,EAAO,SAAS,KAAK,CAAY,CAAC,EAAC,AAAI,oBAA9e,IAFN,GAA2C,IAAqE,IAAqE,CAAM,EAAS,EAAY,CAAC,WAAW,SAAU,EAAC,CACjO,EAAmB,CAAC,EAAQ,IAAY,CAAC,IAAM,EAAI,IAAI,IAAI,GAA0F,MAAjF,QAAO,KAAK,EAAU,CAAC,QAAQ,GAAK,EAAI,aAAa,OAAO,EAAI,EAAU,GAAK,CAAC,CAAQ,EAAI,UAAU,AAAE,EAC5K,EAAoB,IAAI,CAAC,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,QAAc,EAAU,CAAE,EAAkF,MAAjF,GAAO,QAAQ,CAAC,EAAM,IAAM,CAAC,AAAG,EAAI,WAAW,OAAO,GAAE,EAAU,GAAK,EAAQ,EAAC,CAAQ,CAAW"}