{"version":3,"file":"TextOverrides.Bft8Yo9o.mjs","names":[],"sources":["https:/framerusercontent.com/modules/D4E1fmUQo8RtVdebcc2T/TOpmTudd24buORqpPZKY/TextOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,isValidElement,cloneElement}from\"react\";function mapTextNodes(node,fn){if(typeof node===\"string\"){return fn(node)// tu wykonujesz funkcję na każdym stringu\n;}else if(Array.isArray(node)){return node.map(child=>mapTextNodes(child,fn));}else if(/*#__PURE__*/isValidElement(node)){return /*#__PURE__*/cloneElement(node,{children:mapTextNodes(node.props.children,fn)});}return node// np. null, boolean, itp.\n;}export function withNoWindows(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const NON_BREAKING_PREPOSITIONS=[\"w\",\"z\",\"i\",\"a\",\"o\",\"u\",\"na\",\"do\",\"po\"];const replaceSpaces=text=>text.replace(new RegExp(`\\\\b(${NON_BREAKING_PREPOSITIONS.join(\"|\")})\\\\s`,\"gi\"),\"$1\\xa0\");const newChildren=mapTextNodes(props.children,replaceSpaces);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,children:newChildren});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withNoWindows\":{\"type\":\"reactHoc\",\"name\":\"withNoWindows\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextOverrides.map"],"mappings":"2HAAqG,SAAS,EAAa,EAAK,EAAG,CAC+E,OAD3E,OAAO,GAAO,SAAiB,EAAG,EAAK,CACpK,MAAM,QAAQ,EAAK,CAAS,EAAK,IAAI,GAAO,EAAa,EAAM,EAAG,CAAC,CAAuB,EAAe,EAAK,CAAsB,EAAa,EAAK,CAAC,SAAS,EAAa,EAAK,MAAM,SAAS,EAAG,CAAC,CAAC,CAAS,EACvN,SAAgB,EAAc,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAA0B,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,CAA0H,EAAY,EAAa,EAAM,SAApI,GAAM,EAAK,QAAY,OAAO,OAAO,EAA0B,KAAK,IAAI,CAAC,MAAM,KAAK,CAAC,SAAS,CAA6D,CAAC,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,SAAS,EAAY,CAAC,EAAG,kBAFpX,IAA0D"}