{"version":3,"file":"WithRedirect.DFIUASb_.mjs","names":[],"sources":["https:/framerusercontent.com/modules/e1QisWwkK3ir0kXucJV2/zP2jLAudgo652IN5DfAN/WithRedirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withRedirect(Component){return props=>{useEffect(()=>{const timer=setTimeout(()=>{// Get the current URL and extract components\nconst currentUrl=window.location;const protocol=currentUrl.protocol;const host=currentUrl.host;const pathname=currentUrl.pathname;// Extract locale from pathname - matches any 2-3 character locale slug\nconst localeMatch=pathname.match(/^\\/([a-z]{2,3})\\//);let redirectUrl=`${protocol}//${host}/`;if(localeMatch&&localeMatch[1]){// If locale is found, redirect to locale homepage\nconst locale=localeMatch[1];redirectUrl=`${protocol}//${host}/${locale}/`;}// If no locale found, redirect to domain root (default behavior)\nwindow.location.href=redirectUrl;},5e3)// 5 seconds\n;return()=>clearTimeout(timer);},[]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withRedirect\":{\"type\":\"reactHoc\",\"name\":\"withRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithRedirect.map"],"mappings":"gIAAwE,SAAgB,EAAa,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAC,IAAM,EAAM,eAAe,CACzK,IAAM,EAAW,EAAO,SAAe,EAAS,EAAW,SAAe,EAAK,EAAW,KACpF,EADwG,EAAW,SAC9F,MAAM,oBAAoB,CAAK,EAAY,GAAG,EAAS,IAAI,EAAK,GAAM,GAAa,EAAY,KAC9F,EAAY,GAAG,EAAS,IAAI,EAAK,GAAhD,EAAY,GAA8C,IACvE,EAAO,SAAS,KAAK,GAAc,IAAI,CACtC,UAAU,aAAa,EAAM,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,uBALxC,IAA6B"}